Files
android_packages_apps_Updater/res/layout/update_item_view.xml

108 lines
4.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:nextFocusRight="@+id/update_action">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingBottom="16dp"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:weightSum="1">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<RelativeLayout
android:id="@+id/build_layout_not_active"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true">
<TextView
android:id="@+id/build_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="8sp" />
<TextView
android:id="@+id/build_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/build_version" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/build_layout_active"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:visibility="invisible">
<TextView
android:id="@+id/build_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/build_info"
android:layout_gravity="center">
<ProgressBar
android:id="@+id/progress_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progress="30" />
<TextView
android:id="@+id/progress_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/progress_bar"
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_below="@id/progress_bar"
android:textSize="12sp" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="80dp"
android:layout_height="match_parent">
<ImageButton
android:id="@id/update_action"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/action_description_download"
android:nextFocusLeft="@id/card_view"
android:src="@drawable/ic_download" />
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>