Setting 32x32dp for compact layout, bumped summary to name
This commit is contained in:
parent
89b15b534f
commit
d687b7341e
@ -9,6 +9,8 @@
|
||||
android:paddingRight="3dp"
|
||||
android:baselineAligned="false" >
|
||||
|
||||
<!-- Actual icon size is dependent on preferences and set in
|
||||
AppListAdapater.java:layoutIcon() -->
|
||||
<ImageView android:id="@+id/icon"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_width="48dp"
|
||||
@ -51,6 +53,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/icon" />
|
||||
|
||||
<TextView android:id="@+id/summary"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/name"
|
||||
android:layout_toRightOf="@id/icon" />
|
||||
|
||||
<TextView android:id="@+id/status"
|
||||
android:textSize="12sp"
|
||||
android:singleLine="true"
|
||||
@ -58,7 +68,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/icon"
|
||||
android:layout_below="@id/name" />
|
||||
android:layout_below="@id/summary" />
|
||||
|
||||
<TextView android:id="@+id/license"
|
||||
android:textSize="12sp"
|
||||
@ -70,14 +80,4 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignBaseline="@id/status" />
|
||||
|
||||
<!-- Some of the layout settings are set in
|
||||
AppListAdapater.java:layoutSummary() -->
|
||||
<TextView android:id="@+id/summary"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/status"
|
||||
android:layout_toRightOf="@id/icon" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="applist_summary_padding">3dp</dimen>
|
||||
<dimen name="applist_icon_normal_size">48dp</dimen>
|
||||
<dimen name="applist_icon_compact_size">32dp</dimen>
|
||||
</resources>
|
||||
|
@ -90,6 +90,7 @@ abstract public class AppListAdapter extends BaseAdapter {
|
||||
status.setVisibility(notVisibleOnCompact);
|
||||
license.setVisibility(notVisibleOnCompact);
|
||||
|
||||
layoutIcon(icon, compact);
|
||||
ImageLoader.getInstance().displayImage(app.iconUrl, icon,
|
||||
displayImageOptions);
|
||||
|
||||
@ -140,4 +141,18 @@ abstract public class AppListAdapter extends BaseAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
private void layoutIcon(ImageView icon, boolean compact) {
|
||||
int size = (int)mContext.getResources().getDimension((compact
|
||||
? R.dimen.applist_icon_compact_size
|
||||
: R.dimen.applist_icon_normal_size));
|
||||
|
||||
RelativeLayout.LayoutParams params =
|
||||
(RelativeLayout.LayoutParams)icon.getLayoutParams();
|
||||
|
||||
params.height = size;
|
||||
params.width = size;
|
||||
|
||||
icon.setLayoutParams(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user