Don't direct reference R id

This commit is contained in:
topjohnwu 2020-01-23 02:23:42 +08:00
parent 3a10597aed
commit 36513c2301
6 changed files with 11 additions and 23 deletions

View File

@ -5,8 +5,6 @@
<data>
<import type="com.topjohnwu.magisk.R" />
<variable
name="viewModel"
type="com.topjohnwu.magisk.ui.hide.HideViewModel" />
@ -19,7 +17,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/hide_content"
dividerVertical="@{R.drawable.divider_l1}"
dividerVertical="@{@drawable/divider_l1}"
invisibleUnless="@{viewModel.loaded || !viewModel.items.empty}"
itemBinding="@{viewModel.itemBinding}"
items="@{viewModel.items}"

View File

@ -7,8 +7,6 @@
<import type="android.os.Build" />
<import type="com.topjohnwu.magisk.R" />
<import type="com.topjohnwu.magisk.core.Info" />
<import type="com.topjohnwu.magisk.core.InfoKt" />
@ -781,8 +779,8 @@
android:textAppearance="@style/AppearanceFoundation.Caption.Variant" />
<androidx.recyclerview.widget.RecyclerView
dividerHorizontal="@{R.drawable.divider_l1}"
dividerVertical="@{R.drawable.divider_l1}"
dividerHorizontal="@{@drawable/divider_l1}"
dividerVertical="@{@drawable/divider_l1}"
itemBinding="@{viewModel.itemDeveloperBinding}"
items="@{viewModel.items}"
android:layout_width="match_parent"

View File

@ -5,8 +5,6 @@
<data>
<import type="com.topjohnwu.magisk.R" />
<import type="com.topjohnwu.magisk.core.Config" />
<variable
@ -22,8 +20,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/module_list"
adapter="@{viewModel.adapter}"
dividerHorizontal="@{R.drawable.divider_l1}"
dividerVertical="@{R.drawable.divider_l1}"
dividerHorizontal="@{@drawable/divider_l1}"
dividerVertical="@{@drawable/divider_l1}"
gone="@{viewModel.loading &amp;&amp; viewModel.items.empty}"
itemBinding="@{viewModel.itemBinding}"
items="@{viewModel.items}"

View File

@ -5,8 +5,6 @@
<data>
<import type="com.topjohnwu.magisk.R" />
<variable
name="viewModel"
type="com.topjohnwu.magisk.ui.settings.SettingsViewModel" />
@ -15,8 +13,8 @@
<androidx.recyclerview.widget.RecyclerView
adapter="@{viewModel.adapter}"
dividerHorizontal="@{R.drawable.divider_l_50}"
dividerVertical="@{R.drawable.divider_l_50}"
dividerHorizontal="@{@drawable/divider_l_50}"
dividerVertical="@{@drawable/divider_l_50}"
itemBinding="@{viewModel.itemBinding}"
items="@{viewModel.items}"
android:id="@+id/settings_list"

View File

@ -5,8 +5,6 @@
<data>
<import type="com.topjohnwu.magisk.R" />
<variable
name="viewModel"
type="com.topjohnwu.magisk.ui.superuser.SuperuserViewModel" />
@ -20,8 +18,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/superuser_list"
adapter="@{viewModel.adapter}"
dividerHorizontal="@{R.drawable.divider_l1}"
dividerVertical="@{R.drawable.divider_l1}"
dividerHorizontal="@{@drawable/divider_l1}"
dividerVertical="@{@drawable/divider_l1}"
goneUnless="@{viewModel.loaded || !viewModel.items.empty}"
itemBinding="@{viewModel.itemBinding}"
items="@{viewModel.items}"

View File

@ -5,8 +5,6 @@
<data>
<import type="com.topjohnwu.magisk.R" />
<variable
name="viewModel"
type="com.topjohnwu.magisk.ui.module.ModuleViewModel" />
@ -24,8 +22,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/module_filter_list"
dividerHorizontal="@{R.drawable.divider_l1}"
dividerVertical="@{R.drawable.divider_l1}"
dividerHorizontal="@{@drawable/divider_l1}"
dividerVertical="@{@drawable/divider_l1}"
itemBinding="@{viewModel.itemSearchBinding}"
items="@{viewModel.itemsSearch}"
android:layout_width="match_parent"