Creating 'settings' view equivalent to the system views - android

I'd like to create a 'settings' tab in my Android application which will look like views in Android's system settings - for example like a Phone settings > Sound.
I'd like to achieve that headers, checkbox/radio list elements but I have no idea how to bite that.
When I create that UI elements in my XML definition of UI, they does not looks well.
Please suggest me a correct way to do that ane provide me some examples.

The magic word to search is preference
A random link to set you up : http://www.kaloer.com/android-preferences

Related

Android CustonView - How implement selectable items for resizing a CustonView in a parent View?

everyone. I am not very familiar with the Android system and need food for thought or a hint on how best to implement my idea.I would like to create a resizable CustonView. I have already created the basic structure of the CustonView. I can also assign a Drawable.xml to this to make it clear to the user that this CustonView is selected. But this is just a shape. I would like it to look something like the graphic below.
draft
Ideally, each element should be independently selectable. In any case, I would be grateful for any hints or even examples.

Android Settings app preference files

I've read Android's settings tutorial, and want to use the new "headers" feature in order to accomplish something like the left image. To be exact, I want to have a global "enabled" checkbox, and below it some preference headers surrounded with a category header.
Can I make it be just by using XMLs ?
Yes it is possible by writing your own adapter class that handles headers. I found this nice pretty straightforward example for native settings looking like preference.
It's working on handset but it's not fixed for tablet (app crashes as it tries to use two-pane layout).

Is there UISwitch settings control in Android like iOS

I took a look at the preference activity that Android use for settings. i'm looking for something like UISwitch as shown in below image, does Android have one like this.
I can see the nearest control on Android preference settings is "list preference"
There is ToggleButton and CompoundButton (one extends the other).
But those have a different default display widget then what you are looking for. However either could be used along with your own drawable resources to create the "switch" type control that you are after.
But by default no the system does not include a widget that serves this function and looks the way you want it to.
No, In Android its called ToggleButton.
But still it can be developed by extending RadioButton placed in RadioGroup and giving its UI way you wanted.

Custom controls in android

I'm new to android and need to create what in .net would be called a custom control. But I have two questions:
some articles refer to them as custom controls others custom componnets and other custom widgets. What should I be looking up?
Most questions on this topic are simply refered this page http://developer.android.com/guide/topics/ui/custom-components.html which is just a view class and is a bit like being handed a chinese dictionary when asked how to write chinese and told everything you need is there. Although true, I'm looking for a simple example something like an odd shapped button with one even attached to it. Surely there must be one such example?
If you really need custom view - look this document. But easier way - customize existing components, by providing specific backgrounds and providing special events.

How to set a layout using spinner

I want to create a layout like the below picture. How can I set the drop-down like this with cancel option. I am using spinner to show the drop-down but cannot set the layout like this.
Can anyone help me to create a drop-down like this. I also want to create an expand button for a list item which will open the content in a new page. My aim is to set all the available settings in a single page.
Then use PreferenceActivity. In fact, that's a standard preference screen.
http://developer.android.com/reference/android/preference/PreferenceScreen.html
http://jetpad.org/2011/01/creating-a-preference-activity-in-android/
You can take a look at the API Demo app which is in the Android SDK. There you can learn how to create this kind of screens (either from XML or code). It has many advantages... for instance, you won't have to worry about persisting the settings... the OS will do that for you.

Categories

Resources