mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 20:59:00 +00:00
improve touch feedback
This commit is contained in:
parent
400c5f2fcf
commit
acb84d60ab
17 changed files with 27 additions and 33 deletions
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/card_padding"/>
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false"
|
||||
android:paddingEnd="16dp">
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
android:layout_height="match_parent"
|
||||
tools:background="@color/red_10"
|
||||
android:focusable="true"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:contentDescription="@string/daily_item_checkbox">
|
||||
<View
|
||||
android:id="@+id/checkBoxBackground"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@
|
|||
<FrameLayout
|
||||
android:id="@+id/btnPlusWrapper"
|
||||
android:layout_width="@dimen/button_width"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:foreground="?selectableItemBackground">
|
||||
<View
|
||||
android:id="@+id/button_plus_circle_view"
|
||||
android:layout_width="24dp"
|
||||
|
|
@ -38,7 +39,7 @@
|
|||
style="@style/HabitButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight"
|
||||
android:background="?selectableItemBackground"
|
||||
android:contentDescription="@string/positive_habit_form" />
|
||||
</FrameLayout>
|
||||
<include layout="@layout/task_main_content" />
|
||||
|
|
@ -62,7 +63,8 @@
|
|||
<FrameLayout
|
||||
android:id="@+id/btnMinusWrapper"
|
||||
android:layout_width="@dimen/button_width"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:foreground="?selectableItemBackground">
|
||||
<View
|
||||
android:id="@+id/button_minus_circle_view"
|
||||
android:layout_width="24dp"
|
||||
|
|
@ -80,7 +82,6 @@
|
|||
style="@style/HabitButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight"
|
||||
android:contentDescription="@string/negative_habit_form" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/RowWrapper"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
tools:parentTag="android.widget.LinearLayout">
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginVertical="4dp"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:padding="12dp">
|
||||
|
||||
<TextView
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginVertical="4dp"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:padding="12dp"
|
||||
android:gravity="center">
|
||||
<ImageView
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
app:title="@string/habits"
|
||||
app:iconDrawable="@drawable/icon_habits"
|
||||
app:selectedIconDrawable="@drawable/icon_habits_selected"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingBottom="@dimen/spacing_small"/>
|
||||
<com.habitrpg.android.habitica.ui.views.navigation.BottomNavigationItem
|
||||
|
|
@ -67,6 +68,7 @@
|
|||
app:title="@string/dailies"
|
||||
app:iconDrawable="@drawable/icon_dailies"
|
||||
app:selectedIconDrawable="@drawable/icon_dailies_selected"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingBottom="@dimen/spacing_small"/>
|
||||
<androidx.legacy.widget.Space
|
||||
|
|
@ -81,6 +83,7 @@
|
|||
app:title="@string/todos"
|
||||
app:iconDrawable="@drawable/icon_todos"
|
||||
app:selectedIconDrawable="@drawable/icon_todos_selected"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingBottom="@dimen/spacing_small"/>
|
||||
<com.habitrpg.android.habitica.ui.views.navigation.BottomNavigationItem
|
||||
|
|
@ -91,6 +94,7 @@
|
|||
app:title="@string/rewards"
|
||||
app:iconDrawable="@drawable/icon_rewards"
|
||||
app:selectedIconDrawable="@drawable/icon_rewards_selected"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingBottom="@dimen/spacing_small"/>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/BottomMenu"
|
||||
android:clickable="false">
|
||||
<TextView
|
||||
android:id="@+id/title_view"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:layout_margin="@dimen/spacing_large">
|
||||
<ImageView
|
||||
android:id="@+id/positive_image_view"
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:layout_margin="@dimen/spacing_large">
|
||||
<ImageView
|
||||
android:id="@+id/negative_image_view"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
android:gravity="center"
|
||||
android:foreground="?selectableItemBackground">
|
||||
<ImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="57dp"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:paddingTop="@dimen/task_top_bottom_padding"
|
||||
android:paddingBottom="@dimen/task_top_bottom_padding"
|
||||
android:layout_marginEnd="@dimen/task_text_padding"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
android:layout_width="@dimen/button_width"
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/red_10"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:focusable="true"
|
||||
android:contentDescription="@string/todo_item_checkbox">
|
||||
<View
|
||||
|
|
|
|||
|
|
@ -36,5 +36,5 @@
|
|||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight_brand" />
|
||||
android:background="?selectableItemBackground" />
|
||||
</FrameLayout>
|
||||
|
|
@ -25,11 +25,11 @@
|
|||
android:scaleType="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight_brand" />
|
||||
android:background="?selectableItemBackground" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight_brand"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textSize="24sp"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
|
@ -44,11 +44,11 @@
|
|||
android:scaleType="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight_brand" />
|
||||
android:background="?selectableItemBackground" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight_brand"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textSize="24sp"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
|
|
|||
|
|
@ -37,5 +37,5 @@
|
|||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight_brand" />
|
||||
android:background="?selectableItemBackground" />
|
||||
</FrameLayout>
|
||||
|
|
@ -305,7 +305,7 @@
|
|||
|
||||
<style name="RowWrapper">
|
||||
<item name="android:padding">@dimen/row_padding</item>
|
||||
<item name="android:background">@drawable/selection_highlight</item>
|
||||
<item name="android:background">?selectableItemBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="RowText">
|
||||
|
|
@ -430,20 +430,6 @@
|
|||
<item name="android:letterSpacing">0.15</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomMenu">
|
||||
<item name="android:divider">?android:listDivider</item>
|
||||
<item name="android:showDividers">middle</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_medium</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomMenuItem">
|
||||
<item name="android:paddingStart">@dimen/bottom_menu_padding</item>
|
||||
<item name="android:paddingEnd">@dimen/bottom_menu_padding</item>
|
||||
<item name="android:paddingTop">@dimen/spacing_large</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_large</item>
|
||||
<item name="android:background">@drawable/selection_highlight</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomMenuItemText">
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
|
|
|
|||
Loading…
Reference in a new issue