简体   繁体   中英

How can I create a layout like this?

Two tiles SORT and REMINDER and having Sub Item as shown in image. I have tried this by using Listview but nothing made up like this.

在此处输入图片说明

That is easy with Shared Preferences, take a look at this tutorial

In brief: for all Preference Category you have the possibility to add a title, in your case SORT and REMINDER.

You need to use PreferenceCategory to acheive this.

The Settings screen usually makes use of the SharedPreferences and you could use a PreferenceActivity to do it or you can handle all the interaction manually.

The preference category helps you to categorize all the preference settings into various groups, so as to make it easy for the user to understand which setting is for which functionality.

An excerpt from the documentation :

Used to group Preference objects and provide a disabled title above the group.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM