mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
slightly optimize layouts
This commit is contained in:
parent
a8d533e570
commit
0e99d17812
9 changed files with 90 additions and 124 deletions
|
|
@ -1,32 +1,29 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/chip"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="52dp"
|
||||||
|
style="@style/Chip">
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/checkbox_wrapper"
|
||||||
|
android:layout_width="34dp"
|
||||||
|
android:layout_height="34dp"
|
||||||
|
android:background="@drawable/circle"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:foreground="@drawable/task_score_feedback">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/checkbox"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:background="@drawable/daily_square"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:layout_gravity="center"/>
|
||||||
|
</FrameLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/chip"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="52dp"
|
android:orientation="vertical">
|
||||||
style="@style/Chip">
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/checkbox_wrapper"
|
|
||||||
android:layout_width="34dp"
|
|
||||||
android:layout_height="34dp"
|
|
||||||
android:background="@drawable/circle"
|
|
||||||
android:layout_marginEnd="6dp"
|
|
||||||
android:foreground="@drawable/task_score_feedback">
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/checkbox"
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:background="@drawable/daily_square"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:layout_gravity="center"/>
|
|
||||||
</FrameLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
<com.habitrpg.wearos.habitica.ui.views.TaskTextView
|
<com.habitrpg.wearos.habitica.ui.views.TaskTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
@ -36,6 +33,5 @@
|
||||||
tools:text="Task Title that is long and wraps and"
|
tools:text="Task Title that is long and wraps and"
|
||||||
android:textColor="@color/watch_white"
|
android:textColor="@color/watch_white"
|
||||||
style="@style/Text.Body1"/>
|
style="@style/Text.Body1"/>
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</LinearLayout>
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="45dp">
|
android:layout_height="45dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="25dp"
|
android:layout_width="25dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="25dp"
|
||||||
android:layout_above="@id/text_view"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:src="@mipmap/ic_launcher" />
|
android:src="@mipmap/ic_launcher" />
|
||||||
|
|
@ -17,11 +16,9 @@
|
||||||
android:id="@+id/text_view"
|
android:id="@+id/text_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:fontFamily="sans-serif"
|
android:fontFamily="sans-serif"
|
||||||
android:textColor="@color/watch_purple_200"
|
android:textColor="@color/watch_purple_200"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:text="Footer Text" />
|
tools:text="Footer Text" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
@ -1,39 +1,38 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="52dp"
|
||||||
|
style="@style/Chip">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/habit_button"
|
||||||
|
android:layout_width="34dp"
|
||||||
|
android:layout_height="34dp"
|
||||||
|
android:background="@drawable/circle"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_medium"
|
||||||
|
android:foreground="@drawable/task_score_feedback">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/habit_button_icon"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="center" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="52dp"
|
android:layout_height="wrap_content"
|
||||||
style="@style/Chip">
|
android:orientation="vertical">
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/habit_button"
|
<com.habitrpg.wearos.habitica.ui.views.TaskTextView
|
||||||
android:layout_width="34dp"
|
android:id="@+id/title"
|
||||||
android:layout_height="34dp"
|
|
||||||
android:background="@drawable/circle"
|
|
||||||
android:layout_marginEnd="@dimen/spacing_medium"
|
|
||||||
android:foreground="@drawable/task_score_feedback"
|
|
||||||
>
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/habit_button_icon"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="center"/>
|
|
||||||
</FrameLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:maxLines="2"
|
||||||
<com.habitrpg.wearos.habitica.ui.views.TaskTextView
|
android:ellipsize="end"
|
||||||
android:id="@+id/title"
|
tools:text="Task Title"
|
||||||
android:layout_width="wrap_content"
|
android:textColor="@color/watch_white"
|
||||||
android:layout_height="wrap_content"
|
style="@style/Text.Body1" />
|
||||||
android:maxLines="2"
|
|
||||||
android:ellipsize="end"
|
|
||||||
tools:text="Task Title"
|
|
||||||
android:textColor="@color/watch_white"
|
|
||||||
style="@style/Text.Body1"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</LinearLayout>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical"
|
android:id="@+id/text_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="6dp">
|
android:layout_gravity="center"
|
||||||
<TextView
|
android:gravity="center"
|
||||||
android:id="@+id/text_view"
|
android:textColor="@color/watch_purple_200"
|
||||||
android:layout_width="wrap_content"
|
tools:text="Header Text"
|
||||||
android:layout_height="wrap_content"
|
style="@style/Text.SubHeader1"
|
||||||
android:layout_gravity="center"
|
android:padding="6dp"/>
|
||||||
android:textColor="@color/watch_purple_200"
|
|
||||||
tools:text="Header Text"
|
|
||||||
style="@style/Text.SubHeader1"/>
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/row_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
<LinearLayout
|
android:orientation="horizontal"
|
||||||
android:id="@+id/row_container"
|
style="@style/Chip">
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
style="@style/Chip">
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/icon_view"
|
android:id="@+id/icon_view"
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
|
|
@ -23,12 +20,11 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/watch_white"
|
android:textColor="@color/watch_white"
|
||||||
style="@style/Text.SubHeader1"/>
|
style="@style/Text.SubHeader1"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/detail_view"
|
android:id="@+id/detail_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/Text.Body1"
|
style="@style/Text.Body1"
|
||||||
android:textColor="@color/watch_purple_200"
|
android:textColor="@color/watch_purple_200"
|
||||||
android:layout_marginEnd="@dimen/spacing_medium"/>
|
android:layout_marginEnd="@dimen/spacing_medium"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
style="@style/Chip">
|
style="@style/Chip">
|
||||||
|
|
@ -17,4 +14,3 @@
|
||||||
android:textColor="@color/watch_white"
|
android:textColor="@color/watch_white"
|
||||||
style="@style/Text.Body1"/>
|
style="@style/Text.Body1"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
|
||||||
|
|
@ -1,16 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="6dp">
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/text_view"
|
android:id="@+id/text_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
android:textColor="@color/watch_purple_200"
|
android:textColor="@color/watch_purple_200"
|
||||||
tools:text="Header Text"
|
tools:text="Header Text"
|
||||||
style="@style/Text.Body1"/>
|
style="@style/Text.Body1"
|
||||||
</FrameLayout>
|
android:layout_margin="6dp"/>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center">
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/row"
|
android:id="@+id/row"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
@ -23,5 +18,4 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
style="@style/Chip">
|
style="@style/Chip">
|
||||||
|
|
@ -36,5 +33,4 @@
|
||||||
android:textColor="@color/watch_white"
|
android:textColor="@color/watch_white"
|
||||||
style="@style/Text.Body1"/>
|
style="@style/Text.Body1"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
|
||||||
Loading…
Reference in a new issue