OSDN Git Service

Use CheckableLinearLayout for Use USB for dialog's item.
authorDaichi Hirono <hirono@google.com>
Thu, 17 Mar 2016 06:57:36 +0000 (15:57 +0900)
committerDaichi Hirono <hirono@google.com>
Thu, 17 Mar 2016 06:57:36 +0000 (15:57 +0900)
The root of "Use USB for" dialog's item is CheckableLinearLayout, which
defers the check state to direct children. However previously we had
CheckedTextView not just under CheckableLinearLayout. The structure
looks like:

Root CheckableLinearLayout -> LinearLayout -> CheckedTextView

The CL replaces the second child LinearLayout with CheckableLinearLayout
so that we can defer the state to CheckedTextView.

BUG=27708922

Change-Id: If0491235eac0a82bcb07e31856aa6b9535930fb2

res/layout/restricted_radio_with_summary.xml

index 399d11d..55f158c 100644 (file)
@@ -23,7 +23,7 @@
     android:background="?android:attr/selectableItemBackground"
     android:minHeight="?android:attr/listPreferredItemHeightSmall">
 
-    <LinearLayout
+    <com.android.settings.CheckableLinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"
@@ -47,7 +47,7 @@
             android:src="@drawable/ic_info"
             android:layout_marginLeft="@dimen/restricted_icon_padding"
             android:visibility="gone" />
-    </LinearLayout>
+    </com.android.settings.CheckableLinearLayout>
 
 
     <TextView android:id="@android:id/summary"