如何以编程方式拒绝某些应用程序权限或在marshmallow中一次拒绝所有应用程序权限?
我不想撤销它们,我只是想从我的应用程序中关闭它们,而不是通过应用程序设置.我知道我可以使用Intent打开应用程序设置并以这种方式更改它们.那对我来说不是一个选择.
谢谢!
是否有选项可以MaterialButtonToggleGroup在使用时选择所需的按钮app:singleSelection="true"?
当单击不同的按钮工作正常(所有其他按钮都被取消选择),但是当您单击同一个(已选择)按钮时,它会自行取消选择它,我想保持选中状态。
我的例子:
<com.google.android.material.button.MaterialButtonToggleGroup
android:layout_width="wrap"
android:layout_height="wrap_content"
app:singleSelection="true">
<com.google.android.material.button.MaterialButton
android:id="@+id/filterA"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="A"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/filterB"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="B"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/filterC"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="C"/>
</com.google.android.material.button.MaterialButtonToggleGroup>
Run Code Online (Sandbox Code Playgroud) android android-button android-togglebutton material-components material-components-android
android ×2