mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-10-14 19:27:09 -04:00
Main screen: scroll, and size from the window rather than the panel
On a landscape phone the install button sat under the navigation bar with no way to reach it. The screen now scrolls, everything on it is smaller, and the side gutter grows with the window width (24dp, 96dp from 600dp, 240dp from 960dp) so the buttons stay a sensible width on a wide panel instead of spanning it. The logo is the icon clipped to a circle; shown raw, an adaptive icon is a bare square.
This commit is contained in:
1 parent
f86b64b18e
commit
b27a4f5b31
5 files changed
+111
-74
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
@@ -1,84 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<!--
|
||||
Scrolls, and sizes itself from dimens that follow the window width: the first cut of this
|
||||
screen put the install button under the navigation bar on a landscape phone with no way to
|
||||
reach it. Everything here is small on purpose — it is a launcher, not the app.
|
||||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="32dp"
|
||||
android:background="#FF101418">
|
||||
android:background="#FF101418"
|
||||
android:fillViewport="true"
|
||||
android:fitsSystemWindows="true"
|
||||
android:scrollbars="none">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28sp"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/subtitle"
|
||||
android:textColor="#FF8899A6"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginBottom="28dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFDDDDDD"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/detail"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="#FF8899A6"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp" />
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingStart="@dimen/page_side"
|
||||
android:paddingEnd="@dimen/page_side"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:max="100"
|
||||
android:visibility="gone" />
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="@dimen/logo_size"
|
||||
android:layout_height="@dimen/logo_size"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:src="@drawable/logo" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/play"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:text="@string/play" />
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/runtime"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/install_runtime" />
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/subtitle"
|
||||
android:textColor="#FF8899A6"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="18dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/credits"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/credits_line"
|
||||
android:textColor="#FF667788"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFDDDDDD"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="#FF8899A6"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:max="100"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/play"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:minHeight="40dp"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/play" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/runtime"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:minHeight="40dp"
|
||||
android:textSize="13sp"
|
||||
android:text="@string/install_runtime" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/credits"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:padding="6dp"
|
||||
android:text="@string/credits_line"
|
||||
android:textColor="#FF667788"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="page_side">96dp</dimen>
|
||||
<dimen name="logo_size">80dp</dimen>
|
||||
</resources>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="page_side">240dp</dimen>
|
||||
<dimen name="logo_size">88dp</dimen>
|
||||
</resources>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Side gutter of the main screen. Grows with the window so the buttons stay a readable
|
||||
width on a landscape phone or a tablet instead of spanning the whole panel. -->
|
||||
<dimen name="page_side">24dp</dimen>
|
||||
<dimen name="logo_size">72dp</dimen>
|
||||
</resources>
|
||||
Reference in new issue
Block a user