"Dsiabled" text aligns to textview right
Change-Id: Id0c2b9de8355e977d1954998266079ba065c8c0b Fixes: 112123106 Test: manual
This commit is contained in:
@@ -73,8 +73,8 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder {
|
|||||||
static View newView(ViewGroup parent, boolean twoTarget) {
|
static View newView(ViewGroup parent, boolean twoTarget) {
|
||||||
ViewGroup view = (ViewGroup) LayoutInflater.from(parent.getContext())
|
ViewGroup view = (ViewGroup) LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.preference_app, parent, false);
|
.inflate(R.layout.preference_app, parent, false);
|
||||||
if (twoTarget) {
|
|
||||||
final ViewGroup widgetFrame = view.findViewById(android.R.id.widget_frame);
|
final ViewGroup widgetFrame = view.findViewById(android.R.id.widget_frame);
|
||||||
|
if (twoTarget) {
|
||||||
if (widgetFrame != null) {
|
if (widgetFrame != null) {
|
||||||
LayoutInflater.from(parent.getContext())
|
LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.preference_widget_master_switch, widgetFrame, true);
|
.inflate(R.layout.preference_widget_master_switch, widgetFrame, true);
|
||||||
@@ -84,6 +84,8 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder {
|
|||||||
// second to last, before widget frame
|
// second to last, before widget frame
|
||||||
view.addView(divider, view.getChildCount() - 1);
|
view.addView(divider, view.getChildCount() - 1);
|
||||||
}
|
}
|
||||||
|
} else if (widgetFrame != null) {
|
||||||
|
widgetFrame.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user