And also solve the divider disapear problem.
Change-Id: I2f61ee39eb3e179f7a227e56a5dd677e6f415a2d
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<FrameLayout android:layout_width="fill_parent"
+ android:background="@android:color/black"
android:layout_height="fill_parent"
android:layout_toLeftOf="@+id/btn_gripper">
<ListView android:id="@+id/menu_view"
- android:cacheColorHint="#00000000"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<ListView android:id="@+id/sub_menu"
android:visibility="invisible"
- android:cacheColorHint="#00000000"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</FrameLayout>
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/title"
- android:background="#88111111"
+ android:background="#222"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_width="fill_parent"
? ((ListPreference) preference).getEntry()
: override);
summary.setEnabled(override == null);
+
+ // A little trick here, making the view focusable will eat
+ // both touch/key events on the view and thus make it looks
+ // like disabled.
+ convertView.setFocusable(override != null);
}
return convertView;
}
@Override
public boolean isEnabled(int position) {
Preference preference = mPreferences.get(position);
- if (preference instanceof PreferenceGroup) return false;
-
- return mOverride.get(preference.getKey()) == null;
+ return !(preference instanceof PreferenceGroup);
}
public int getCount() {