Does anybody know how you create the that big scrollbar which is used in the contact list? Or the one down there in the screen shot:
Set android:fastScroll="true" on your listview, or anything scrollable by all accounts. You can also set this in your theme or settings.xml files.
My bad,
android:fastScrollEnabled
As per the comment below.
On api target >= 11 you should also use
list.setFastScrollAlwaysVisible(true). Otherwise it may not show up. –
Igor Ganapolsky
if you want scroll bar only for a Activity then use
android:theme="#android:style/Theme.Holo"
only for that activity, you can also use this for whole application.
Try this:
android:fastScrollEnabled
Related
I need to create horizontal selector like in Uber android app (Please check screen shot). But that selector list must be dynamic means (Array[1,2,3,4...]). Please check screen shot:
I trid a lot but nothing worked with grate UI like this, I have trid also this link: check link. Its worked but bad UI because its uses paint to create things. Please help me to achieve same thing. I am trying it for payment selection option based on region. So its must be dynamic.
You can use android ui widget seekbar for this purpose and then customize it.
Also you can refer the following example
Seekbar
I want to create a popup screen with multiple views, just like home screen but as a popup. As I am relatively new to android, so I am not aware if any such control is built in or do I need to use any library? or any hint would be helpful.
EDIT: I am looking for an alternation to viewpager, which is supported minimum on API8.
It sounds like a PopupWindow may be what you're looking for. Added, in API 1, this let's you add a View(s) dynamically or you can set the layout to an already created xml file.
A popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity.
You also can create an Activity with whatever Layout you need in xml and give it a Dialog theme to make it look like a pop up by setting the
android:theme="#android:style/Theme.Dialog"
in the <activity> tag of the manifest
I found the answer from the comment #codeMagic's comment below his answer, so posting here for the reference:
for ViewPager alternative we can use ViewFlow or ViewPagerIndicator library, there minimum supported SDK are API level 1 & 4 respectively.
I have been tired apply a style or a layout to a preference, but it didn't work well.
Could anyone help me with this?
I also find someone say it could be done in listview,But I wanna how to make those blank spaces between two block?
Please, help me with this , it has been puzzled me a long time.Thanks!
You can have a transparent divider between ListItems
android:dividerHeight="10 dip"
You can group your preferences by using PreferenceCategories and PreferenceScreens. If you want a preference to have an icon associated with it, you can use the android:icon attribute on the preference. Are there any specific characteristics of the iPhone settings that you're trying to replicate. You're not going to get your preferences to look exactly like the iPhones setting page, but you can certainly mimic certain characteristics.
I want to implement in my android application a functionality like when a user clicks a button in header a small list view is popup having 5 values in the corner of the screen. Please give some suggestion, its urgent. Thanks in advance.
You mean a quick action menu ? Like this ?
If so, check this :
http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
It depends somewhat on the minimum SDK that you are targeting. If you are able to write your application with a minimum target of Android 3.0 (API Level 11), then there are at least two classes that you can use to accomplish creating a simple popup anchored to another view (in this case, your button):
ListPopupWindow
PopupMenu
Otherwise, you will need to do a little customization of PopupWindow, which is the class that many early QuickAction implementations are based on.
HTH
Design a listview inside it RelativeLayout view in that same layout and make it as invisible. once you click a button at the header you can make it visible. which shows the listview.
You can create a new Activity for popup and add android:theme="#android:style/Theme.Translucent.NoTitleBar" to Activity node in Manifest file.
I'm finding lots of discussion about how to replace the default group icons in an ExpandableListView, but I'm not coming up with anything on how to get the defaults to display in the first place.
The defaults (as shown here, if that's what they look like [new to Android, this is my first ExpandableListView]) will be fine with me, if I can get them to show.
I'm using the sample code from the article; I have no need for the embedded CheckBoxes at this time.
Any assistance is appreciated.
--EDIT--
Also, does anyone have any theories as to why the default icons show in the article (again, if that's what they look like--if someone could confirm that'd be great) but don't show for me?
If you are using custom layouts for your group rows the default icons are overridden by your layout. You'll need to add them to your layout in order for them to display.
you can changed default icon with your own icon as below.
android:groupIndicator="#drawable/image"