fix: #184 constraint layout

This commit is contained in:
rebelonion 2024-02-06 01:39:57 -06:00
parent c0f3fed142
commit 0c6fad91ca
2 changed files with 15 additions and 23 deletions

View file

@ -65,8 +65,8 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
currContext()?.theme?.resolveAttribute(android.R.attr.windowBackground, typedValue, true) currContext()?.theme?.resolveAttribute(android.R.attr.windowBackground, typedValue, true)
val color = typedValue.data val color = typedValue.data
textInputLayout.boxBackgroundColor = (color and 0x00FFFFFF) or 0x28000000.toInt() textInputLayout.boxBackgroundColor = (color and 0x00FFFFFF) or 0x28000000
materialCardView.setCardBackgroundColor((color and 0x00FFFFFF) or 0x28000000.toInt()) materialCardView.setCardBackgroundColor((color and 0x00FFFFFF) or 0x28000000)
binding.animeTitleContainer.updatePadding(top = statusBarHeight) binding.animeTitleContainer.updatePadding(top = statusBarHeight)

View file

@ -91,23 +91,22 @@
</FrameLayout> </FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout <HorizontalScrollView
android:id="@+id/horizontalScrollView20" android:id="@+id/animeSeasons"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clipToPadding="false" android:clipToPadding="false"
android:layout_gravity="center_horizontal"
android:fillViewport="true"
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:scrollbarSize="0dp"> android:scrollbarSize="0dp">
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:id="@+id/animeSeasonsCont" android:id="@+id/animeSeasonsCont"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" android:orientation="horizontal">
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5">
<com.google.android.material.chip.Chip <com.google.android.material.chip.Chip
android:id="@+id/animeThisSeason" android:id="@+id/animeThisSeason"
@ -128,10 +127,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:text="@string/next_season" android:text="@string/next_season"
android:textAppearance="@style/Suffix" android:textAppearance="@style/Suffix"
app:chipStrokeColor="?attr/colorPrimaryContainer" app:chipStrokeColor="?attr/colorPrimaryContainer" />
app:layout_constraintBaseline_toBaselineOf="@+id/animePreviousSeason"
app:layout_constraintEnd_toStartOf="@+id/animePreviousSeason"
app:layout_constraintStart_toEndOf="@+id/animeThisSeason" />
<com.google.android.material.chip.Chip <com.google.android.material.chip.Chip
android:id="@+id/animePreviousSeason" android:id="@+id/animePreviousSeason"
@ -142,14 +138,10 @@
android:textAppearance="@style/Suffix" android:textAppearance="@style/Suffix"
app:chipStrokeColor="?attr/colorPrimaryContainer" app:chipStrokeColor="?attr/colorPrimaryContainer"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintStart_toEndOf="@+id/animeNextSeason" </LinearLayout>
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5" />
</HorizontalScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout