Update UI to use a smaller icon for ManageApplication page.
- Rewrite preference_app.xml to have a small icon - Update ApplicationViewHolder to hide/show summary row dynamically - but only do this for notification settings - this UI has empty summary for most row. For other UI, just keep the empty summary row until summary comes in. If we also hide/show summary row there will be a height change animation which is janky. Bug : 65182905 Fixes: 63582851 Test: robotests Change-Id: Ice67324f08c67e014a018dfc51e00fe4449036dd
This commit is contained in:
@@ -18,7 +18,6 @@ package com.android.settings.development;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -37,23 +36,21 @@ public class AppViewHolder {
|
||||
static public AppViewHolder createOrRecycle(LayoutInflater inflater, View convertView) {
|
||||
if (convertView == null) {
|
||||
convertView = inflater.inflate(R.layout.preference_app, null);
|
||||
inflater.inflate(R.layout.widget_text_views,
|
||||
(ViewGroup) convertView.findViewById(android.R.id.widget_frame));
|
||||
|
||||
// Creates a ViewHolder and store references to the two children views
|
||||
// we want to bind data to.
|
||||
AppViewHolder holder = new AppViewHolder();
|
||||
holder.rootView = convertView;
|
||||
holder.appName = (TextView) convertView.findViewById(android.R.id.title);
|
||||
holder.appIcon = (ImageView) convertView.findViewById(android.R.id.icon);
|
||||
holder.summary = (TextView) convertView.findViewById(R.id.widget_text1);
|
||||
holder.disabled = (TextView) convertView.findViewById(R.id.widget_text2);
|
||||
holder.appName = convertView.findViewById(android.R.id.title);
|
||||
holder.appIcon = convertView.findViewById(android.R.id.icon);
|
||||
holder.summary = convertView.findViewById(android.R.id.summary);
|
||||
holder.disabled = convertView.findViewById(R.id.appendix);
|
||||
convertView.setTag(holder);
|
||||
return holder;
|
||||
} else {
|
||||
// Get the ViewHolder back to get fast access to the TextView
|
||||
// and the ImageView.
|
||||
return (AppViewHolder)convertView.getTag();
|
||||
return (AppViewHolder) convertView.getTag();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user