android-ui

Missing Up navigation icon after switching from ICS ActionBar to Lollipop Toolbar

蓝咒 提交于 2020-01-20 18:48:27
问题 I have an activity with many fragments that uses action bar and navigation drawer. It has "home as up" enabled. I have implemented proper logic that only top level fragments show action bar drawer toggle icon, other fragments show up arrow. I achieved this by: mDrawerToggle.setDrawerIndicatorEnabled(false); mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED, mDrawerList); Now old v4 support library ActionBarDrawerToggle became deprecated. I've switched to v7 version together

How to highlight selected list item in android?

两盒软妹~` 提交于 2020-01-15 11:38:07
问题 In my android application i have list view and detail view for each list item. For tablets i have shown list view of items and selected item's detail view as follows. So my problem is how can i highlight the selected item after user clicks on list item. I am using a BaseAdapter to load list view.How can i do this any idea?? EDIT: Yes as chintan khetiya mentioned i have used following xml file as the background of list item but it will not delighted the selected item. What have i missed? <?xml

How to make the Share action icon white instead of gray

↘锁芯ラ 提交于 2020-01-14 19:43:11
问题 My app has the ShareAction icon as displayed below. How I make it white instead of gray. It looks like it's disabled right now. My XML is: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/menu_item_share" android:showAsAction="ifRoom" android:icon="@drawable/ic_action_share" android:title="Share" android:actionProviderClass="android.widget.ShareActionProvider" /> </menu> ic_action_share is a white icon as shown

Keyevent to click on Alert Dialog of Android screen

∥☆過路亽.° 提交于 2020-01-12 10:19:54
问题 Is there any way to simulate keyevent on "OK" or "CANCEL" buttons of Android dialogue box using adb commands? 回答1: One indirect way is:- adb shell uiautomator dump /data/view.xml adb shell cat /data/view.xml calculate OK button coordinates from the relative coordinates given in the xml file. Then do adb shell input tap <x> <y> Hope works. 回答2: Using AndroidViewClient/culebra you can simply do: run java -jar androidviewclient-2.3.25.jar culebra --verbose --verbose-comments --find-views-with

Increasing a Youtube Thumbnail Size

走远了吗. 提交于 2020-01-05 13:07:14
问题 I've imported the source from the following tutorial: http://blog.blundell-apps.com/show-youtube-user-videos-in-a-listview/ https://github.com/blundell/YouTubeUserFeed/tree/master/res/layout but I cannot seem to increase the size of the thumbnails - I've tried changing userVideoThumbImageView in my XML from: android:layout_width="wrap_content" android:layout_height="wrap_content" to android:layout_width="80dip" android:layout_height="80dip" but it only seems to increase the size of the black

Android Custom Preview Window

↘锁芯ラ 提交于 2020-01-03 05:46:29
问题 I am building an app and when i start launch it, it shows weird preview window wich is very diferent from the activity that i am lauching...I would like to know how to modify my theme style to have a result like this: Google contacts app photo here is my style file with my custum theme: <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Theme.InviteToIslam" parent="@android:style/Theme.Holo.Light.DarkActionBar"> <item

Unable to remove Navigation Bar - Android Tablet: 4.2.2

淺唱寂寞╮ 提交于 2020-01-03 05:15:22
问题 I'm attempting to remove the navigation bar programatically using the most commonly found method on the internet - however the navigation bar continues to appear. I've debugged the method and it is not throwing an exception - so I'm really not sure why we can't seem to hide the Navigation Bar using the following code: (any suggestions are greatly appreciated) Source: try { Process proc = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity 42 s16 com.android.systemui"});

How to keep actionbar fixed across all activities?

£可爱£侵袭症+ 提交于 2020-01-02 18:37:22
问题 In the Facebook app v2.3, when you navigate from one activity(or frgament?) to another, the actionbar stays fixed across all activities(or fragments?). For example, If you navigate from you news feed to someone's profile page, then the action bar stays constant, and the page below is refreshed. So my question is, is it possible to have this behavior using only activities? Or should i just have one main activity, and fragments for all sub activities? 回答1: One activity and as many fragments as

How to keep actionbar fixed across all activities?

白昼怎懂夜的黑 提交于 2020-01-02 18:37:09
问题 In the Facebook app v2.3, when you navigate from one activity(or frgament?) to another, the actionbar stays fixed across all activities(or fragments?). For example, If you navigate from you news feed to someone's profile page, then the action bar stays constant, and the page below is refreshed. So my question is, is it possible to have this behavior using only activities? Or should i just have one main activity, and fragments for all sub activities? 回答1: One activity and as many fragments as

How do I get action buttons with custom layouts to be styled like standard action buttons in Android 3.0+

半腔热情 提交于 2020-01-02 05:37:26
问题 I'm having a bit of trouble with custom action buttons in the honeycomb+ action bar. I'm adding a menu item that uses a custom layout (using the android:actionLayout attribute). The reason for the custom layout is that I want a button that has two lines of text that can be updated dynamically. However, I still want this action button to operate like the other standard buttons. By this I mean that the background fades in when the button is selected, and fades out again if it is unselected, all