mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 11:46:32 +00:00
Improve edge-to-edge handling
This commit is contained in:
parent
ed65bcec6b
commit
7295602675
61 changed files with 828 additions and 602 deletions
|
|
@ -70,27 +70,23 @@
|
|||
android:name=".ui.activities.ArmoireActivity"
|
||||
android:parentActivityName=".ui.activities.MainActivity"
|
||||
android:label="@string/armoire"
|
||||
android:screenOrientation="unspecified"
|
||||
tools:ignore="UnusedAttribute">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.DeathActivity"
|
||||
android:parentActivityName=".ui.activities.MainActivity"
|
||||
android:label="@string/faint_header"
|
||||
android:screenOrientation="unspecified"
|
||||
tools:ignore="UnusedAttribute">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.BirthdayActivity"
|
||||
android:parentActivityName=".ui.activities.MainActivity"
|
||||
android:screenOrientation="unspecified"
|
||||
tools:ignore="UnusedAttribute">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.NotificationsActivity"
|
||||
android:parentActivityName=".ui.activities.MainActivity"
|
||||
android:label="@string/notifications"
|
||||
android:screenOrientation="unspecified"
|
||||
tools:ignore="UnusedAttribute">
|
||||
</activity>
|
||||
<activity
|
||||
|
|
@ -103,14 +99,12 @@
|
|||
<activity
|
||||
android:name=".ui.activities.LoginActivity"
|
||||
android:label="@string/LoginActivityName"
|
||||
android:screenOrientation="unspecified"
|
||||
android:configChanges="screenSize | smallestScreenSize | screenLayout | orientation"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.AdventureGuideActivity"
|
||||
android:label=""
|
||||
android:screenOrientation="unspecified"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -21,6 +23,7 @@
|
|||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbarSize="3dp"
|
||||
|
|
@ -106,4 +109,4 @@
|
|||
android:orientation="vertical" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -21,6 +23,7 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
|
@ -216,14 +219,14 @@
|
|||
tools:visibility="visible"/>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:background="?attr/colorContentBackground"
|
||||
android:id="@+id/create_challenge_task_list">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
</com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@
|
|||
android:orientation="vertical"
|
||||
tools:context="com.habitrpg.android.habitica.ui.activities.FixCharacterValuesActivity">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
android:orientation="vertical"
|
||||
tools:context="com.habitrpg.android.habitica.ui.activities.FixCharacterValuesActivity">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -22,7 +24,7 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="false">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
|
|
|||
|
|
@ -10,9 +10,11 @@
|
|||
android:orientation="vertical"
|
||||
android:background="?attr/colorContentBackground">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@
|
|||
tools:context="com.habitrpg.android.habitica.ui.activities.FixCharacterValuesActivity"
|
||||
android:background="@color/brand_300">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
|
@ -54,6 +56,7 @@
|
|||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -23,6 +25,7 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/spacing_large">
|
||||
|
|
@ -31,4 +34,4 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -1,146 +1,154 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".ui.activities.MainActivity">
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/navigation" />
|
||||
tools:context=".ui.activities.MainActivity">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/navigation" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_toolbar"
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:titleEnabled="false"
|
||||
app:contentScrim="?attr/headerBackgroundColor"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
app:expandedTitleMarginEnd="?attr/actionBarSize"
|
||||
app:expandedTitleMarginStart="0dp"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
android:background="?attr/headerBackgroundColor">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:titleEnabled="false"
|
||||
app:contentScrim="?attr/headerBackgroundColor"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
app:expandedTitleMarginEnd="?attr/actionBarSize"
|
||||
app:expandedTitleMarginStart="0dp"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
android:clipToPadding="true"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/header_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:layout_marginEnd="@dimen/header_border_spacing"
|
||||
android:layout_marginStart="@dimen/header_border_spacing"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
app:layout_collapseMode="parallax"/>
|
||||
android:id="@+id/header_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:layout_marginEnd="@dimen/header_border_spacing"
|
||||
android:layout_marginStart="@dimen/header_border_spacing"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
app:layout_collapseMode="parallax" />
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
style="@style/Toolbar.Modern"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
app:layout_collapseMode="pin"
|
||||
app:popupTheme="@style/Theme.AppCompat.DayNight"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp">
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
style="@style/Toolbar.Modern"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
app:layout_collapseMode="pin"
|
||||
app:popupTheme="@style/Theme.AppCompat.DayNight"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="16dp">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentStart="true"
|
||||
style="@style/ToolbarTitle"
|
||||
tools:text="Habitica"
|
||||
android:background="@drawable/teams_title_bg"
|
||||
android:paddingHorizontal="@dimen/spacing_large"
|
||||
android:paddingVertical="1dp"
|
||||
/>
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentStart="true"
|
||||
style="@style/ToolbarTitle"
|
||||
tools:text="Habitica"
|
||||
android:background="@drawable/teams_title_bg"
|
||||
android:paddingHorizontal="@dimen/spacing_large"
|
||||
android:paddingVertical="1dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbar_accessory_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
android:id="@+id/toolbar_accessory_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/detail_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?headerOffsetColor"
|
||||
android:elevation="0dp"
|
||||
android:fillViewport="false"
|
||||
app:layout_anchor="@+id/collapsing_toolbar"
|
||||
app:layout_anchorGravity="bottom"
|
||||
app:layout_collapseMode="pin"
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorColor="?textColorPrimary"
|
||||
app:tabSelectedTextColor="?textColorPrimary"
|
||||
app:tabMode="fixed" />
|
||||
android:id="@+id/detail_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?headerOffsetColor"
|
||||
android:elevation="0dp"
|
||||
android:fillViewport="false"
|
||||
app:layout_anchor="@+id/collapsing_toolbar"
|
||||
app:layout_anchorGravity="bottom"
|
||||
app:layout_collapseMode="pin"
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorColor="?textColorPrimary"
|
||||
app:tabSelectedTextColor="?textColorPrimary"
|
||||
app:tabMode="fixed" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/connection_issue_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="2dp"
|
||||
android:paddingHorizontal="@dimen/spacing_medium"
|
||||
android:background="@color/error_banner_background"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/connection_issue_textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/connection_issue_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/maroon_500"
|
||||
android:textSize="14sp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/internal_error_api"
|
||||
app:drawableStartCompat="@drawable/ic_warning_black"
|
||||
app:drawableTint="@color/maroon_500"
|
||||
android:drawablePadding="4dp"/>
|
||||
android:paddingVertical="2dp"
|
||||
android:paddingHorizontal="@dimen/spacing_medium"
|
||||
android:background="@color/error_banner_background"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/connection_issue_textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/maroon_500"
|
||||
android:textSize="14sp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/internal_error_api"
|
||||
app:drawableStartCompat="@drawable/ic_warning_black"
|
||||
app:drawableTint="@color/maroon_500"
|
||||
android:drawablePadding="4dp" />
|
||||
</FrameLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/overlayFrameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom|center_horizontal">
|
||||
<FrameLayout
|
||||
android:id="@+id/snackbar_container"
|
||||
android:id="@+id/overlayFrameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:paddingBottom="50dp"/>
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom|center_horizontal">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/snackbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:paddingBottom="50dp" />
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.navigation.HabiticaBottomNavigationView
|
||||
android:id="@+id/bottom_navigation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
android:id="@+id/bottom_navigation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
</RelativeLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
tools:context=".ui.activities.NotificationsActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -37,6 +39,7 @@
|
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
|
|
|
|||
|
|
@ -10,9 +10,11 @@
|
|||
android:orientation="vertical"
|
||||
android:background="?attr/colorContentBackground">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
|
|
|||
|
|
@ -7,9 +7,11 @@
|
|||
tools:context=".ui.activities.PrefsActivity"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
|
@ -41,4 +43,4 @@
|
|||
android:paddingBottom="68dp"/>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
app:behavior_peekHeight="350dp"
|
||||
app:behavior_hideable="true">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:elevation="0dp">
|
||||
|
|
@ -61,6 +62,7 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="0dp">
|
||||
|
|
@ -129,4 +131,4 @@
|
|||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -24,7 +26,7 @@
|
|||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -34,4 +36,4 @@
|
|||
android:scrollbars="vertical" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -46,4 +48,4 @@
|
|||
android:layout_weight="1"
|
||||
android:background="?attr/colorContentBackground" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -1,285 +1,321 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/colorTintedBackground"
|
||||
tools:context="com.habitrpg.android.habitica.ui.activities.FixCharacterValuesActivity">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/colorTintedBackground"
|
||||
tools:context="com.habitrpg.android.habitica.ui.activities.FixCharacterValuesActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:background="?attr/headerBackgroundColor"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="@style/Toolbar"
|
||||
style="@style/ToolbarTitleStyle"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="@style/Toolbar"
|
||||
style="@style/ToolbarTitleStyle"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/spacing_large">
|
||||
<LinearLayout
|
||||
android:id="@+id/upper_text_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@color/brand_300"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/spacing_large">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/text_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TaskFormTextInputLayoutAppearance"
|
||||
app:boxStrokeWidth="2dp"
|
||||
app:boxStrokeWidthFocused="2dp"
|
||||
app:hintTextColor="?colorPrimaryText"
|
||||
android:backgroundTint="?attr/colorPrimaryText"
|
||||
android:hint="@string/task_title"
|
||||
android:alpha="0.75">
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/text_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/colorPrimaryText"
|
||||
android:inputType="textCapSentences|textAutoCorrect"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/notes_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TaskFormTextInputLayoutAppearance"
|
||||
app:boxStrokeWidth="2dp"
|
||||
app:boxStrokeWidthFocused="2dp"
|
||||
android:backgroundTint="?attr/colorPrimaryText"
|
||||
app:hintTextColor="?colorPrimaryText"
|
||||
android:hint="@string/notes"
|
||||
android:layout_marginTop="@dimen/spacing_large"
|
||||
android:alpha="0.75">
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/notes_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="3"
|
||||
android:gravity="top"
|
||||
android:textColor="?attr/colorPrimaryText"
|
||||
android:inputType="textCapSentences|textAutoCorrect|textMultiLine"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<TextView
|
||||
android:id="@+id/challenge_name_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
style="@style/Caption1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_primary"
|
||||
tools:visibility="visible"
|
||||
tools:text="Challenge Name"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="@dimen/spacing_large"
|
||||
android:layout_marginEnd="@dimen/spacing_large">
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/habit_scoring_buttons"
|
||||
android:id="@+id/upper_text_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp" />
|
||||
<TextView
|
||||
android:id="@+id/reward_value_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cost"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
<com.habitrpg.android.habitica.ui.views.tasks.form.StepperValueFormView
|
||||
android:id="@+id/reward_value"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp" />
|
||||
<TextView
|
||||
android:id="@+id/checklist_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/checklist"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
<com.habitrpg.android.habitica.ui.views.tasks.form.ChecklistContainer
|
||||
android:id="@+id/checklist_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/task_difficulty_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/difficulty"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/task_difficulty_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/assign_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/assign"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/assign_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/habit_reset_streak_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_counter"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/habit_reset_streak_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/scheduling_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/scheduling"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
<com.habitrpg.android.habitica.ui.views.tasks.form.TaskSchedulingControls
|
||||
android:id="@+id/task_scheduling_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/adjust_streak_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/adjust_counter"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/adjust_streak_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayoutAppearance"
|
||||
android:id="@+id/habit_adjust_positive_input_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/task_form_control_bg"
|
||||
android:hint="@string/positive_habit_form"
|
||||
android:layout_weight="1">
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/habit_adjust_positive_streak_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:inputType="number" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<Space
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="wrap_content" />
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayoutAppearance"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/negative_habit_form"
|
||||
android:background="@drawable/task_form_control_bg"
|
||||
android:layout_weight="1">
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/habit_adjust_negative_streak_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:inputType="number"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
tools:background="@color/brand_300"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large"
|
||||
android:paddingBottom="@dimen/spacing_large">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reminders_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reminders"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/notifications_disabled_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_medium">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/notifications_enabled_text"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/text_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:text="@string/push_notification_system_settings_reminders"
|
||||
android:textColor="@color/text_quad"
|
||||
android:textSize="12sp" />
|
||||
</RelativeLayout>
|
||||
style="@style/TaskFormTextInputLayoutAppearance"
|
||||
app:boxStrokeWidth="2dp"
|
||||
app:boxStrokeWidthFocused="2dp"
|
||||
app:hintTextColor="?colorPrimaryText"
|
||||
android:backgroundTint="?attr/colorPrimaryText"
|
||||
android:hint="@string/task_title"
|
||||
android:alpha="0.75">
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.tasks.form.ReminderContainer
|
||||
android:id="@+id/reminders_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/text_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/colorPrimaryText"
|
||||
android:inputType="textCapSentences|textAutoCorrect" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/exact_alarm_disabled_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:background="@drawable/layout_rounded_bg_yellow_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exact_alarm_disabled_text"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/notes_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
style="@style/TaskFormTextInputLayoutAppearance"
|
||||
app:boxStrokeWidth="2dp"
|
||||
app:boxStrokeWidthFocused="2dp"
|
||||
android:backgroundTint="?attr/colorPrimaryText"
|
||||
app:hintTextColor="?colorPrimaryText"
|
||||
android:hint="@string/notes"
|
||||
android:layout_marginTop="@dimen/spacing_large"
|
||||
android:alpha="0.75">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/notes_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="3"
|
||||
android:gravity="top"
|
||||
android:textColor="?attr/colorPrimaryText"
|
||||
android:inputType="textCapSentences|textAutoCorrect|textMultiLine" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/challenge_name_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
style="@style/Caption1"
|
||||
android:gravity="center"
|
||||
android:fontFamily="@string/font_family_medium"
|
||||
android:text="@string/exact_alarm_system_settings_reminders"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
android:textColor="@color/text_primary"
|
||||
tools:visibility="visible"
|
||||
tools:text="Challenge Name" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/stat_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/assigned_stat"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/stats_selector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tags_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tags"
|
||||
style="@style/TaskFormSectionheader"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/tags_wrapper"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="middle"
|
||||
android:divider="@drawable/tag_divider"/>
|
||||
android:layout_marginStart="@dimen/spacing_large"
|
||||
android:layout_marginEnd="@dimen/spacing_large">
|
||||
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/habit_scoring_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reward_value_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cost"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.tasks.form.StepperValueFormView
|
||||
android:id="@+id/reward_value"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/checklist_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/checklist"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.tasks.form.ChecklistContainer
|
||||
android:id="@+id/checklist_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/task_difficulty_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/difficulty"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/task_difficulty_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/assign_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/assign"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/assign_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/habit_reset_streak_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_counter"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/habit_reset_streak_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scheduling_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/scheduling"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.tasks.form.TaskSchedulingControls
|
||||
android:id="@+id/task_scheduling_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/adjust_streak_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/adjust_counter"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/adjust_streak_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayoutAppearance"
|
||||
android:id="@+id/habit_adjust_positive_input_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/task_form_control_bg"
|
||||
android:hint="@string/positive_habit_form"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/habit_adjust_positive_streak_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:inputType="number" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayoutAppearance"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/negative_habit_form"
|
||||
android:background="@drawable/task_form_control_bg"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/habit_adjust_negative_streak_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:inputType="number" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reminders_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reminders"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/notifications_disabled_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_medium">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/notifications_enabled_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:text="@string/push_notification_system_settings_reminders"
|
||||
android:textColor="@color/text_quad"
|
||||
android:textSize="12sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.tasks.form.ReminderContainer
|
||||
android:id="@+id/reminders_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/exact_alarm_disabled_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:background="@drawable/layout_rounded_bg_yellow_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exact_alarm_disabled_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:gravity="center"
|
||||
android:fontFamily="@string/font_family_medium"
|
||||
android:text="@string/exact_alarm_system_settings_reminders"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/stat_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/assigned_stat"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
android:id="@+id/stats_selector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tags_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tags"
|
||||
style="@style/TaskFormSectionheader" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tags_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="middle"
|
||||
android:divider="@drawable/tag_divider" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
app:tabPaddingStart="24dp"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
|
||||
android:id="@+id/customization_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
|
|
@ -90,4 +90,4 @@
|
|||
android:layout_alignBottom="@id/category_layout"
|
||||
android:layout_marginBottom="@dimen/customization_drawer_caret_margin"
|
||||
android:elevation="6dp"/>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<FrameLayout
|
||||
|
|
@ -21,4 +22,4 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
android:padding="0dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
|
||||
android:id="@+id/challenge_filter_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -1,166 +1,179 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.habitrpg.android.habitica.ui.fragments.NavigationDrawerFragment">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.habitrpg.android.habitica.ui.fragments.NavigationDrawerFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/menuHeaderView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="1dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:background="?colorPrimaryOffset"
|
||||
android:baselineAligned="false">
|
||||
android:id="@+id/menuHeaderView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="1dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:background="?colorPrimaryOffset"
|
||||
android:baselineAligned="false">
|
||||
|
||||
<com.habitrpg.android.habitica.ui.RoundedFrameLayout
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="@dimen/spacing_large"
|
||||
android:background="@drawable/rounded_avatar_bg"
|
||||
android:clipToPadding="true"
|
||||
android:clipChildren="true">
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="@dimen/spacing_large"
|
||||
android:background="@drawable/rounded_avatar_bg"
|
||||
android:clipToPadding="true"
|
||||
android:clipChildren="true">
|
||||
|
||||
<com.habitrpg.common.habitica.views.AvatarView
|
||||
android:id="@+id/avatarView"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center"/>
|
||||
android:id="@+id/avatarView"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center" />
|
||||
</com.habitrpg.android.habitica.ui.RoundedFrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/toolbarTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
tools:text="Habitica"
|
||||
style="@style/Body1"
|
||||
android:textColor="@color/white"/>
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/usernameTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
tools:text="\@username"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/white_80_alpha"/>
|
||||
android:id="@+id/toolbarTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
tools:text="Habitica"
|
||||
style="@style/Body1"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/usernameTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
tools:text="\@username"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/white_80_alpha" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/notificationsButtonWrapper"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp">
|
||||
android:id="@+id/notificationsButtonWrapper"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginStart="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/notificationsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/menu_notifications"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="false"
|
||||
android:contentDescription="@string/notifications" />
|
||||
android:id="@+id/notificationsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/menu_notifications"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="false"
|
||||
android:contentDescription="@string/notifications" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/notificationsBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignStart="@id/notificationsButton"
|
||||
android:layout_alignTop="@id/notificationsButton"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="-13dp"
|
||||
android:background="@drawable/badge_circle"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingTop="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
tools:text="1"
|
||||
tools:visibility="visible" />
|
||||
android:id="@+id/notificationsBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignStart="@id/notificationsButton"
|
||||
android:layout_alignTop="@id/notificationsButton"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="-13dp"
|
||||
android:background="@drawable/badge_circle"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingTop="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
tools:text="1"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/messagesButtonWrapper"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp">
|
||||
android:id="@+id/messagesButtonWrapper"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginStart="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/messagesButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/menu_messages"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="false"
|
||||
android:contentDescription="@string/inbox" />
|
||||
android:id="@+id/messagesButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/menu_messages"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="false"
|
||||
android:contentDescription="@string/inbox" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messagesBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignStart="@id/messagesButton"
|
||||
android:layout_alignTop="@id/messagesButton"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="-12dp"
|
||||
android:background="@drawable/badge_circle"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingTop="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
tools:text="1"
|
||||
tools:visibility="visible" />
|
||||
android:id="@+id/messagesBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignStart="@id/messagesButton"
|
||||
android:layout_alignTop="@id/messagesButton"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="-12dp"
|
||||
android:background="@drawable/badge_circle"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingTop="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
tools:text="1"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settingsButtonWrapper"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="8dp">
|
||||
<ImageView
|
||||
android:id="@+id/settingsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/settingsButtonWrapper"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/menu_settings"
|
||||
android:layout_centerVertical="true"
|
||||
android:contentDescription="@string/PS_settings_title" />
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/settingsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/menu_settings"
|
||||
android:layout_centerVertical="true"
|
||||
android:contentDescription="@string/PS_settings_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingsBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignStart="@id/settingsButton"
|
||||
android:layout_alignTop="@id/settingsButton"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="-12dp"
|
||||
android:background="@drawable/badge_circle"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingTop="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
tools:text="1"
|
||||
tools:visibility="visible" />
|
||||
android:id="@+id/settingsBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignStart="@id/settingsButton"
|
||||
android:layout_alignTop="@id/settingsButton"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="-12dp"
|
||||
android:background="@drawable/badge_circle"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingTop="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
tools:text="1"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorContentBackground"/>
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorContentBackground" />
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
|
@ -11,4 +11,4 @@
|
|||
android:id="@+id/chatBarView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -34,4 +35,4 @@
|
|||
style="@style/Subheader3"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
|
@ -149,4 +151,4 @@
|
|||
android:gravity="center"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView android:orientation="vertical"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view" android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
|
@ -82,4 +83,4 @@
|
|||
android:layout_gravity="center"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView android:orientation="vertical"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view" android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
|
@ -104,4 +105,4 @@
|
|||
android:layout_marginBottom="@dimen/spacing_xlarge"
|
||||
style="@style/Caption2"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/refreshLayout">
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
|
|
@ -195,4 +196,4 @@
|
|||
android:text="@string/leave_guild"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbarSize="3dp"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
|
|
@ -30,4 +32,4 @@
|
|||
android:text="@string/add_invites"
|
||||
android:layout_margin="@dimen/row_padding" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -134,4 +135,4 @@
|
|||
style="@style/HabiticaButton.Red" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="0dp">
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@
|
|||
android:layout_marginStart="@dimen/content_inset"
|
||||
android:layout_marginEnd="@dimen/content_inset"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="230dp"
|
||||
android:background="@drawable/avatar_customization_category_bg"
|
||||
android:id="@+id/recyclerView"
|
||||
android:padding="17dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -233,4 +234,4 @@
|
|||
android:layout_marginBottom="28dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbarSize="3dp"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
|
@ -135,4 +136,4 @@
|
|||
android:layout_marginStart="@dimen/spacing_large"
|
||||
android:layout_marginEnd="@dimen/spacing_large" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
|
|
@ -176,4 +177,4 @@
|
|||
android:text="@string/reset_walkthrough"
|
||||
android:layout_margin="@dimen/spacing_large"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
23
Habitica/res/layout/fragment_tasks_recyclerview.xml
Normal file
23
Habitica/res/layout/fragment_tasks_recyclerview.xml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbarSize="3dp"
|
||||
android:paddingBottom="108dp"
|
||||
android:scrollbarThumbVertical="@color/scrollbarThumb"
|
||||
android:layout_gravity="center"
|
||||
android:scrollbars="vertical" />
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/recyclerView"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
</com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport>
|
||||
|
|
|
|||
|
|
@ -1055,9 +1055,10 @@
|
|||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:backgroundDimAmount">0.3</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:windowAnimationStyle">@style/SheetDialogAnimations</item>
|
||||
<item name="bottomSheetStyle">@style/Widget.App.BottomSheet.Modal</item>
|
||||
<item name="enableEdgeToEdge">true</item>
|
||||
|
||||
<item name="colorPrimary">@color/brand</item>
|
||||
<item name="colorPrimaryDark">@color/brand_50</item>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ abstract class RealmBaseLocalRepository internal constructor(override var realm:
|
|||
}
|
||||
realm.executeTransaction {
|
||||
while (pendingSaves.isNotEmpty()) {
|
||||
val pending = pendingSaves.removeFirst()
|
||||
val pending = pendingSaves.removeAt(0)
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
if (pending is RealmModel) {
|
||||
copy(it, pending)
|
||||
|
|
|
|||
|
|
@ -15,15 +15,22 @@ import android.view.LayoutInflater
|
|||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup.MarginLayoutParams
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.net.toUri
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.lifecycle.repeatOnLifecycle
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.habitrpg.android.habitica.HabiticaApplication
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.data.UserRepository
|
||||
|
|
@ -119,6 +126,15 @@ abstract class BaseActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
findViewById<View>(R.id.appbar)?.let { appbar ->
|
||||
val paddingTop = appbar.paddingTop
|
||||
ViewCompat.setOnApplyWindowInsetsListener(appbar) { v, windowInsets ->
|
||||
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.updatePadding(top = insets.top + paddingTop)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onRestart() {
|
||||
|
|
@ -217,7 +233,6 @@ abstract class BaseActivity : AppCompatActivity() {
|
|||
actionBar.setHomeButtonEnabled(true)
|
||||
}
|
||||
}
|
||||
toolbar?.let { ToolbarColorHelper.colorizeToolbar(it, this, iconColor, backgroundColor) }
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ class FullProfileActivity : BaseActivity() {
|
|||
clipboard?.setPrimaryClip(clip)
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) {
|
||||
HabiticaSnackbar.showSnackbar(
|
||||
this@FullProfileActivity.binding.scrollView.getChildAt(0) as ViewGroup,
|
||||
this@FullProfileActivity.binding.nestedScrollView.getChildAt(0) as ViewGroup,
|
||||
String.format(getString(R.string.username_copied), userDisplayName),
|
||||
SnackbarDisplayType.NORMAL
|
||||
)
|
||||
|
|
@ -266,7 +266,7 @@ class FullProfileActivity : BaseActivity() {
|
|||
clipboard?.setPrimaryClip(clip)
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) {
|
||||
HabiticaSnackbar.showSnackbar(
|
||||
this@FullProfileActivity.binding.scrollView.getChildAt(0) as ViewGroup,
|
||||
this@FullProfileActivity.binding.nestedScrollView.getChildAt(0) as ViewGroup,
|
||||
String.format(getString(R.string.id_copied), userDisplayName),
|
||||
SnackbarDisplayType.NORMAL
|
||||
)
|
||||
|
|
|
|||
|
|
@ -34,8 +34,11 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.children
|
||||
import androidx.core.view.setPadding
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.NavDestination
|
||||
|
|
@ -237,6 +240,13 @@ open class MainActivity : BaseActivity(), SnackbarActivity {
|
|||
|
||||
setupToolbar(binding.content.toolbar)
|
||||
|
||||
val headerPaddingTop = binding.content.headerView.paddingTop
|
||||
ViewCompat.setOnApplyWindowInsetsListener(binding.content.headerView) { v, windowInsets ->
|
||||
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.updatePadding(top = insets.top + headerPaddingTop)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
|
||||
sideAvatarView = AvatarView(this, showBackground = true, showMount = false, showPet = false)
|
||||
|
||||
viewModel.user.observe(this) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class ReportMessageActivity : BaseActivity() {
|
|||
super.onCreate(savedInstanceState)
|
||||
setSupportActionBar(binding.toolbar)
|
||||
supportActionBar?.title = ""
|
||||
raisedElevation = binding.appBar.elevation
|
||||
raisedElevation = binding.appbar.elevation
|
||||
setStatusBarDim(true)
|
||||
|
||||
binding.bottomSheet.setOnTouchListener { _, _ -> true }
|
||||
|
|
@ -117,12 +117,12 @@ class ReportMessageActivity : BaseActivity() {
|
|||
|
||||
private fun setStatusBarDim(dim: Boolean) {
|
||||
if (dim) {
|
||||
binding.appBar.elevation = 0f
|
||||
binding.appbar.elevation = 0f
|
||||
window.statusBarColor = getThemeColor(R.attr.colorPrimaryDark)
|
||||
binding.closeButton.visibility = View.GONE
|
||||
binding.toolbarTitle.setTypeface(null, Typeface.BOLD)
|
||||
} else {
|
||||
binding.appBar.elevation = 8f
|
||||
binding.appbar.elevation = 8f
|
||||
window.statusBarColor = ContextCompat.getColor(this, R.color.offset_background)
|
||||
binding.closeButton.visibility = View.VISIBLE
|
||||
binding.toolbarTitle.setTypeface(null, Typeface.NORMAL)
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ class TaskFormActivity : BaseActivity() {
|
|||
ContextCompat.getColor(this, R.color.white),
|
||||
upperTintColor
|
||||
)
|
||||
binding.appbar.setBackgroundColor(upperTintColor)
|
||||
}
|
||||
supportActionBar?.setBackgroundDrawable(ColorDrawable(upperTintColor))
|
||||
binding.upperTextWrapper.setBackgroundColor(upperTintColor)
|
||||
|
|
@ -267,12 +268,12 @@ class TaskFormActivity : BaseActivity() {
|
|||
View.OnFocusChangeListener { _, isFocused ->
|
||||
binding.notesInputLayout.alpha = if (isFocused) 0.8f else 0.6f
|
||||
}
|
||||
binding.scrollView.setOnTouchListener { view, event ->
|
||||
binding.nestedScrollView.setOnTouchListener { view, event ->
|
||||
userScrolled =
|
||||
view == binding.scrollView && (event.action == MotionEvent.ACTION_SCROLL || event.action == MotionEvent.ACTION_MOVE)
|
||||
view == binding.nestedScrollView && (event.action == MotionEvent.ACTION_SCROLL || event.action == MotionEvent.ACTION_MOVE)
|
||||
return@setOnTouchListener false
|
||||
}
|
||||
binding.scrollView.setOnScrollChangeListener { _: NestedScrollView?, _: Int, _: Int, _: Int, _: Int ->
|
||||
binding.nestedScrollView.setOnScrollChangeListener { _: NestedScrollView?, _: Int, _: Int, _: Int, _: Int ->
|
||||
if (userScrolled) {
|
||||
dismissKeyboard()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ import androidx.core.content.ContextCompat
|
|||
import androidx.core.content.edit
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.view.GravityCompat
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.lifecycle.Lifecycle
|
||||
|
|
@ -147,6 +150,28 @@ class NavigationDrawerFragment : DialogFragment() {
|
|||
false
|
||||
initializeMenuItems()
|
||||
|
||||
binding?.menuHeaderView?.let {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(it) { v, windowInsets ->
|
||||
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.updatePadding(top = insets.top)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
}
|
||||
|
||||
binding?.recyclerView?.let {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(it) { v, insets ->
|
||||
val bars = insets.getInsets(
|
||||
WindowInsetsCompat.Type.systemBars()
|
||||
or WindowInsetsCompat.Type.displayCutout()
|
||||
)
|
||||
v.updatePadding(
|
||||
bottom = bars.bottom,
|
||||
left = bars.left
|
||||
)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
}
|
||||
|
||||
adapter.itemSelectedEvents = {
|
||||
setSelection(it.transitionId, it.bundle, true)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ class SubscriptionFragment : BaseFragment<FragmentSubscriptionBinding>() {
|
|||
binding?.content?.subscriptionOptions?.visibility = View.VISIBLE
|
||||
binding?.content?.subscriptionOptions?.postDelayed(
|
||||
{
|
||||
binding?.content?.scrollView?.smoothScrollTo(0, binding?.content?.subscriptionOptions?.top ?: 0)
|
||||
binding?.content?.nestedScrollView?.smoothScrollTo(0, binding?.content?.subscriptionOptions?.top ?: 0)
|
||||
},
|
||||
500
|
||||
)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import androidx.compose.foundation.lazy.LazyColumn
|
|||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.pulltorefresh.PullToRefreshContainer
|
||||
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
|
||||
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
|
|
@ -212,23 +212,37 @@ fun PartySeekingView(
|
|||
val pageData = viewModel.seekingUsers.collectAsLazyPagingItems()
|
||||
val refreshing by viewModel.isRefreshing
|
||||
val pullRefreshState = rememberPullToRefreshState()
|
||||
if (pullRefreshState.isRefreshing) {
|
||||
if (pullRefreshState.isAnimating) {
|
||||
LaunchedEffect(true) {
|
||||
pageData.refresh()
|
||||
}
|
||||
}
|
||||
if (!refreshing) {
|
||||
LaunchedEffect(true) {
|
||||
pullRefreshState.endRefresh()
|
||||
pullRefreshState.animateToHidden()
|
||||
}
|
||||
}
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
Box(
|
||||
PullToRefreshBox(
|
||||
state = pullRefreshState,
|
||||
isRefreshing = refreshing,
|
||||
onRefresh = {
|
||||
viewModel.isRefreshing.value = true
|
||||
pageData.refresh()
|
||||
viewModel.isRefreshing.value = false
|
||||
},
|
||||
indicator = {
|
||||
HabiticaPullRefreshIndicator(
|
||||
pageData.itemCount == 0,
|
||||
refreshing,
|
||||
pullRefreshState,
|
||||
Modifier.align(Alignment.TopCenter)
|
||||
)
|
||||
},
|
||||
modifier =
|
||||
modifier
|
||||
.fillMaxSize()
|
||||
.nestedScroll(pullRefreshState.nestedScrollConnection)
|
||||
) {
|
||||
LazyColumn {
|
||||
item {
|
||||
|
|
@ -362,18 +376,6 @@ fun PartySeekingView(
|
|||
else -> {}
|
||||
}
|
||||
}
|
||||
PullToRefreshContainer(
|
||||
modifier = Modifier.align(Alignment.TopCenter),
|
||||
state = pullRefreshState,
|
||||
indicator = {
|
||||
HabiticaPullRefreshIndicator(
|
||||
pageData.itemCount == 0,
|
||||
refreshing,
|
||||
it,
|
||||
Modifier.align(Alignment.TopCenter)
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import com.habitrpg.android.habitica.data.InventoryRepository
|
|||
import com.habitrpg.android.habitica.data.TaskRepository
|
||||
import com.habitrpg.android.habitica.data.UserRepository
|
||||
import com.habitrpg.android.habitica.databinding.FragmentRefreshRecyclerviewBinding
|
||||
import com.habitrpg.android.habitica.databinding.FragmentTasksRecyclerviewBinding
|
||||
import com.habitrpg.android.habitica.helpers.AppConfigManager
|
||||
import com.habitrpg.android.habitica.helpers.HapticFeedbackManager
|
||||
import com.habitrpg.android.habitica.helpers.NotificationsManager
|
||||
|
|
@ -65,19 +66,19 @@ import javax.inject.Inject
|
|||
|
||||
@AndroidEntryPoint
|
||||
open class TaskRecyclerViewFragment :
|
||||
BaseFragment<FragmentRefreshRecyclerviewBinding>(),
|
||||
BaseFragment<FragmentTasksRecyclerviewBinding>(),
|
||||
androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener {
|
||||
private var taskFlowJob: Job? = null
|
||||
val viewModel: TasksViewModel by viewModels({ requireParentFragment() })
|
||||
|
||||
internal var canScoreTasks: Boolean = true
|
||||
override var binding: FragmentRefreshRecyclerviewBinding? = null
|
||||
override var binding: FragmentTasksRecyclerviewBinding? = null
|
||||
|
||||
override fun createBinding(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?
|
||||
): FragmentRefreshRecyclerviewBinding {
|
||||
return FragmentRefreshRecyclerviewBinding.inflate(inflater, container, false)
|
||||
): FragmentTasksRecyclerviewBinding {
|
||||
return FragmentTasksRecyclerviewBinding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
var recyclerAdapter: TaskRecyclerViewAdapter? = null
|
||||
|
|
@ -358,8 +359,6 @@ open class TaskRecyclerViewFragment :
|
|||
}
|
||||
}
|
||||
|
||||
binding?.recyclerView?.setScaledPadding(context, 0, 0, 0, 108)
|
||||
|
||||
layoutManager = getLayoutManager(context)
|
||||
binding?.recyclerView?.layoutManager = layoutManager
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.habitrpg.android.habitica.ui.helpers
|
|||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.habitrpg.common.habitica.helpers.EmptyItem
|
||||
import com.habitrpg.common.habitica.helpers.RecyclerViewState
|
||||
|
|
@ -46,6 +49,27 @@ constructor(
|
|||
private var actualAdapter: Adapter<*>? = null
|
||||
private val emptyAdapter = RecyclerViewStateAdapter()
|
||||
|
||||
init {
|
||||
clipToPadding = false
|
||||
val topPadding = paddingTop
|
||||
val bottomPadding = paddingBottom
|
||||
val leftPadding = paddingLeft
|
||||
val rightPadding = paddingRight
|
||||
ViewCompat.setOnApplyWindowInsetsListener(this) { v, insets ->
|
||||
val bars = insets.getInsets(
|
||||
WindowInsetsCompat.Type.systemBars()
|
||||
or WindowInsetsCompat.Type.displayCutout()
|
||||
)
|
||||
v.updatePadding(
|
||||
left = bars.left + leftPadding,
|
||||
top = topPadding,
|
||||
right = bars.right + rightPadding,
|
||||
bottom = bars.bottom + bottomPadding,
|
||||
)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
}
|
||||
|
||||
private val observer =
|
||||
object : AdapterDataObserver() {
|
||||
override fun onChanged() {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,16 @@ import androidx.compose.foundation.layout.Column
|
|||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||
import androidx.compose.foundation.layout.displayCutout
|
||||
import androidx.compose.foundation.layout.displayCutoutPadding
|
||||
import androidx.compose.foundation.layout.navigationBarsIgnoringVisibility
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.windowInsetsBottomHeight
|
||||
import androidx.compose.foundation.layout.windowInsetsEndWidth
|
||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||
import androidx.compose.foundation.layout.windowInsetsStartWidth
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
|
|
@ -104,6 +110,7 @@ private fun BottomSheetWrapper(
|
|||
scrimColor = colorResource(R.color.gray_5).copy(alpha = 0.3f),
|
||||
sheetState = modalBottomSheetState,
|
||||
shape = RoundedCornerShape(topStart = radius, topEnd = radius),
|
||||
contentWindowInsets = { WindowInsets(0) },
|
||||
dragHandle = {},
|
||||
content = {
|
||||
Column(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@ package com.habitrpg.android.habitica.ui.views.dialogs
|
|||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
import com.google.android.material.internal.ViewUtils.doOnApplyWindowInsets
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.databinding.BottomSheetWrapperBinding
|
||||
|
||||
|
|
@ -20,6 +23,7 @@ open class HabiticaBottomSheetDialog(context: Context) :
|
|||
wrapperBinding.grabber.visibility = value
|
||||
}
|
||||
|
||||
|
||||
override fun setContentView(view: View) {
|
||||
wrapperBinding.container.addView(view)
|
||||
super.setContentView(wrapperBinding.root)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ import android.view.animation.RotateAnimation
|
|||
import android.widget.RelativeLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.children
|
||||
import androidx.core.view.updatePadding
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.databinding.MainNavigationViewBinding
|
||||
import com.habitrpg.common.habitica.extensions.getThemeColor
|
||||
|
|
@ -110,6 +112,12 @@ constructor(
|
|||
animateButtonTap()
|
||||
true
|
||||
}
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(binding.itemWrapper) { v, windowInsets ->
|
||||
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.updatePadding(bottom = insets.bottom)
|
||||
WindowInsetsCompat.CONSUMED
|
||||
}
|
||||
binding.addButton.setOnTouchListener { _, event ->
|
||||
if (event.action == MotionEvent.ACTION_DOWN) {
|
||||
val animX = ObjectAnimator.ofFloat(binding.addButton, "scaleX", 1f, 1.1f)
|
||||
|
|
|
|||
Loading…
Reference in a new issue