Make install/uninstall/run/upgrade buttons not overlap last updated text

Instead of showing them below the icon, it now puts the icon + name +
author + last updated into a single layout which can grow if the app
name or author wraps to a second line. The buttons are now below this
additional layout.
This commit is contained in:
Peter Serwylo 2017-04-25 14:48:59 +10:00
parent 2a6dcb63bb
commit 4b70d81e5c

View File

@ -26,6 +26,13 @@
android:layout_marginRight="8dp"
>
<!-- Icon, Name, Author (optional), Updated date -->
<RelativeLayout
android:id="@+id/icon_and_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp">
<ImageView
android:id="@+id/icon"
android:layout_width="72dp"
@ -33,11 +40,11 @@
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:paddingBottom="8dp"
android:paddingRight="8dp"
android:paddingEnd="8dp"
android:src="@drawable/ic_repo_app_default" />
<!-- Name, Author (optional), Updated date -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -54,7 +61,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/DetailsAppTitleStyle"
tools:text="App Title" />
tools:text="Really Long App Title Which Wraps Around Onto the Second Line" />
<TextView
android:id="@+id/author"
@ -73,6 +80,9 @@
</LinearLayout>
</RelativeLayout>
<!-- Progress info -->
<RelativeLayout
android:id="@+id/progress_layout"
android:layout_width="match_parent"
@ -81,7 +91,8 @@
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentStart="true"
android:layout_below="@id/icon">
android:layout_below="@id/icon_and_name"
tools:visibility="gone">
<ImageView
android:id="@+id/progress_cancel"
@ -125,18 +136,19 @@
android:layout_toStartOf="@id/progress_cancel" />
</RelativeLayout>
<!-- Install, Uninstall, Upgrade, Run buttons -->
<LinearLayout
android:id="@+id/button_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/icon"
android:layout_below="@id/icon_and_name"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:paddingBottom="2dp"
android:clipToPadding="false"
android:visibility="gone"
android:visibility="visible"
>
<Button