2013-07-02 18 views
7

Chcę zmodyfikować układ wyboru wielu okien dialogowych alertów. Dla mojego programu chcę mieć element wyboru dwóch linii. Szukałem w kodzie źródłowym i znalazłem następujący fragment kodu. Teraz nie mogę znaleźć kodu źródłowego następujących układów.gdzie mogę znaleźć źródło com.android.internal.R.styleable.AlertDialog_multiChoiceItemLayout?

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(); 
} 

Odpowiedz

7

Plik nazywa się „select_dialog_multichoice” i znajduje się w folderze układu. Bezwzględna ścieżka na moim komputerze wygląda następująco:

C: \ Users \ d053380 \ AppData \ Local \ Android \ android-sdk platformy \ \ android 14 \ Data \ Res \ layout

+0

SCNR: Ten katalog nie istnieje na moim komputerze. – rekire

+0

jest również w oficjalnym repozytorium androida na github: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/select_dialog_multichoice.xml – sled

0

Zakładam, że masz już drzewo źródłowe AOSP. Można go znaleźć na ścieżce poniżej. frameworks/base/core/res/res

Powiązane problemy