android-widget

Token Edittext (Field) android

一个人想着一个人 提交于 2019-12-03 21:59:20
Because some reason I need a Edittext like the red part in this image : Whenever the user press delete button on keyboard, the edittext will delete one token instead of one word. So, my question are : Do we have an exist control like it? or If not, do you know how can customize one. Note : I don't need it the same 100%. Right now, I am thinking about using a TextWatcher or setKeyListener method for delete feature. Thank you so much for any help. And sorry because my English is not really well. I've put together TokenAutoComplete on github for our use at Splitwise. I couldn't find anything like

BitmapDrawable cannot be cast to RoundRectDrawableWithShadow

╄→гoц情女王★ 提交于 2019-12-03 21:54:56
I am trying to extend a cardview to set the background image. I know that this can not be done with normal cardview. I have searched net and found plenty of solutions for setting a background color to the card view but none for image. My code to do so: public class CCView extends CardView { public CCView (Context context) { super(context); init(); } public CCView (Context context, AttributeSet attrs) { super(context, attrs); init(); } public CCView (Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(); } private void init() { setBackground

How to call a 'method' defined in another activity on click of a widget button? [closed]

心已入冬 提交于 2019-12-03 21:52:52
I know how to launch an activity on click of widget button using pending intent but I want to launch a particular method of that activity. If you need to call a method in another activity then you're following a wrong design. You should not put all of your code in the activities alone. Why it's a bad choice - Because you need an object of the class to call a method on it. And how would you get an object of the activity? Unless you are storing the object of one activity into another (That's a pretty messed up thing to do). Another problem in this approach is your other activity might have been

How to bind any image with the captured Camera image before saving it? [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-03 21:42:32
This question already has answers here : Closed 8 years ago . Possible Duplicate: Android: How to overlay-a-bitmap/draw-over a bitmap? I have implement the android Camera functionality in amy application. Now i want to combine any transperent image with that captured camera Image before to save that image in to gallery, then how it can be done ?? Any code will be realy appereciated. Thanks. Edit: I am using this Code to captured and Save the Image So, How shoud i have to Implement Such things. takePhotoBtn.setOnClickListener(new OnClickListener() { public void onClick(View v) { // <5>

Widget does not respond

喜欢而已 提交于 2019-12-03 21:35:53
I have Widget that uses a service to update. It has button on it to open the activity. It works perfectly. However, sometimes i click on the widget to open the activity and it wont work or update. My question is: what kills an app widget. And if the widget is dead, why is it still showing on the screen. Is there anyway to relive that specific widget without creating another. Thanks Software_Designer Android will stop your widget when it faces a low memory situation. Then it will restart your home widget after cleaning the RAM automatically. But this time, your home widget will get a different

Android Video View Thumbnail?

蓝咒 提交于 2019-12-03 21:34:24
I have the video which is stored under specific folder in sdcard. Currently i have the path as only parameter(Ex:"sdcard/test/sample.mp4"), by using url alone is it possible to retrieve the thumbnail of the image. I also want to show the video preview display in android ,any one provide some example to do this thing. Thanks ThumbnailUtils is an easy-to use API for generating thumbnails from arbitrary filesystem paths. It is available in API level 8. Check out ThumbnailUtils.createVideoThumbnail : Bitmap thumb = ThumbnailUtils.createVideoThumbnail(path, MediaStore.Images.Thumbnails.MINI_KIND);

multiple images in a one single image

拜拜、爱过 提交于 2019-12-03 21:08:06
I want to create a bitmap / image which has many images like "Collage" which has more then one images in a single picture. I have stored all my images in a grid view but now i want to create a single image from all those images. And even i want to make few images click able so what can be the road map to do this ? any sort of help / example will be helpful. reference image Bitmap pic1 = BitmapFactory.decodeResource(getResources(), R.drawable.pic1); Bitmap pic2 = BitmapFactory.decodeResource(getResources(), R.drawable.pic2); Bitmap bg= BitmapFactory.decodeResource(getResources(), R.drawable

Transaction details from paypal using Pay-key in android

一个人想着一个人 提交于 2019-12-03 20:37:04
I am integrating paypal in my application and everything is working fine.Now i wanted to have all transaction details from paypal in my android and so using paykey i tried to write a code..My code for obtaining transaction detail is as follow: if(resultTitle == "SUCCESS") { try{ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = null; httppost = new HttpPost("https://svcs.sandbox.paypal.com/AdaptivePayments/PaymentDetails"); httppost.setHeader("Content-Type", "application/x-www-form-urlencoded"); // Add your data List<NameValuePair> nameValuePairs = new ArrayList

textView marquee

旧巷老猫 提交于 2019-12-03 19:42:30
I want to put a textView in homescreen, and I need the marquee effect public class MainWidget extends AppWidgetProvider { int a; RemoteViews remoteViews; AppWidgetManager appWidgetManager; ComponentName thisWidget; String[] s={"woddfdfdfdfdfdffffffffffffffffffffffffffffffff","dd","ddd","ffff"}; public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Timer timer = new Timer(); timer.scheduleAtFixedRate(new WlanTimer(context, appWidgetManager), 100, 50000); } private class WlanTimer extends TimerTask { RemoteViews remoteViews; AppWidgetManager

Android - Carousel like widget which displays a portion of the left and right elements

寵の児 提交于 2019-12-03 18:34:15
问题 So I've searched high and low but couldn't find an answer to my question. What I basically need is the behavior provided by Android's ViewFlipper or ViewPager but I want to display portions of the left and right views, to indicate the user there are elements to scroll, instead of having the selected view occupying the whole screen. I would also like to add some effects to the left and side views, like dimming and scaling then down a little. Is it possible to do it with the stock ViewFlipper