Skip to content

Commit

Permalink
fix: title height
Browse files Browse the repository at this point in the history
  • Loading branch information
aayush2622 committed Apr 30, 2024
1 parent 4233003 commit 0ea1ec1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ package ani.dantotsu.media

import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.updateLayoutParams
import androidx.recyclerview.widget.GridLayoutManager
import ani.dantotsu.databinding.ActivityMediaListViewBinding
import ani.dantotsu.getThemeColor
import ani.dantotsu.initActivity
import ani.dantotsu.navBarHeight
import ani.dantotsu.statusBarHeight
import ani.dantotsu.themes.ThemeManager
import java.util.ArrayList

Expand All @@ -27,7 +31,10 @@ class MediaListViewActivity: AppCompatActivity() {
window.navigationBarColor = primaryColor
binding.listAppBar.setBackgroundColor(primaryColor)
binding.listTitle.setTextColor(primaryTextColor)

binding.root.updateLayoutParams<ViewGroup.MarginLayoutParams> {
topMargin = statusBarHeight
bottomMargin = navBarHeight
}
val screenWidth = resources.displayMetrics.run { widthPixels / density }
binding.listTitle.text = intent.getStringExtra("title")
binding.mediaRecyclerView.adapter = MediaAdaptor(0, mediaList, this)
Expand Down

0 comments on commit 0ea1ec1

Please sign in to comment.