diff --git a/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/ModuleRvItem.kt b/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/ModuleRvItem.kt index a6c1e4037..87ee8eaf3 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/ModuleRvItem.kt +++ b/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/ModuleRvItem.kt @@ -84,6 +84,12 @@ class RepoRvItem(val item: Repo) : ComparableRvItem() { object InstallModule : ComparableRvItem() { override val layoutRes = R.layout.item_module_download + override fun onBindingBound(binding: ViewDataBinding) { + super.onBindingBound(binding) + val params = binding.root.layoutParams as? StaggeredGridLayoutManager.LayoutParams + params?.isFullSpan = true + } + override fun contentSameAs(other: InstallModule) = this == other override fun itemSameAs(other: InstallModule) = this === other } @@ -116,8 +122,8 @@ class SectionTitle( override fun onBindingBound(binding: ViewDataBinding) { super.onBindingBound(binding) - val params = binding.root.layoutParams as StaggeredGridLayoutManager.LayoutParams - params.isFullSpan = true + val params = binding.root.layoutParams as? StaggeredGridLayoutManager.LayoutParams + params?.isFullSpan = true } override fun itemSameAs(other: SectionTitle): Boolean = this === other diff --git a/app/src/main/res/layout/item_module_download.xml b/app/src/main/res/layout/item_module_download.xml index 1bfb357f9..5a4e8e825 100644 --- a/app/src/main/res/layout/item_module_download.xml +++ b/app/src/main/res/layout/item_module_download.xml @@ -1,7 +1,6 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> @@ -16,15 +15,15 @@ + app:iconPadding="@dimen/l_50" /> diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index f43a01a0f..07957fced 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -24,6 +24,8 @@ + + diff --git a/app/src/main/res/values/styles_md2.xml b/app/src/main/res/values/styles_md2.xml index 51d1ea35f..30a2be50c 100644 --- a/app/src/main/res/values/styles_md2.xml +++ b/app/src/main/res/values/styles_md2.xml @@ -36,6 +36,10 @@ @style/WidgetFoundation.Button @style/WidgetFoundation.Button.OnPrimary + @style/WidgetFoundation.Button.Outlined + + @style/WidgetFoundation.Button.Outlined.OnPrimary + @style/WidgetFoundation.Button.Flat @style/WidgetFoundation.Button.Flat.OnPrimary @style/WidgetFoundation.Button.Text diff --git a/app/src/main/res/values/styles_md2_impl.xml b/app/src/main/res/values/styles_md2_impl.xml index 044834786..b5034dc4a 100644 --- a/app/src/main/res/values/styles_md2_impl.xml +++ b/app/src/main/res/values/styles_md2_impl.xml @@ -66,6 +66,21 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml. ?colorPrimary + + + +