(2011-07の一覧)
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
2011-07-04 Mon (他の年の同じ日: 2004 2005)
 PreferenceのEditTextとListは文字列だよ 
2011-07-04-1 / カテゴリ: [Android] / [permlink]
ListPreference で文字列しか使用できないのは、内部処理がテキスト配列として認識しているため。
同じように、EditTextPreferenceがテキストonlyなのは、内部処理がテキスト扱いのため。
    public ListPreference(Context context, AttributeSet attrs) {
        super(context, attrs);
        TypedArray a = context.obtainStyledAttributes(attrs,
                com.android.internal.R.styleable.ListPreference, 0, 0);
        mEntries = a.getTextArray(com.android.internal.R.styleable.ListPreference_entries);
        mEntryValues = a.getTextArray(com.android.internal.R.styleable.ListPreference_entryValues);
        a.recycle();
同じように、EditTextPreferenceがテキストonlyなのは、内部処理がテキスト扱いのため。
    public void setText(String text) {
        final boolean wasBlocking = shouldDisableDependents();
        mText = text;
        persistString(text);
        final boolean isBlocking = shouldDisableDependents();
        if (isBlocking != wasBlocking) {
            notifyDependencyChange(isBlocking);
        }
    }
    protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
        setText(restoreValue ? getPersistedString(mText) : (String) defaultValue);
    }
Referrer (Inside): 
[2011-07-03-1] [2011-06-08-1]
[
コメント  ]
2013 : 01 02 03 04 05 06 07 08 09 10 11 12 
2012 : 01 02 03 04 05 06 07 08 09 10 11 12 
2011 : 01 02 03 04 05 06 07 08 09 10 11 12 
2010 : 01 02 03 04 05 06 07 08 09 10 11 12 
2009 : 01 02 03 04 05 06 07 08 09 10 11 12 
2008 : 01 02 03 04 05 06 07 08 09 10 11 12 
2007 : 01 02 03 04 05 06 07 08 09 10 11 12 
2006 : 01 02 03 04 05 06 07 08 09 10 11 12 
2005 : 01 02 03 04 05 06 07 08 09 10 11 12 
2004 : 01 02 03 04 05 06 07 08 09 10 11 12 
最終更新時間: 2013-05-02 16:12
