mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 11:28:41 +01:00
Layout improvement
This commit is contained in:
@@ -46,18 +46,19 @@ public class FragmentSetup extends FragmentEx {
|
||||
private Button btnAccount;
|
||||
private ProgressBar pbAccount;
|
||||
private TextView tvAccountDone;
|
||||
private Button btnAccountManage;
|
||||
|
||||
private Button btnIdentity;
|
||||
private ProgressBar pbIdentity;
|
||||
private TextView tvIdentityDone;
|
||||
private Button btnIdentityManage;
|
||||
|
||||
private Button btnPermissions;
|
||||
private TextView tvPermissionsDone;
|
||||
|
||||
private CheckBox cbDarkTheme;
|
||||
|
||||
private Button btnAccountManage;
|
||||
private Button btnIdentityManage;
|
||||
|
||||
private ExecutorService executor = Executors.newCachedThreadPool();
|
||||
|
||||
private static final String[] permissions = new String[]{
|
||||
@@ -75,18 +76,19 @@ public class FragmentSetup extends FragmentEx {
|
||||
btnAccount = view.findViewById(R.id.btnAccount);
|
||||
pbAccount = view.findViewById(R.id.pbAccount);
|
||||
tvAccountDone = view.findViewById(R.id.tvAccountDone);
|
||||
btnAccountManage = view.findViewById(R.id.btnAccountManage);
|
||||
|
||||
btnIdentity = view.findViewById(R.id.btnIdentity);
|
||||
pbIdentity = view.findViewById(R.id.pbIdentity);
|
||||
tvIdentityDone = view.findViewById(R.id.tvIdentityDone);
|
||||
btnIdentityManage = view.findViewById(R.id.btnIdentityManage);
|
||||
|
||||
btnPermissions = view.findViewById(R.id.btnPermissions);
|
||||
tvPermissionsDone = view.findViewById(R.id.tvPermissionsDone);
|
||||
|
||||
cbDarkTheme = view.findViewById(R.id.cbDarkTheme);
|
||||
|
||||
btnAccountManage = view.findViewById(R.id.btnAccountManage);
|
||||
btnIdentityManage = view.findViewById(R.id.btnIdentityManage);
|
||||
|
||||
// Wire controls
|
||||
|
||||
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() {
|
||||
private boolean once;
|
||||
|
||||
@@ -166,6 +158,23 @@ public class FragmentSetup extends FragmentEx {
|
||||
}
|
||||
});
|
||||
|
||||
btnPermissions.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
requestPermissions(permissions, 1);
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
btnIdentityManage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -176,13 +185,6 @@ public class FragmentSetup extends FragmentEx {
|
||||
}
|
||||
});
|
||||
|
||||
btnPermissions.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
requestPermissions(permissions, 1);
|
||||
}
|
||||
});
|
||||
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
String theme = prefs.getString("theme", "light");
|
||||
boolean dark = "dark".equals(theme);
|
||||
|
||||
Reference in New Issue
Block a user