user1985273
user1985273

Reputation: 1967

Android 4 settings style

I really like the androi 4 settings page and im trying to style my app the same way. Here is a screenshot: http://cdn.androidtapp.com/wp-content/uploads/2011/10/Android-4.0-Settings-Screen.jpg.

Ive just gotten into java and android 3 or 4 days ago so style i havent really focused on style and dont know anything about it so i have a couple of questions:

1) How to set similar caption to list (Wiress and network on the picture for example)

2) How to set the same colors to my app? Is this somekind of a default style?

3) Is padding used on the picture to make list distance from borders? Can padding be applied thought whole application or does it have to be defined in every xml?

Thank you!

Upvotes: 1

Views: 700

Answers (2)

Taras Leskiv
Taras Leskiv

Reputation: 1875

If you want to style your app the same, you should follow these guidelines about standard metrics and grids:

http://developer.android.com/design/style/metrics-grids.html

1) To set a similar caption you have to implement your own customized view and add it to your list.

2) You can set a theme you need in AndroidManifest.xml or you can use standard items. To find them have a look at android.jar/res.layout folder in your Android library in your project. There are all the standard layout files for Views.

3) What you need is to set margins in your layout-file.

You have to make a layout file and specify all the View-elements and margins in it.

However, if you want to make preferences there are ready classes available for that (PreferenceActivity or PreferenceFragment).

Upvotes: 0

seaplain
seaplain

Reputation: 771

Yes you can apply a universal style to your app (this includes padding), it's quite straightforward

look here for a starting point http://developer.android.com/guide/topics/ui/themes.html

Upvotes: 2

Related Questions