【问题标题】:I want to know how i can read the status of my preferences.xml checkbox using appcelerator titanium我想知道如何使用 appcelerator Titan 读取我的preferences.xml 复选框的状态
【发布时间】:2011-08-08 05:49:29
【问题描述】:

我正在使用 Titanium Appcelerator 为 Android 构建应用程序。我已经成功地使用下面的preferences.xml 创建了一个偏好屏幕。我试图弄清楚如何查看复选框是否被选中。

 <?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>

【问题讨论】:

    标签: android titanium appcelerator appcelerator-mobile titanium-mobile


    【解决方案1】:

    我相信它可以被视为您执行Ti.App.Properties.getString('Utrecht')Ti.App.Properties.getBool('Utrecht') 的属性

    另见http://developer.appcelerator.com/question/99541/where-is-android-app-property-list-in-emulator

    【讨论】:

    • 我可以直接从 app.js 使用Ti.App.Properties.getBool('Utrecht') 来获取我的preference.xml 的布尔状态吗?
    猜你喜欢
    • 2012-05-17
    • 1970-01-01
    • 1970-01-01
    • 2015-06-29
    • 1970-01-01
    • 2021-12-18
    • 1970-01-01
    • 2021-12-15
    • 2022-01-03
    相关资源
    最近更新 更多