mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
code cleanup
This commit is contained in:
parent
c3584a6db7
commit
aa1b9de20c
@ -52,7 +52,7 @@ public class AccountAdapter extends ArrayAdapter<Account> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
final Switch tglAccountState = (Switch) view.findViewById(R.id.tgl_account_status);
|
final Switch tglAccountState = (Switch) view.findViewById(R.id.tgl_account_status);
|
||||||
final boolean isDisabled = (account.getStatus() == Account.State.DISABLED) ? true : false;
|
final boolean isDisabled = (account.getStatus() == Account.State.DISABLED);
|
||||||
tglAccountState.setOnCheckedChangeListener(null);
|
tglAccountState.setOnCheckedChangeListener(null);
|
||||||
tglAccountState.setChecked(!isDisabled);
|
tglAccountState.setChecked(!isDisabled);
|
||||||
tglAccountState.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
tglAccountState.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
Loading…
Reference in New Issue
Block a user