मुझे एक अजीब समस्या का सामना करना पड़ रहा है, मैंने अपनी सूची दृश्य में एक कस्टम पंक्ति जोड़ा है जब मैं बटन पंक्ति को हटा रहा हूं चुनिंदा है, लेकिन जैसा कि मैं बटन जोड़ता हूं, मैं क्लिक करने में सक्षम नहीं हूं पंक्ति, कृपया नीचे एक्सएमएल देखें।बटन के साथ एंड्रॉइड लिस्ट व्यू चुनने योग्य नहीं है (क्लिक करने योग्य)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="77dp"
android:layout_height="77dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="18dp"
android:src="@drawable/company_logo" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="Idds sdsad "
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/imageView1"
android:layout_below="@+id/textView1"
android:textColor="#8b8989"
android:layout_marginLeft="5dp"
android:text="Tap to see detail"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:text="Button" />
मदद कृपया यह क्यों हो रहा है।
सेटिंग एंड्रॉइड: पंक्ति के लेआउट कंटेनर पर अवरोधक फोकसबिलिटी = "ब्लॉक डिस्कान्डेंट्स" मेरे लिए इस समस्या को हल करने के लिए पर्याप्त था। मुझे बटन की फोकस करने योग्य संपत्ति के साथ कुछ भी करने की ज़रूरत नहीं थी। – harmanjd
यहां तक कि बेहतर समाधान, क्योंकि यह अधिक घोषणात्मक और उच्च स्तर है। बहुत अच्छा। – Marchy