how can i implement a split button like below given image - android

i want this kind of drop-down button on my layout. i don't know the exact term, Please Help
I don't want a list, i only want when somebody tries to know about topic then he may click on that button, then button get split and all description related to specific topic will be shown to person.
I don't know how it would be implemented so i request the professionals to post answers
I searched from too many resources and tried to implement but i couldn't implement
Thank you

That is known as ExpandableListView. Refer to this example. Good luck

The closest component in Swing would be a JTree.
Read the section from the Swing tutorial on How to Use Trees for more information and working examples.
The next closest would be a JList, but you would need to add all the logic to support the expanding/collapsing of the list.

Related

Android: multi select list preferences with autocomplete?

I need to let the user in my app to choose several cities.
so the users should be able to choose "All Cities" or "multiple cities", every tap on city name will be shown above the list, and every click on the list above, will bring it back down, I designed a sketch so you will be able to understand what i need.
the closest example i have found is android chips edit text:
https://github.com/klinker41/android-chips
but it works on contacts and actually its too much code for a pretty simple select list.
any idea?
Thank you!
Eran.
Finally, I have found exactly what I was looking for, you can find it here:
https://github.com/pratikbutani/MultiSelectSpinner
Thank anyway.
Eran.
There are many library in Github. You can find it here:
Multi Choice - Github Links
https://github.com/wongk/MultiSelectSpinner
https://github.com/GunaseelanArumaikkannu/MultiSpinner
https://github.com/pratikbutani/MultiSelectSpinner

Android application tutorials activity

The following is my instructions page for the application that is being worked upon. For now I am just display this image via the ImageView using the scaleXY property to make it pan out throughout the screen. I do know that this is a very lame approach to making a tutorials page ... So can someone please tell me how can I correctly implement this tutorials page in my application ? Thanks in advanced.
This here looks like it can help you.
You're current method works, but I think you'll find this alternative much more preferable.
The ShowcaseView library is designed to highlight and showcase specific parts of apps to the user with a distinctive and attractive overlay. This library is great for pointing out points of interest for users, gestures, or obscure but useful items.
https://github.com/Espiandev/ShowcaseView

How to add our own gestures in android?

I am working on the gestures concept. I want know some thing about how to add our own gestures in android.For example if user drawn "O" symbol i want to make some events. Please share some tutorials and Snippet of the code.
There are quite a few results available with a relatively simple Google search. I would normally post a sarcastic comment or something. :-)
But this isn't quite an everyday subject if you would, so I have here a few links that should get you started. But you should work on your Google foo too. ;-)
http://developer.samsung.com/android/technical-docs/Gestures-in-Android
http://www.hascode.com/2010/05/creating-a-simple-gesture-app-with-android/
http://code.google.com/p/quickdroid/source/checkout (QuickDroid Checkout)
http://code.google.com/p/quickdroid/source/browse/ (QuickDroid Browse code)
http://androidresearch.wordpress.com/2012/01/10/working-with-gesture-api-in-android/
I found the 5th link a little more promising. Of course, I haven't seen too much of it for that to be definite. But try them all anyway.
Check the link below which will guide on how to create our own gestures and use it.
1) Link 1
2) Link 2
3) Link 3
4) Link 4
Go throug some of the links you will surely get some idea about gestures.

Android user interface elements usage

I did search the internet to find an answer to my questions but there are no websites that did help me, so I hope someone can! Thank you in advance and have a nice day :-)
So these days I've been busy to get more into the Android Design guidelines and to learn more about it and how to implement it in my future applications. This is the main website I use to see what the guidelines are: http://developer.android.com/design/index.html. Great website but there are a few small things I just can't find in the dev guide or somewhere else. I just don't know how to implement some (simple) UI elements.
Can someone provide me code snippets of the following questions? (I want to know how to do it as simple as possible, how Google ment it!) It can help other (starting) developers too!
My main question is, are there special elements to achieve these things? As they are the key element in Android 4.0 it should have this things as some standard right?
1) Android 4.0 is using titles with dividers a lot in there new theme and it's looking great. But I can't find how to do implement this element simple like it should. What I want to know is how to make this blue title text with the grey looking divider underneath it look at this picture:
2) How to make section dividers in general? Like this image:
3) How to make a list with section dividers and give a list-item a 2-line explanation under it's name like this:
I did search the internet to find an answer to my questions but there are no websites that did help me, so I hope someone can! Thank you in advance and have a nice day :-)
In most cases how you are going to have to do it is create a custom layout. I tried recreating the look of the people application this way. for the most part the look you are going for is similar to the PreferenceActivityview. That gives you the look of the last image and probably how it was done in the People application with some extra programming. I just found it easier to create my own layout though instead of trying to mess around with that.
To my knowledge there is nothing in the api to create what you are looking to do easily and custom layout are going to be the way to go.
the custom dialog layout like you show in the beginning is very simple to do so if you dont know how to do manipulate layouts I would start there. look up the android color swatches to get the color of that blue
Edit
another thing you could do is look through the People source code and see how they did it but it will probably be more of a pain than what its worth when you can just do a layout

implementing search in the header so as to function in all the screens

I am a newbie to android and apologise if my question is silly. I looked through the net and did not find any proper solution for this.
I want to implement a search function where my edittext is in the header and I want to implement this search function in all the screens with the same functionality. The functionality here is typeahead.
It will be great if I can get some reference to some reading materials which would help me in this or a short hint in any way that can be helpful.
Thanks for your help. I tried it but could not get it working as my activity is not launched. I invested quite a bit of time but did not get through. Is it possible to get a dummy code or prototype with one screen somewhere online so that I can build up on that?
If you want to use the standard Android search interface (which pops up with an edittext in most apps), you'll want to check out search on the Android Developers website. It's a really useful article and worth reading through. If you want the functionality in all the activities, do as it says and put the android.app.default_searchable meta-data tag in the <application> element, not just each <activity> one.

Categories

Resources