Skip to content

Commit

Permalink
fix: #184 constraint layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed Feb 6, 2024
1 parent c0f3fed commit 0c6fad9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/ani/dantotsu/home/AnimePageAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
currContext()?.theme?.resolveAttribute(android.R.attr.windowBackground, typedValue, true)
val color = typedValue.data

textInputLayout.boxBackgroundColor = (color and 0x00FFFFFF) or 0x28000000.toInt()
materialCardView.setCardBackgroundColor((color and 0x00FFFFFF) or 0x28000000.toInt())
textInputLayout.boxBackgroundColor = (color and 0x00FFFFFF) or 0x28000000
materialCardView.setCardBackgroundColor((color and 0x00FFFFFF) or 0x28000000)

binding.animeTitleContainer.updatePadding(top = statusBarHeight)

Expand Down
34 changes: 13 additions & 21 deletions app/src/main/res/layout/item_anime_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,22 @@

</FrameLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/horizontalScrollView20"
android:layout_width="match_parent"
<HorizontalScrollView
android:id="@+id/animeSeasons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:layout_gravity="center_horizontal"
android:fillViewport="true"
android:paddingStart="2dp"
android:paddingEnd="2dp"
android:scrollbarSize="0dp">

<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:id="@+id/animeSeasonsCont"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
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">
android:orientation="horizontal">

<com.google.android.material.chip.Chip
android:id="@+id/animeThisSeason"
Expand All @@ -128,10 +127,7 @@
android:layout_marginEnd="8dp"
android:text="@string/next_season"
android:textAppearance="@style/Suffix"
app:chipStrokeColor="?attr/colorPrimaryContainer"
app:layout_constraintBaseline_toBaselineOf="@+id/animePreviousSeason"
app:layout_constraintEnd_toStartOf="@+id/animePreviousSeason"
app:layout_constraintStart_toEndOf="@+id/animeThisSeason" />
app:chipStrokeColor="?attr/colorPrimaryContainer" />

<com.google.android.material.chip.Chip
android:id="@+id/animePreviousSeason"
Expand All @@ -142,14 +138,10 @@
android:textAppearance="@style/Suffix"
app:chipStrokeColor="?attr/colorPrimaryContainer"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/animeNextSeason"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5" />

app:layout_constraintEnd_toEndOf="parent" />
</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</HorizontalScrollView>


<androidx.constraintlayout.widget.ConstraintLayout
Expand Down

0 comments on commit 0c6fad9

Please sign in to comment.