2013-07-02 9 views
7

Ich möchte Alert Dialog Multi-Select-Layout ändern. Für mein Programm möchte ich zwei Zeilen Multi-Select-Element. Ich habe im Quellcode gesucht und folgendes Code-Snippet gefunden. Jetzt kann ich nicht finden, wo der Quellcode der folgenden Layouts ist.Wo finde ich die Quelle von 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(); 
} 

Antwort

7

Die Datei heißt "select_dialog_multichoice" und befindet sich im Layoutordner. Der absolute Pfad auf meinem Rechner sieht wie folgt aus:

C: \ Benutzer \ d053380 \ AppData \ Local \ Android \ android-sdk \ Plattformen \ android-14 \ data \ res \ layout

+0

SCNR: Dieses Verzeichnis existiert nicht auf meinem Computer. – rekire

+0

ist es auch im offiziellen Android-Repository auf GitHub: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/select_dialog_multichoice.xml – sled

0

Ich nehme an, dass Sie AOSP Quellbaum bereits haben. Sie finden es im folgenden Pfad. Frameworks/Base/Core/Res/Res