BobStore/F-Droid/res/layout/app_details_header.xml
Daniel Martí be3148d0e7 Hide all apk download progress views equally
Two views weren't hidden by default, so they were taking up space before they
were needed. The java code already takes care of showing them when necessary.
2015-08-09 18:39:20 -07:00

162 lines
6.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2015 Nico Alt, nicoalt@posteo.org
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/icon_and_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal"
android:padding="2dp">
<ImageView
android:id="@+id/icon"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="center_vertical"
android:contentDescription="@string/app_icon"
android:scaleType="fitCenter"
tools:src="@drawable/ic_launcher" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:baselineAligned="false"
android:orientation="vertical"
android:layout_toRightOf="@id/icon"
android:paddingLeft="16dp"
android:paddingStart="16dp">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:ellipsize="end"
android:gravity="start"
android:singleLine="true"
android:textAlignment="viewStart"
android:textSize="17sp"
android:textStyle="bold"
tools:text="F-Droid" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginBottom="3dp"
android:layout_weight="1"
android:baselineAligned="false"
android:orientation="vertical">
<TextView
android:id="@+id/current_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:ellipsize="end"
android:gravity="start"
android:singleLine="true"
android:textAlignment="viewStart"
android:textSize="13sp"
tools:text="1.24" />
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:ellipsize="end"
android:gravity="start"
android:singleLine="true"
android:textAlignment="viewStart"
android:textSize="13sp"
tools:text="Version 1.23 installed" />
</LinearLayout>
<Button
android:id="@+id/btn_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="0"
android:baselineAligned="false"
tools:text="Open" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/icon"
android:gravity="center">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal" />
<TextView
android:id="@+id/progress_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_below="@id/progress_bar"
android:visibility="gone"
android:textSize="12sp"/>
<TextView
android:id="@+id/progress_percentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@id/progress_bar"
android:visibility="gone"
android:textSize="12sp"/>
</RelativeLayout>
<ImageButton
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:layout_weight="0"
android:visibility="gone"
android:src="@drawable/ic_clear"
android:background="@null"/>
</LinearLayout>
</RelativeLayout>