mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
improve foldable layout
This commit is contained in:
parent
9805fe3ecc
commit
e8d26ffe82
5 changed files with 32 additions and 17 deletions
|
|
@ -160,7 +160,7 @@
|
|||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/navigation_drawer"
|
||||
class="com.habitrpg.android.habitica.ui.fragments.NavigationDrawerFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="@dimen/drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
tools:layout="@layout/drawer_main"/>
|
||||
|
|
|
|||
4
Habitica/res/values-w420dp/dimens.xml
Normal file
4
Habitica/res/values-w420dp/dimens.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="drawer_width">380dp</dimen>
|
||||
</resources>
|
||||
|
|
@ -108,4 +108,6 @@
|
|||
<dimen name="task_spacing_horizontal">10dp</dimen>
|
||||
<dimen name="bottom_sheet_radius">20dp</dimen>
|
||||
<dimen name="bottom_sheet_inset">16dp</dimen>
|
||||
<!-- this is equivalent to match_parent -->
|
||||
<dimen name="drawer_width">-1px</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ import android.widget.TextView
|
|||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.databinding.AdventureGuideMenuBannerBinding
|
||||
import com.habitrpg.common.habitica.extensions.dpToPx
|
||||
import com.habitrpg.common.habitica.extensions.layoutInflater
|
||||
import com.habitrpg.common.habitica.models.responses.TaskDirection
|
||||
import com.habitrpg.android.habitica.models.tasks.ChecklistItem
|
||||
import com.habitrpg.android.habitica.models.tasks.Task
|
||||
import com.habitrpg.android.habitica.models.user.User
|
||||
|
|
@ -19,6 +16,9 @@ import com.habitrpg.android.habitica.ui.adapter.BaseRecyclerViewAdapter
|
|||
import com.habitrpg.android.habitica.ui.viewHolders.tasks.BaseTaskViewHolder
|
||||
import com.habitrpg.android.habitica.ui.viewmodels.TasksViewModel
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaIconsHelper
|
||||
import com.habitrpg.common.habitica.extensions.dpToPx
|
||||
import com.habitrpg.common.habitica.extensions.layoutInflater
|
||||
import com.habitrpg.common.habitica.models.responses.TaskDirection
|
||||
import io.reactivex.rxjava3.core.BackpressureStrategy
|
||||
import io.reactivex.rxjava3.core.Flowable
|
||||
import io.reactivex.rxjava3.functions.Action
|
||||
|
|
@ -40,7 +40,7 @@ abstract class RealmBaseTasksRecyclerViewAdapter(
|
|||
override var user: User? = null
|
||||
set(value) {
|
||||
field = value
|
||||
notifyItemChanged(0)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override var taskDisplayMode: String = "standard"
|
||||
|
|
@ -92,7 +92,16 @@ abstract class RealmBaseTasksRecyclerViewAdapter(
|
|||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return data.size
|
||||
return data.size + if (showAdventureGuide) 1 else 0
|
||||
}
|
||||
|
||||
override fun getItem(position: Int): Task? {
|
||||
if (showAdventureGuide && position == 0) {
|
||||
return null
|
||||
} else if (showAdventureGuide) {
|
||||
return super.getItem(position - 1)
|
||||
}
|
||||
return super.getItem(position)
|
||||
}
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
- New unsaved changes warning for tasks
|
||||
- New design for the Gem screen
|
||||
- New design for Starting Objectives
|
||||
- New private messages will show without needing to scroll
|
||||
- Purchased Backgrounds show correctly
|
||||
- Fixes Armoire error when you don’t have enough Gold
|
||||
- Fixes issue where the wrong task filters would show sometimes
|
||||
- Gift subs can be properly selected
|
||||
- Ended Challenges will go away properly
|
||||
- External links work in Guilds
|
||||
- Proper 12h/24h support
|
||||
What’s new in version 4.0:
|
||||
-Habitica has a brand new WearOS app for smart watches!
|
||||
-Newly designed Backgrounds section
|
||||
-Ability to filter, preview, and pin Backgrounds
|
||||
-New bottom sheet designs in Items, Pets & Mounts, and Filters
|
||||
-New Day Start Adjustment interface
|
||||
-Improvements to task reminder reliability
|
||||
-Improvements to payment and subscription handling
|
||||
-Fixes account deletion confirmation prompt
|
||||
-Fixes task reorder bug for new accounts
|
||||
-Fixes sprite size in Quest Details preview
|
||||
|
|
|
|||
Loading…
Reference in a new issue