开发者

Where to put the Settings in Android?

开发者 https://www.devze.com 2023-01-01 18:28 出处:网络
On the iPhone/iPod touch, settings could be kept in the S开发者_如何学JAVAettings.app. Can you do this in Android? Or must your settings be in the actual application?

On the iPhone/iPod touch, settings could be kept in the S开发者_如何学JAVAettings.app. Can you do this in Android? Or must your settings be in the actual application?


Can you do this in Android?

Only if you are making your own firmware. Ordinary SDK applications do not have the ability to add to the roster of device-wide settings.

Or must you settings have to be in the actual appilcation?

Yes. You can have the same look and feel as the main Settings application, by use of PreferenceActivity and preference XML files.


Android UI guidelines state that it is preferable and recommended to use a PreferenceActivity to handle all of your apps settings.

The beauty of using a PreferenceActivity is that it will automatically save the values to your apps SharedPreferences.

Another point to consider is if all the other apps are using PAs then they come to yours and have to handle the settings differently then it makes their experience more difficult and could cause them to look elsewhere for another app.

Hope that helps, good luck with it

0

精彩评论

暂无评论...
验证码 换一张
取 消