|
@ -46,18 +46,19 @@ public class FragmentSetup extends FragmentEx { |
|
|
private Button btnAccount; |
|
|
private Button btnAccount; |
|
|
private ProgressBar pbAccount; |
|
|
private ProgressBar pbAccount; |
|
|
private TextView tvAccountDone; |
|
|
private TextView tvAccountDone; |
|
|
private Button btnAccountManage; |
|
|
|
|
|
|
|
|
|
|
|
private Button btnIdentity; |
|
|
private Button btnIdentity; |
|
|
private ProgressBar pbIdentity; |
|
|
private ProgressBar pbIdentity; |
|
|
private TextView tvIdentityDone; |
|
|
private TextView tvIdentityDone; |
|
|
private Button btnIdentityManage; |
|
|
|
|
|
|
|
|
|
|
|
private Button btnPermissions; |
|
|
private Button btnPermissions; |
|
|
private TextView tvPermissionsDone; |
|
|
private TextView tvPermissionsDone; |
|
|
|
|
|
|
|
|
private CheckBox cbDarkTheme; |
|
|
private CheckBox cbDarkTheme; |
|
|
|
|
|
|
|
|
|
|
|
private Button btnAccountManage; |
|
|
|
|
|
private Button btnIdentityManage; |
|
|
|
|
|
|
|
|
private ExecutorService executor = Executors.newCachedThreadPool(); |
|
|
private ExecutorService executor = Executors.newCachedThreadPool(); |
|
|
|
|
|
|
|
|
private static final String[] permissions = new String[]{ |
|
|
private static final String[] permissions = new String[]{ |
|
@ -75,18 +76,19 @@ public class FragmentSetup extends FragmentEx { |
|
|
btnAccount = view.findViewById(R.id.btnAccount); |
|
|
btnAccount = view.findViewById(R.id.btnAccount); |
|
|
pbAccount = view.findViewById(R.id.pbAccount); |
|
|
pbAccount = view.findViewById(R.id.pbAccount); |
|
|
tvAccountDone = view.findViewById(R.id.tvAccountDone); |
|
|
tvAccountDone = view.findViewById(R.id.tvAccountDone); |
|
|
btnAccountManage = view.findViewById(R.id.btnAccountManage); |
|
|
|
|
|
|
|
|
|
|
|
btnIdentity = view.findViewById(R.id.btnIdentity); |
|
|
btnIdentity = view.findViewById(R.id.btnIdentity); |
|
|
pbIdentity = view.findViewById(R.id.pbIdentity); |
|
|
pbIdentity = view.findViewById(R.id.pbIdentity); |
|
|
tvIdentityDone = view.findViewById(R.id.tvIdentityDone); |
|
|
tvIdentityDone = view.findViewById(R.id.tvIdentityDone); |
|
|
btnIdentityManage = view.findViewById(R.id.btnIdentityManage); |
|
|
|
|
|
|
|
|
|
|
|
btnPermissions = view.findViewById(R.id.btnPermissions); |
|
|
btnPermissions = view.findViewById(R.id.btnPermissions); |
|
|
tvPermissionsDone = view.findViewById(R.id.tvPermissionsDone); |
|
|
tvPermissionsDone = view.findViewById(R.id.tvPermissionsDone); |
|
|
|
|
|
|
|
|
cbDarkTheme = view.findViewById(R.id.cbDarkTheme); |
|
|
cbDarkTheme = view.findViewById(R.id.cbDarkTheme); |
|
|
|
|
|
|
|
|
|
|
|
btnAccountManage = view.findViewById(R.id.btnAccountManage); |
|
|
|
|
|
btnIdentityManage = view.findViewById(R.id.btnIdentityManage); |
|
|
|
|
|
|
|
|
// Wire controls |
|
|
// Wire controls |
|
|
|
|
|
|
|
|
btnAccount.setOnClickListener(new View.OnClickListener() { |
|
|
btnAccount.setOnClickListener(new View.OnClickListener() { |
|
@ -123,16 +125,6 @@ public class FragmentSetup extends FragmentEx { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
btnAccountManage.setOnClickListener(new View.OnClickListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(View view) { |
|
|
|
|
|
//getFragmentManager().popBackStack(); |
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); |
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentAccounts()).addToBackStack("accounts"); |
|
|
|
|
|
fragmentTransaction.commit(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
btnIdentity.setOnClickListener(new View.OnClickListener() { |
|
|
btnIdentity.setOnClickListener(new View.OnClickListener() { |
|
|
private boolean once; |
|
|
private boolean once; |
|
|
|
|
|
|
|
@ -166,20 +158,30 @@ public class FragmentSetup extends FragmentEx { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
btnIdentityManage.setOnClickListener(new View.OnClickListener() { |
|
|
|
|
|
|
|
|
btnPermissions.setOnClickListener(new View.OnClickListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(View view) { |
|
|
|
|
|
requestPermissions(permissions, 1); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
btnAccountManage.setOnClickListener(new View.OnClickListener() { |
|
|
@Override |
|
|
@Override |
|
|
public void onClick(View view) { |
|
|
public void onClick(View view) { |
|
|
//getFragmentManager().popBackStack(); |
|
|
//getFragmentManager().popBackStack(); |
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); |
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); |
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentIdentities()).addToBackStack("identities"); |
|
|
|
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentAccounts()).addToBackStack("accounts"); |
|
|
fragmentTransaction.commit(); |
|
|
fragmentTransaction.commit(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
btnPermissions.setOnClickListener(new View.OnClickListener() { |
|
|
|
|
|
|
|
|
btnIdentityManage.setOnClickListener(new View.OnClickListener() { |
|
|
@Override |
|
|
@Override |
|
|
public void onClick(View view) { |
|
|
public void onClick(View view) { |
|
|
requestPermissions(permissions, 1); |
|
|
|
|
|
|
|
|
//getFragmentManager().popBackStack(); |
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); |
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentIdentities()).addToBackStack("identities"); |
|
|
|
|
|
fragmentTransaction.commit(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|