I'm using Titanium Appcelerator to build a App for Android. And i have succeeded in creating a preference screen with the preferences.xml below. I'm trying to figure out how i can see if the checkbox is selected or not.
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="Instellingen kortingen">
<PreferenceCategory android:title="Plaats">
<CheckBoxPreference
android:title="Almere"
android:defaultValue="false"
android:key="checkbox" />
<CheckBoxPreference
开发者_如何学运维 android:title="Amsterdam"
android:defaultValue="false"
android:key="checkbox" />
<CheckBoxPreference
android:title="Lelystad"
android:defaultValue="false"
android:key="checkbox" />
<CheckBoxPreference
android:title="Utrecht"
android:defaultValue="false"
android:key="checkbox" />
</PreferenceCategory>
I believe it can be treated as a property where you do a Ti.App.Properties.getString('Utrecht')
OR Ti.App.Properties.getBool('Utrecht')
see this also http://developer.appcelerator.com/question/99541/where-is-android-app-property-list-in-emulator
精彩评论