mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 19:15:58 +00:00
use state to control RadioButtonItem and CheckBoxItem
This commit is contained in:
@@ -567,22 +567,22 @@ private fun CredentialManagePolicy(pkgName: String) {
|
||||
Spacer(Modifier.padding(vertical = 5.dp))
|
||||
RadioButtonItem(
|
||||
stringResource(R.string.none),
|
||||
{ policyType==-1 }, { policyType=-1 }
|
||||
policyType == -1, { policyType = -1 }
|
||||
)
|
||||
RadioButtonItem(
|
||||
stringResource(R.string.blacklist),
|
||||
{ policyType==PACKAGE_POLICY_BLOCKLIST },
|
||||
{ policyType=PACKAGE_POLICY_BLOCKLIST }
|
||||
policyType == PACKAGE_POLICY_BLOCKLIST,
|
||||
{ policyType = PACKAGE_POLICY_BLOCKLIST }
|
||||
)
|
||||
RadioButtonItem(
|
||||
stringResource(R.string.whitelist),
|
||||
{ policyType==PACKAGE_POLICY_ALLOWLIST },
|
||||
{ policyType=PACKAGE_POLICY_ALLOWLIST }
|
||||
policyType == PACKAGE_POLICY_ALLOWLIST,
|
||||
{ policyType = PACKAGE_POLICY_ALLOWLIST }
|
||||
)
|
||||
RadioButtonItem(
|
||||
stringResource(R.string.whitelist_and_system_app),
|
||||
{ policyType==PACKAGE_POLICY_ALLOWLIST_AND_SYSTEM },
|
||||
{ policyType=PACKAGE_POLICY_ALLOWLIST_AND_SYSTEM }
|
||||
policyType == PACKAGE_POLICY_ALLOWLIST_AND_SYSTEM,
|
||||
{ policyType = PACKAGE_POLICY_ALLOWLIST_AND_SYSTEM }
|
||||
)
|
||||
Spacer(Modifier.padding(vertical = 5.dp))
|
||||
AnimatedVisibility(policyType != -1) {
|
||||
|
||||
Reference in New Issue
Block a user