7

アラート ダイアログの複数選択レイアウトを変更したい。私のプログラムでは、2行の複数選択項目が必要です。ソース コードを検索したところ、次のコード スニペットが見つかりました。次のレイアウトのソース コードがどこにあるのかわかりません。

public AlertController(Context context, DialogInterface di, Window window) {
    mContext = context;
    mDialogInterface = di;
    mWindow = window;
    mHandler = new ButtonHandler(di);

    TypedArray a = context.obtainStyledAttributes(null,
            com.android.internal.R.styleable.AlertDialog,
            com.android.internal.R.attr.alertDialogStyle, 0);

    mAlertDialogLayout = a.getResourceId(com.android.internal.R.styleable.AlertDialog_layout,
            com.android.internal.R.layout.alert_dialog);
    mListLayout = a.getResourceId(
            com.android.internal.R.styleable.AlertDialog_listLayout,
            com.android.internal.R.layout.select_dialog);
    mMultiChoiceItemLayout = a.getResourceId(
            com.android.internal.R.styleable.AlertDialog_multiChoiceItemLayout,
            com.android.internal.R.layout.select_dialog_multichoice);
    mSingleChoiceItemLayout = a.getResourceId(
            **com.android.internal.R.styleable.AlertDialog_singleChoiceItemLayout**,
            com.android.internal.R.layout.select_dialog_singlechoice);
    mListItemLayout = a.getResourceId(
            com.android.internal.R.styleable.AlertDialog_listItemLayout,
            com.android.internal.R.layout.select_dialog_item);

    a.recycle();
}
4

3 に答える 3

7

このファイルは「select_dialog_multichoice」と呼ばれ、layout フォルダー内にあります。私のマシンの絶対パスは次のようになります。

C:\Users\d053380\AppData\Local\Android\android-sdk\platforms\android-14\data\res\layout

于 2013-07-02T15:38:04.187 に答える
1

手動で値を入力できます: http://elastos.org/elorg_files/ReleaseDocs/ElastosOnlineDoc/html/classcom_1_1android_1_1internal_1_1_r.html

于 2013-09-22T02:52:23.930 に答える
0

AOSP ソース ツリーが既にあると仮定します。以下のパスで見つけることができます。フレームワーク/ベース/コア/レス/レス

于 2016-07-12T06:11:43.010 に答える