2013-07-02 3 views
7

मैं चेतावनी संवाद बहु चयन लेआउट को संशोधित करना चाहता हूं। मेरे कार्यक्रम के लिए मैं दो लाइन बहु-चयन आइटम चाहता हूं। मैंने स्रोत कोड में खोज की है और निम्नलिखित कोड स्निपेट पाया है। अब मैं यह नहीं ढूंढ पा रहा हूं कि निम्नलिखित लेआउट का स्रोत कोड कहां है।मुझे 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(); 
} 

उत्तर

7

फ़ाइल को "select_dialog_multichoice" कहा जाता है और लेआउट फ़ोल्डर के अंदर स्थित होता है। मेरी मशीन पर निरपेक्ष पथ इस तरह दिखता है:

C: \ Users \ d053380 \ AppData \ Local \ एंड्रॉयड \ Android-SDK \ प्लेटफार्मों \ android-14 \ डेटा \ रेस \ लेआउट

+0

एससीएनआर: यह निर्देशिका मेरे कंप्यूटर पर मौजूद नहीं है। – rekire

+0

यह गिटूब पर आधिकारिक एंड्रॉइड रिपोजिटरी में भी है: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/select_dialog_multichoice.xml – sled

0

मुझे लगता है कि आपके पास पहले से ही एओएसपी स्रोत पेड़ है। आप इसे नीचे दिए गए पथ में पा सकते हैं। ढांचे/आधार/कोर/res/res

संबंधित मुद्दे