diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/DataBindingAdapters.kt b/app/src/main/java/com/topjohnwu/magisk/utils/DataBindingAdapters.kt index 9d8c0d3d5..7e8a4dee2 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/DataBindingAdapters.kt +++ b/app/src/main/java/com/topjohnwu/magisk/utils/DataBindingAdapters.kt @@ -14,10 +14,7 @@ import androidx.annotation.DrawableRes import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.Toolbar import androidx.core.animation.doOnEnd -import androidx.core.view.isInvisible -import androidx.core.view.isVisible -import androidx.core.view.postDelayed -import androidx.core.view.updateLayoutParams +import androidx.core.view.* import androidx.databinding.BindingAdapter import androidx.databinding.InverseBindingAdapter import androidx.databinding.InverseBindingListener @@ -408,4 +405,9 @@ fun MaterialCardView.setCardStrokeWidthBound(stroke: Float) { @BindingAdapter("onMenuClick") fun Toolbar.setOnMenuClickListener(listener: Toolbar.OnMenuItemClickListener) { setOnMenuItemClickListener(listener) +} + +@BindingAdapter("tooltipText") +fun View.setTooltipTextCompat(text: String) { + ViewCompat.setTooltipText(this, text) } \ No newline at end of file diff --git a/app/src/main/res/layout/item_policy_md2.xml b/app/src/main/res/layout/item_policy_md2.xml index 215a2bac6..710fdfc59 100644 --- a/app/src/main/res/layout/item_policy_md2.xml +++ b/app/src/main/res/layout/item_policy_md2.xml @@ -23,7 +23,8 @@ android:alpha="@{item.isEnabled() ? 1f : .5f}" android:onClick="@{() -> item.toggle(viewModel)}" tools:layout_marginBottom="@dimen/l1" - tools:layout_marginEnd="@dimen/l1"> + tools:layout_marginEnd="@dimen/l1" + tools:layout_width="200dp"> + app:layout_constraintTop_toBottomOf="@+id/package_name" + tools:visibility="visible"> - + app:rippleColor="?colorError" /> diff --git a/app/src/main/res/values/strings_md2.xml b/app/src/main/res/values/strings_md2.xml index 6f01e8357..278e3cb14 100644 --- a/app/src/main/res/values/strings_md2.xml +++ b/app/src/main/res/values/strings_md2.xml @@ -70,4 +70,8 @@ You\'re in safe mode. None of user modules will work.\nThis message will disappear once safe mode is disabled. + Toggles logging + Toggles “toast” notifications + Revoke + \ No newline at end of file