android-ui

Updating the UI upon receiving an android push notification

℡╲_俬逩灬. 提交于 2019-12-25 01:09:51
问题 I have a query regarding android push notification and i had asked it in another stackoverflow post and i did not get much help out of it [Query regarding Android push notifications. So i am posting it again, and it is as follows: I have an android app that receives push notifications from Google push notification service. When i tap on the received notification, it opens an UI which displays this message, it is a list view. Now, when the user receives the push notification, and assuming that

Android Hide TimePicker numbers?

大兔子大兔子 提交于 2019-12-24 14:16:40
问题 Is there a way to hide these numbers? Im guessing there must be an attribute which once set to 'false' should to it. Also, i've tried to use custom drawables for the the up/down arrow, but those seem to overlay on top of the numbers (ie,the numbers are still visible) Note: I could make custom pickers where I use a textView in between two imageViews, but the default timePicker allows one to swipe up and scroll through numbers (so would prefer using the default) Edit: Apparently the

Animating Android ListView view on touch

ぃ、小莉子 提交于 2019-12-24 12:28:25
问题 I'd like to animate item in ListView when user touches the item and do the animation backwards when the touch have ended. I've tried doing it by overriding onTouchEvent of the list item but if I return true when I handle the event I don't receive OnItemClickListener calls anymore because I've consumed the touch event, and if I return false I don't receive callback when user stops touching the view. listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick

GridView-like Android widget with variable lengths

旧城冷巷雨未停 提交于 2019-12-24 11:25:45
问题 Is there an existing Android widget third-party implementation that looks like a GridView but supports variable height items? I need one for images, but of course one that works with arbitrary views will work. Memory management is important, such that the Views and the bitmaps may be recycled. Or, a way to convert GridView source code to do this? An example of the grids: 1A 2A 3A 1A 2A 3B 1A 2B 3C The first column contains 1 item labeled as 1A (relative height 1), the second one contains two

Can I create my UI fragment in my activity's onStart()?

∥☆過路亽.° 提交于 2019-12-24 05:59:46
问题 I have an activity with a launchMode of singleTop but I want it to refresh when I go up to it from a child activity. Currently, because my fragment (which contains the UI) is instantiated in the activity's onCreate() , the UI doesn't reload when returning to it. But if I instantiated the fragment in onStart() it would be called when the activity is restarted. While I've gained understanding of the Activity lifecycle, I still don't fully understand how it and the Fragment lifecycle must

KenBurnsView how to set image resource?

◇◆丶佛笑我妖孽 提交于 2019-12-24 02:30:31
问题 I'm trying to use Faria's KenBurnsView library in my application. KenBurnsView is some extension of ImageView, with a nice animating effect. You may have seen the effect in Foursquare app's images. For the actual picture, the view uses the XML defined "android:src" property. But I want to set the image resource during run-time through Java code. I have tried setImageResource, setBackgroundResource, set".."drawabale and many other methods. But no matter what, my image setting command always

Add Image at above of listview

我与影子孤独终老i 提交于 2019-12-24 01:01:54
问题 I would like to add imageview at above of listview. I knew about add section hearder in listview. But i just wanna save my time so i used image view for listview header instead of using addSectionHeader. Unfortunately i just stuck in with some xml properties. Image Overlay at my list view. Actually image supposed to be at the above of list. Check out my xml layout. Thanks. <?xml version="1.0" encoding="utf-8"?> 回答1: this link states the same as of your problem EditText wont display above

how to get the bottom of a layout in android?

南楼画角 提交于 2019-12-24 00:05:39
问题 I'm using a relative layout in Android, and when adding a view to the bottom of the screen the view is placed lower than the actual bottom of the screen, where the user cant actualy see it. view.setY(container.getBottom()-view.getHeight()); container.addView(view); container is a RelativeLayout. i have also tried to use container.getHeight() which gave me the same result, and all the other solutions i found where using the xml file, which doesnt work for me since i need to add the view

Add a button to View

百般思念 提交于 2019-12-23 20:15:52
问题 I'm drawing a graph then add some button/label/textbox for input data. But the button on main layout is't show up. how to add button to a View (Because i draw graph using canvas on a View) here is draw canvas class public class DrawCross extends View { Paint paint = new Paint(); public DrawCross(Context context) { super(context); paint.setColor(Color.BLACK); Button btn = new Button(context); } @Override public void onDraw(Canvas canvas){ canvas.drawLine(250, 450, 250, 20, paint); canvas

Order of evaluation with relative layouts, best practices and parsing of relative-layout

旧时模样 提交于 2019-12-23 17:22:59
问题 I read this " It used to be that Android would use a single pass to process RelativeLayout-defined rules. That meant you could not reference a widget (e.g., via android:layout_above) until it had been declared in the XML. This made defining some layouts a bit complicated. Starting in Android 1.6, Android uses two passes to process the rules, so you can now safely have forward references to as-yet-undefined widgets. " I do not know what is the problem maybe is eclipse problem, but even I use 2