From 5786d014dce83e951873bf1cfbe71f9c256cd996 Mon Sep 17 00:00:00 2001 From: Aleksey Tulinov Date: Sun, 17 Nov 2013 06:42:33 +0200 Subject: [PATCH] Shifted summary to the right of icon to give icon more space, aligned status with license --- res/layout/applistitem.xml | 19 ++++++----- .../fdroid/fdroid/views/AppListAdapter.java | 33 ------------------- 2 files changed, 11 insertions(+), 41 deletions(-) diff --git a/res/layout/applistitem.xml b/res/layout/applistitem.xml index bd8be5f7c..79600a582 100644 --- a/res/layout/applistitem.xml +++ b/res/layout/applistitem.xml @@ -11,12 +11,13 @@ + android:layout_toRightOf="@id/icon" /> + android:layout_alignParentRight="true" + android:layout_alignBaseline="@id/status" /> + + android:layout_below="@id/status" + android:layout_toRightOf="@id/icon" /> diff --git a/src/org/fdroid/fdroid/views/AppListAdapter.java b/src/org/fdroid/fdroid/views/AppListAdapter.java index 1edb46ed9..5c5459b70 100644 --- a/src/org/fdroid/fdroid/views/AppListAdapter.java +++ b/src/org/fdroid/fdroid/views/AppListAdapter.java @@ -80,7 +80,6 @@ abstract public class AppListAdapter extends BaseAdapter { iconContainer.setVisibility(visibleOnCompact); status.setVisibility(notVisibleOnCompact); license.setVisibility(notVisibleOnCompact); - layoutSummary(summary); ImageLoader.getInstance().displayImage(app.iconUrl, icon); @@ -116,38 +115,6 @@ abstract public class AppListAdapter extends BaseAdapter { return convertView; } - /** - * In compact view, the summary sites next to the icon, below the name. - * In non-compact view, it sits under the icon, with some padding pushing - * it away from the left margin. - */ - private void layoutSummary(TextView summaryView) { - - if (Preferences.get().hasCompactLayout()) { - - RelativeLayout.LayoutParams summaryLayout = - new RelativeLayout.LayoutParams( - RelativeLayout.LayoutParams.WRAP_CONTENT, - RelativeLayout.LayoutParams.WRAP_CONTENT); - summaryLayout.addRule(RelativeLayout.BELOW, R.id.name); - summaryLayout.addRule(LayoutCompat.RelativeLayout.END_OF, R.id.icon); - summaryView.setLayoutParams(summaryLayout); - summaryView.setPadding(0,0,0,0); - - } else { - - RelativeLayout.LayoutParams summaryLayout = - new RelativeLayout.LayoutParams( - RelativeLayout.LayoutParams.MATCH_PARENT, - RelativeLayout.LayoutParams.WRAP_CONTENT); - summaryLayout.addRule(RelativeLayout.BELOW, R.id.icon); - summaryView.setLayoutParams(summaryLayout); - float padding = mContext.getResources().getDimension(R.dimen.applist_summary_padding); - summaryView.setPadding((int)padding, 0, 0, 0); - - } - } - private String getVersionInfo(DB.App app) { if (app.installedVersion != null) { if (app.toUpdate) {