Remove the remaining MotionLayout (#5854)

* Remove the remaining MotionLayout

* Use ImageButton instead of Blank View to handle taps in dead area

And some tweaks

(cherry picked from commit abdb67a123d714401ede9760dfae797f37bb8c56)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt
#	app/src/main/res/layout-sw720dp/manga_info_header.xml
#	app/src/main/res/layout/manga_info_header.xml
#	app/src/main/res/xml/manga_summary_section_scene.xml
This commit is contained in:
Andreas 2021-09-06 17:46:38 +02:00 committed by Jobobby04
parent 2f5718c92f
commit cf742c65aa
4 changed files with 115 additions and 274 deletions

View File

@ -19,11 +19,9 @@ import eu.kanade.tachiyomi.source.SourceManager
import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.source.online.MetadataSource import eu.kanade.tachiyomi.source.online.MetadataSource
import eu.kanade.tachiyomi.source.online.all.MergedSource
import eu.kanade.tachiyomi.ui.base.controller.getMainAppBarHeight import eu.kanade.tachiyomi.ui.base.controller.getMainAppBarHeight
import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.manga.MangaController
import eu.kanade.tachiyomi.util.lang.launchUI import eu.kanade.tachiyomi.util.lang.launchUI
import eu.kanade.tachiyomi.util.system.applySystemAnimatorScale
import eu.kanade.tachiyomi.util.system.copyToClipboard import eu.kanade.tachiyomi.util.system.copyToClipboard
import eu.kanade.tachiyomi.util.view.loadAnyAutoPause import eu.kanade.tachiyomi.util.view.loadAnyAutoPause
import eu.kanade.tachiyomi.util.view.setChips import eu.kanade.tachiyomi.util.view.setChips
@ -131,9 +129,6 @@ class MangaInfoHeaderAdapter(
inner class HeaderViewHolder(private val view: View) : RecyclerView.ViewHolder(view) { inner class HeaderViewHolder(private val view: View) : RecyclerView.ViewHolder(view) {
fun bind() { fun bind() {
val summaryTransition = binding.mangaSummarySection.getTransition(R.id.manga_summary_section_transition)
summaryTransition.applySystemAnimatorScale(view.context)
// For rounded corners // For rounded corners
binding.mangaCover.clipToOutline = true binding.mangaCover.clipToOutline = true
@ -337,28 +332,27 @@ class MangaInfoHeaderAdapter(
val enabledLanguages = preferences.enabledLanguages().get() val enabledLanguages = preferences.enabledLanguages().get()
.filterNot { it == "all" } .filterNot { it == "all" }
val isMergedSource = source is MergedSource // SY -->
val isMergedSource = source.id == MERGED_SOURCE_ID
text = if (enabledLanguages.size == 1) { // SY <--
val hasOneActiveLanguages = enabledLanguages.size == 1
val isInEnabledLanguages = source.lang in enabledLanguages
text = when {
// SY --> // SY -->
if (isMergedSource) { isMergedSource && hasOneActiveLanguages -> getMergedSourcesString(
getMergedSourcesString(enabledLanguages, true) enabledLanguages,
} true
)
isMergedSource -> getMergedSourcesString(
enabledLanguages,
false
)
// SY <--
// For edge cases where user disables a source they got manga of in their library. // For edge cases where user disables a source they got manga of in their library.
else /* SY <-- */ if (source.lang !in enabledLanguages) { hasOneActiveLanguages && !isInEnabledLanguages -> mangaSource
mangaSource // Hide the language tag when only one language is used.
} else { hasOneActiveLanguages && isInEnabledLanguages -> source.name
// Hide the language tag when only one language is used. else -> mangaSource
source.name
}
} else {
// Display the language tag when multiple languages are used.
if (isMergedSource) {
getMergedSourcesString(enabledLanguages, false)
} else {
mangaSource
}
} }
setOnClickListener { setOnClickListener {
@ -370,21 +364,19 @@ class MangaInfoHeaderAdapter(
} }
// Update manga status. // Update manga status.
binding.apply { val (statusDrawable, statusString) = when (manga.status) {
val (statusDrawable, statusString) = when (manga.status) { SManga.ONGOING -> R.drawable.ic_status_ongoing_24dp to R.string.ongoing
SManga.ONGOING -> R.drawable.ic_status_ongoing_24dp to R.string.ongoing SManga.COMPLETED -> R.drawable.ic_status_completed_24dp to R.string.completed
SManga.COMPLETED -> R.drawable.ic_status_completed_24dp to R.string.completed SManga.LICENSED -> R.drawable.ic_status_licensed_24dp to R.string.licensed
SManga.LICENSED -> R.drawable.ic_status_licensed_24dp to R.string.licensed // SY --> Mangadex specific statuses
// SY --> MangaDex specific statuses SManga.HIATUS -> R.drawable.ic_status_hiatus_24dp to R.string.hiatus
SManga.HIATUS -> R.drawable.ic_status_hiatus_24dp to R.string.hiatus SManga.PUBLICATION_COMPLETE -> R.drawable.ic_status_publication_complete_24dp to R.string.publication_complete
SManga.PUBLICATION_COMPLETE -> R.drawable.ic_status_publication_complete_24dp to R.string.publication_complete SManga.CANCELLED -> R.drawable.ic_status_cancelled_24dp to R.string.cancelled
SManga.CANCELLED -> R.drawable.ic_status_cancelled_24dp to R.string.cancelled // SY <--
// SY <-- else -> R.drawable.ic_status_unknown_24dp to R.string.unknown
else -> R.drawable.ic_status_unknown_24dp to R.string.unknown
}
mangaStatusIcon.setImageResource(statusDrawable)
mangaStatus.setText(statusString)
} }
binding.mangaStatusIcon.setImageResource(statusDrawable)
binding.mangaStatus.setText(statusString)
// Set the favorite drawable to the correct one. // Set the favorite drawable to the correct one.
setFavoriteButtonState(manga.favorite) setFavoriteButtonState(manga.favorite)
@ -432,6 +424,7 @@ class MangaInfoHeaderAdapter(
}*/ }*/
// SY <-- // SY <--
} else { } else {
binding.mangaGenresTagsCompact.isVisible = false
binding.mangaGenresTagsCompactChips.isVisible = false binding.mangaGenresTagsCompactChips.isVisible = false
// binding.mangaGenresTagsFullChips.isVisible = false // binding.mangaGenresTagsFullChips.isVisible = false
// SY --> // SY -->
@ -444,25 +437,20 @@ class MangaInfoHeaderAdapter(
binding.mangaSummaryText.clicks(), binding.mangaSummaryText.clicks(),
binding.mangaInfoToggleMore.clicks(), binding.mangaInfoToggleMore.clicks(),
binding.mangaInfoToggleLess.clicks(), binding.mangaInfoToggleLess.clicks(),
binding.mangaSummarySection.clicks() binding.mangaSummarySection.clicks(),
) )
.onEach { toggleMangaInfo() } .onEach { toggleMangaInfo() }
.launchIn(controller.viewScope) .launchIn(controller.viewScope)
if (initialLoad) {
binding.mangaGenresTagsCompact.requestLayout()
}
// Expand manga info if navigated from source listing or explicitly set to // Expand manga info if navigated from source listing or explicitly set to
// (e.g. on tablets) // (e.g. on tablets)
if (initialLoad && (fromSource || isTablet)) { if (initialLoad && (fromSource || isTablet)) {
toggleMangaInfo() toggleMangaInfo()
initialLoad = false initialLoad = false
// wrap_content and autoFixTextSize can cause unwanted behaviour this tries to solve it
binding.mangaFullTitle.requestLayout()
}
// Refreshes will change the state and it needs to be set to correct state to display correctly
if (binding.mangaSummaryText.maxLines == maxLines) {
binding.mangaSummarySection.transitionToState(R.id.start)
} else {
binding.mangaSummarySection.transitionToState(R.id.end)
} }
} }
} }
@ -474,34 +462,30 @@ class MangaInfoHeaderAdapter(
private fun toggleMangaInfo() { private fun toggleMangaInfo() {
val isCurrentlyExpanded = binding.mangaSummaryText.maxLines != maxLines val isCurrentlyExpanded = binding.mangaSummaryText.maxLines != maxLines
if (isCurrentlyExpanded) { binding.mangaInfoToggleMore.isVisible = isCurrentlyExpanded
binding.mangaSummarySection.transitionToStart() binding.mangaInfoScrim.isVisible = isCurrentlyExpanded
} else { binding.mangaInfoToggleMoreScrim.isVisible = isCurrentlyExpanded
binding.mangaSummarySection.transitionToEnd() binding.mangaGenresTagsCompact.isVisible = isCurrentlyExpanded
} binding.mangaGenresTagsCompactChips.isVisible = isCurrentlyExpanded
binding.mangaInfoToggleLess.isVisible = !isCurrentlyExpanded
// SY --> binding.mangaGenresTagsFullChips.isVisible = !isCurrentlyExpanded
binding.genreGroups.isVisible = !isCurrentlyExpanded
// SY <--
binding.mangaSummaryText.text = updateDescription(manga.description, isCurrentlyExpanded) binding.mangaSummaryText.text = updateDescription(manga.description, isCurrentlyExpanded)
binding.mangaSummaryText.maxLines = if (isCurrentlyExpanded) { binding.mangaSummaryText.maxLines = when {
maxLines isCurrentlyExpanded -> maxLines
} else { else -> Int.MAX_VALUE
Int.MAX_VALUE
} }
} }
private fun updateDescription(description: String?, isCurrentlyExpanded: Boolean): CharSequence? { private fun updateDescription(description: String?, isCurrentlyExpanded: Boolean): CharSequence? {
return if (description.isNullOrBlank()) { return when {
view.context.getString(R.string.unknown) description.isNullOrBlank() -> view.context.getString(R.string.unknown)
} else { isCurrentlyExpanded -> description.replace(Regex("[\\r\\n]{2,}", setOf(RegexOption.MULTILINE)), "\n")
// Max lines of 3 with a blank line looks whack so we remove else -> description
// any line breaks that is 2 or more and replace it with 1
// however, don't do this if already expanded because we need those blank lines
if (!isCurrentlyExpanded) {
description
} else {
description
.replace(Regex("[\\r\\n]{2,}", setOf(RegexOption.MULTILINE)), "\n")
}
} }
} }
@ -573,10 +557,13 @@ class MangaInfoHeaderAdapter(
private fun setFavoriteButtonState(isFavorite: Boolean) { private fun setFavoriteButtonState(isFavorite: Boolean) {
// Set the Favorite drawable to the correct one. // Set the Favorite drawable to the correct one.
// Border drawable if false, filled drawable if true. // Border drawable if false, filled drawable if true.
val (iconResource, stringResource) = when (isFavorite) {
true -> R.drawable.ic_favorite_24dp to R.string.in_library
false -> R.drawable.ic_favorite_border_24dp to R.string.add_to_library
}
binding.btnFavorite.apply { binding.btnFavorite.apply {
setIconResource(if (isFavorite) R.drawable.ic_favorite_24dp else R.drawable.ic_favorite_border_24dp) setIconResource(iconResource)
text = text = context.getString(stringResource)
context.getString(if (isFavorite) R.string.in_library else R.string.add_to_library)
isActivated = isFavorite isActivated = isFavorite
} }
} }

View File

@ -204,12 +204,11 @@
app:layout_constraintTop_toBottomOf="@+id/manga_actions" app:layout_constraintTop_toBottomOf="@+id/manga_actions"
tools:visibility="gone" /> tools:visibility="gone" />
<androidx.constraintlayout.motion.widget.MotionLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/manga_summary_section" android:id="@+id/manga_summary_section"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
app:layoutDescription="@xml/manga_summary_section_scene"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/metadata_view"> app:layout_constraintTop_toBottomOf="@id/metadata_view">
@ -219,17 +218,17 @@
style="@style/TextAppearance.Regular.Body1.Secondary" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:clickable="true" android:clickable="true"
android:ellipsize="end"
android:focusable="true" android:focusable="true"
android:maxLines="3" android:maxLines="3"
android:ellipsize="end"
android:textIsSelectable="false" android:textIsSelectable="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_cover" app:layout_constraintTop_toTopOf="parent"
tools:text="Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content" /> tools:text="Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content" />
<View <View
android:id="@+id/manga_info_scrim" android:id="@+id/manga_info_scrim"
@ -247,35 +246,39 @@
android:layout_height="18sp" android:layout_height="18sp"
android:background="@drawable/manga_info_more_gradient" android:background="@drawable/manga_info_more_gradient"
android:backgroundTint="?android:attr/colorBackground" android:backgroundTint="?android:attr/colorBackground"
app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text" app:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more"
app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more" app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more"
app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more" /> app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more"
app:layout_constraintTop_toTopOf="@+id/manga_info_toggle_more" />
<com.google.android.material.button.MaterialButton <ImageButton
android:id="@+id/manga_info_toggle_more" android:id="@+id/manga_info_toggle_more"
style="@style/Widget.Tachiyomi.Button.InlineButton" style="@style/Widget.Tachiyomi.Button.InlineButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/ic_expand_more_24dp" android:layout_marginBottom="-4dp"
android:backgroundTint="?android:attr/textColorPrimary" android:paddingStart="0dp"
app:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more" android:paddingEnd="0dp"
app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more" android:src="@drawable/ic_expand_more_24dp"
app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more" /> app:layout_constraintBottom_toBottomOf="@id/manga_summary_text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:tint="?android:attr/textColorPrimary" />
<com.google.android.material.button.MaterialButton <ImageButton
android:id="@+id/manga_info_toggle_less" android:id="@+id/manga_info_toggle_less"
style="@style/Widget.Tachiyomi.Button.InlineButton" style="@style/Widget.Tachiyomi.Button.InlineButton"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/ic_expand_less_24dp"
android:backgroundTint="?android:attr/textColorPrimary"
android:paddingStart="8dp" android:paddingStart="8dp"
android:paddingEnd="8dp" android:paddingEnd="8dp"
android:src="@drawable/ic_expand_less_24dp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_summary_text" app:layout_constraintTop_toBottomOf="@+id/manga_summary_text"
tools:visibility="gone" /> app:tint="?android:attr/textColorPrimary"
tools:visibility="visible" />
<HorizontalScrollView <HorizontalScrollView
android:id="@+id/manga_genres_tags_compact" android:id="@+id/manga_genres_tags_compact"
@ -330,6 +333,7 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less"/> app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less"/>
</androidx.constraintlayout.motion.widget.MotionLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -63,18 +63,18 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintTop_toTopOf="@id/manga_cover_barrier"
app:layout_constraintBottom_toBottomOf="@id/manga_info_barrier" app:layout_constraintBottom_toBottomOf="@id/manga_info_barrier"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/manga_cover"> app:layout_constraintStart_toEndOf="@+id/manga_cover"
app:layout_constraintTop_toTopOf="@id/manga_cover_barrier">
<TextView <TextView
android:id="@+id/manga_full_title" android:id="@+id/manga_full_title"
style="@style/TextAppearance.Medium.Title" style="@style/TextAppearance.Medium.Title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textIsSelectable="false" android:text="@string/manga_info_full_title_label"
android:text="@string/manga_info_full_title_label" /> android:textIsSelectable="false" />
<TextView <TextView
android:id="@+id/manga_author" android:id="@+id/manga_author"
@ -155,8 +155,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -216,30 +216,29 @@
app:layout_constraintTop_toBottomOf="@+id/manga_actions" app:layout_constraintTop_toBottomOf="@+id/manga_actions"
tools:visibility="gone" /> tools:visibility="gone" />
<androidx.constraintlayout.motion.widget.MotionLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/manga_summary_section" android:id="@+id/manga_summary_section"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/metadata_view" app:layout_constraintTop_toBottomOf="@id/metadata_view">
app:layoutDescription="@xml/manga_summary_section_scene">
<TextView <TextView
android:id="@+id/manga_summary_text" android:id="@+id/manga_summary_text"
style="@style/TextAppearance.Regular.Body1.Secondary" style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:clickable="true" android:clickable="true"
android:ellipsize="end"
android:focusable="true" android:focusable="true"
android:maxLines="3" android:maxLines="3"
android:ellipsize="end"
android:textIsSelectable="false" android:textIsSelectable="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_cover" app:layout_constraintTop_toTopOf="parent"
tools:text="Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content" /> tools:text="Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content" />
<View <View
@ -258,35 +257,39 @@
android:layout_height="18sp" android:layout_height="18sp"
android:background="@drawable/manga_info_more_gradient" android:background="@drawable/manga_info_more_gradient"
android:backgroundTint="?android:attr/colorBackground" android:backgroundTint="?android:attr/colorBackground"
app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text" app:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more"
app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more" app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more"
app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more" /> app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more"
app:layout_constraintTop_toTopOf="@+id/manga_info_toggle_more" />
<com.google.android.material.button.MaterialButton <ImageButton
android:id="@+id/manga_info_toggle_more" android:id="@+id/manga_info_toggle_more"
style="@style/Widget.Tachiyomi.Button.InlineButton" style="@style/Widget.Tachiyomi.Button.InlineButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/ic_expand_more_24dp" android:layout_marginBottom="-4dp"
android:backgroundTint="?android:attr/textColorPrimary" android:paddingStart="0dp"
app:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more" android:paddingEnd="0dp"
app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more" android:src="@drawable/ic_expand_more_24dp"
app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more" /> app:layout_constraintBottom_toBottomOf="@id/manga_summary_text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:tint="?android:attr/textColorPrimary" />
<com.google.android.material.button.MaterialButton <ImageButton
android:id="@+id/manga_info_toggle_less" android:id="@+id/manga_info_toggle_less"
style="@style/Widget.Tachiyomi.Button.InlineButton" style="@style/Widget.Tachiyomi.Button.InlineButton"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/ic_expand_less_24dp"
android:backgroundTint="?android:attr/textColorPrimary"
android:paddingStart="8dp" android:paddingStart="8dp"
android:paddingEnd="8dp" android:paddingEnd="8dp"
android:src="@drawable/ic_expand_less_24dp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_summary_text" app:layout_constraintTop_toBottomOf="@+id/manga_summary_text"
tools:visibility="gone" /> app:tint="?android:attr/textColorPrimary"
tools:visibility="visible" />
<HorizontalScrollView <HorizontalScrollView
android:id="@+id/manga_genres_tags_compact" android:id="@+id/manga_genres_tags_compact"
@ -341,6 +344,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less"/> app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less"/>
</androidx.constraintlayout.motion.widget.MotionLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,153 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:motion="http://schemas.android.com/apk/res-auto">
<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
android:id="@+id/manga_summary_section_transition"
motion:duration="1">
<KeyFrameSet></KeyFrameSet>
<OnClick motion:clickAction="toggle" />
</Transition>
<ConstraintSet android:id="@+id/start">
<Constraint
android:id="@+id/manga_info_toggle_more_scrim"
android:layout_width="36sp"
android:layout_height="18sp"
motion:layout_constraintEnd_toEndOf="@+id/manga_summary_text"
motion:layout_constraintStart_toStartOf="@+id/manga_summary_text"
motion:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
android:visibility="visible" />
<Constraint
android:id="@+id/manga_info_toggle_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintBottom_toBottomOf="@id/manga_summary_text"
android:layout_marginBottom="-4dp" />
<Constraint
android:id="@+id/manga_info_toggle_less"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@id/manga_summary_text" />
<Constraint
android:id="@+id/manga_genres_tags_compact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_more" />
<!-- <Constraint
android:id="@+id/manga_genres_tags_full_chips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:visibility="gone"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less" />-->
<Constraint
android:id="@+id/genre_groups"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:visibility="gone"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less" />
<Constraint
android:layout_width="0dp"
android:layout_height="wrap_content"
motion:layout_constraintTop_toBottomOf="@+id/manga_cover"
android:layout_marginStart="16dp"
motion:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="8dp"
android:id="@+id/manga_summary_text"
motion:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="16dp" />
</ConstraintSet>
<ConstraintSet android:id="@+id/end">
<Constraint
android:id="@+id/manga_summary_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_cover"
motion:visibilityMode="ignore" />
<Constraint
android:id="@+id/manga_info_scrim"
motion:layout_constraintEnd_toEndOf="@+id/manga_summary_text"
android:layout_width="0dp"
android:layout_height="24sp"
motion:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
motion:layout_constraintStart_toStartOf="@+id/manga_summary_text"
android:visibility="invisible" />
<Constraint
android:id="@+id/manga_info_toggle_more_scrim"
android:layout_width="36sp"
android:layout_height="18sp"
motion:layout_constraintEnd_toEndOf="@+id/manga_summary_text"
motion:layout_constraintStart_toStartOf="@+id/manga_summary_text"
motion:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
android:visibility="gone" />
<Constraint
android:id="@+id/manga_info_toggle_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintBottom_toBottomOf="@id/manga_summary_text" />
<Constraint
android:id="@+id/manga_info_toggle_less"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@id/manga_summary_text" />
<Constraint
android:id="@+id/manga_genres_tags_compact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_more" />
<!-- <Constraint
android:id="@+id/manga_genres_tags_full_chips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:visibility="visible"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less" />-->
<Constraint
android:id="@+id/genre_groups"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:visibility="visible"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less" />
</ConstraintSet>
</MotionScene>