Browse Source

Layout improvements

main
M66B 6 years ago
parent
commit
8c2efa2486
7 changed files with 130 additions and 43 deletions
  1. +15
    -6
      app/src/main/java/eu/faircode/email/FragmentAccount.java
  2. +29
    -10
      app/src/main/java/eu/faircode/email/FragmentSetup.java
  3. +10
    -0
      app/src/main/res/drawable/baseline_check_24.xml
  4. +14
    -13
      app/src/main/res/layout/fragment_account.xml
  5. +55
    -14
      app/src/main/res/layout/fragment_setup.xml
  6. +1
    -0
      app/src/main/res/values/strings.xml
  7. +6
    -0
      app/src/main/res/values/styles.xml

+ 15
- 6
app/src/main/java/eu/faircode/email/FragmentAccount.java View File

@ -29,10 +29,10 @@ import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.graphics.Paint;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.preference.PreferenceManager;
import android.text.Editable; import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher; import android.text.TextWatcher;
@ -50,7 +50,6 @@ import android.widget.ImageButton;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.ScrollView; import android.widget.ScrollView;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
@ -90,8 +89,8 @@ public class FragmentAccount extends FragmentEx {
private TextInputLayout tilPassword; private TextInputLayout tilPassword;
private Button btnAdvanced; private Button btnAdvanced;
private EditText etName; private EditText etName;
private TextView tvSignaturePro;
private EditText etSignature; private EditText etSignature;
private ImageButton ibPro;
private CheckBox cbSynchronize; private CheckBox cbSynchronize;
private CheckBox cbPrimary; private CheckBox cbPrimary;
private Button btnCheck; private Button btnCheck;
@ -140,8 +139,9 @@ public class FragmentAccount extends FragmentEx {
btnAdvanced = view.findViewById(R.id.btnAdvanced); btnAdvanced = view.findViewById(R.id.btnAdvanced);
etName = view.findViewById(R.id.etName); etName = view.findViewById(R.id.etName);
tvSignaturePro = view.findViewById(R.id.tvSignaturePro);
etSignature = view.findViewById(R.id.etSignature); etSignature = view.findViewById(R.id.etSignature);
ibPro = view.findViewById(R.id.ibPro);
cbSynchronize = view.findViewById(R.id.cbSynchronize); cbSynchronize = view.findViewById(R.id.cbSynchronize);
cbPrimary = view.findViewById(R.id.cbPrimary); cbPrimary = view.findViewById(R.id.cbPrimary);
@ -248,8 +248,7 @@ public class FragmentAccount extends FragmentEx {
} }
}); });
tvSignaturePro.setPaintFlags(tvSignaturePro.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvSignaturePro.setOnClickListener(new View.OnClickListener() {
ibPro.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
@ -803,6 +802,16 @@ public class FragmentAccount extends FragmentEx {
Helper.setViewsEnabled(view, true); Helper.setViewsEnabled(view, true);
boolean pro = PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("pro", false);
etSignature.setHint(pro ? R.string.title_optional : R.string.title_pro_feature);
etSignature.setEnabled(pro);
if (pro) {
ViewGroup.LayoutParams lp = ibPro.getLayoutParams();
lp.height = 0;
lp.width = 0;
ibPro.setLayoutParams(lp);
}
cbPrimary.setEnabled(cbSynchronize.isChecked()); cbPrimary.setEnabled(cbSynchronize.isChecked());
// Consider previous check/save/delete as cancelled // Consider previous check/save/delete as cancelled


+ 29
- 10
app/src/main/java/eu/faircode/email/FragmentSetup.java View File

@ -26,6 +26,7 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
@ -38,10 +39,10 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import android.widget.ToggleButton;
import java.util.List; import java.util.List;
@ -67,10 +68,12 @@ public class FragmentSetup extends FragmentEx {
private Button btnData; private Button btnData;
private CheckBox cbDarkTheme;
private ToggleButton tbDarkTheme;
private Button btnOptions; private Button btnOptions;
private Drawable check;
private static final String[] permissions = new String[]{ private static final String[] permissions = new String[]{
Manifest.permission.READ_CONTACTS Manifest.permission.READ_CONTACTS
}; };
@ -80,6 +83,8 @@ public class FragmentSetup extends FragmentEx {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
setSubtitle(R.string.title_setup); setSubtitle(R.string.title_setup);
check = getResources().getDrawable(R.drawable.baseline_check_24, getContext().getTheme());
View view = inflater.inflate(R.layout.fragment_setup, container, false); View view = inflater.inflate(R.layout.fragment_setup, container, false);
// Get controls // Get controls
@ -97,7 +102,7 @@ public class FragmentSetup extends FragmentEx {
btnData = view.findViewById(R.id.btnData); btnData = view.findViewById(R.id.btnData);
cbDarkTheme = view.findViewById(R.id.cbDarkTheme);
tbDarkTheme = view.findViewById(R.id.tbDarkTheme);
btnOptions = view.findViewById(R.id.btnOptions); btnOptions = view.findViewById(R.id.btnOptions);
// Wire controls // Wire controls
@ -165,14 +170,14 @@ public class FragmentSetup extends FragmentEx {
String theme = prefs.getString("theme", "light"); String theme = prefs.getString("theme", "light");
boolean dark = "dark".equals(theme); boolean dark = "dark".equals(theme);
cbDarkTheme.setTag(dark);
cbDarkTheme.setChecked(dark);
cbDarkTheme.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
tbDarkTheme.setTag(dark);
tbDarkTheme.setChecked(dark);
tbDarkTheme.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton button, boolean checked) { public void onCheckedChanged(CompoundButton button, boolean checked) {
if (checked != (Boolean) button.getTag()) { if (checked != (Boolean) button.getTag()) {
button.setTag(checked); button.setTag(checked);
cbDarkTheme.setChecked(checked);
tbDarkTheme.setChecked(checked);
prefs.edit().putString("theme", checked ? "dark" : "light").apply(); prefs.edit().putString("theme", checked ? "dark" : "light").apply();
} }
} }
@ -190,11 +195,19 @@ public class FragmentSetup extends FragmentEx {
// Initialize // Initialize
tvAccountDone.setText(null); tvAccountDone.setText(null);
tvAccountDone.setCompoundDrawables(null, null, null, null);
btnIdentity.setEnabled(false); btnIdentity.setEnabled(false);
tvIdentityDone.setText(null); tvIdentityDone.setText(null);
tvIdentityDone.setCompoundDrawables(null, null, null, null);
tvPermissionsDone.setText(null); tvPermissionsDone.setText(null);
tvPermissionsDone.setCompoundDrawables(null, null, null, null);
btnDoze.setEnabled(false); btnDoze.setEnabled(false);
tvDozeDone.setText(null); tvDozeDone.setText(null);
tvDozeDone.setCompoundDrawables(null, null, null, null);
btnData.setVisibility(View.GONE); btnData.setVisibility(View.GONE);
int[] grantResults = new int[permissions.length]; int[] grantResults = new int[permissions.length];
@ -247,15 +260,19 @@ public class FragmentSetup extends FragmentEx {
db.account().liveAccounts(true).observe(getViewLifecycleOwner(), new Observer<List<EntityAccount>>() { db.account().liveAccounts(true).observe(getViewLifecycleOwner(), new Observer<List<EntityAccount>>() {
@Override @Override
public void onChanged(@Nullable List<EntityAccount> accounts) { public void onChanged(@Nullable List<EntityAccount> accounts) {
btnIdentity.setEnabled(accounts != null && accounts.size() > 0);
tvAccountDone.setText(accounts != null && accounts.size() > 0 ? R.string.title_setup_done : R.string.title_setup_to_do);
boolean done = (accounts != null && accounts.size() > 0);
btnIdentity.setEnabled(done);
tvAccountDone.setText(done ? R.string.title_setup_done : R.string.title_setup_to_do);
tvAccountDone.setCompoundDrawablesWithIntrinsicBounds(done ? check : null, null, null, null);
} }
}); });
db.identity().liveIdentities(true).observe(getViewLifecycleOwner(), new Observer<List<EntityIdentity>>() { db.identity().liveIdentities(true).observe(getViewLifecycleOwner(), new Observer<List<EntityIdentity>>() {
@Override @Override
public void onChanged(@Nullable List<EntityIdentity> identities) { public void onChanged(@Nullable List<EntityIdentity> identities) {
tvIdentityDone.setText(identities != null && identities.size() > 0 ? R.string.title_setup_done : R.string.title_setup_to_do);
boolean done = (identities != null && identities.size() > 0);
tvIdentityDone.setText(done ? R.string.title_setup_done : R.string.title_setup_to_do);
tvIdentityDone.setCompoundDrawablesWithIntrinsicBounds(done ? check : null, null, null, null);
} }
}); });
} }
@ -268,6 +285,7 @@ public class FragmentSetup extends FragmentEx {
boolean ignoring = pm.isIgnoringBatteryOptimizations(BuildConfig.APPLICATION_ID); boolean ignoring = pm.isIgnoringBatteryOptimizations(BuildConfig.APPLICATION_ID);
btnDoze.setEnabled(!ignoring); btnDoze.setEnabled(!ignoring);
tvDozeDone.setText(ignoring ? R.string.title_setup_done : R.string.title_setup_to_do); tvDozeDone.setText(ignoring ? R.string.title_setup_done : R.string.title_setup_to_do);
tvDozeDone.setCompoundDrawablesWithIntrinsicBounds(ignoring ? check : null, null, null, null);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
ConnectivityManager cm = getContext().getSystemService(ConnectivityManager.class); ConnectivityManager cm = getContext().getSystemService(ConnectivityManager.class);
@ -287,5 +305,6 @@ public class FragmentSetup extends FragmentEx {
btnPermissions.setEnabled(!has); btnPermissions.setEnabled(!has);
tvPermissionsDone.setText(has ? R.string.title_setup_done : R.string.title_setup_to_do); tvPermissionsDone.setText(has ? R.string.title_setup_done : R.string.title_setup_to_do);
tvPermissionsDone.setCompoundDrawablesWithIntrinsicBounds(has ? check : null, null, null, null);
} }
} }

+ 10
- 0
app/src/main/res/drawable/baseline_check_24.xml View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
</vector>

+ 14
- 13
app/src/main/res/layout/fragment_account.xml View File

@ -209,25 +209,26 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etName" /> app:layout_constraintTop_toBottomOf="@id/etName" />
<TextView
android:id="@+id/tvSignaturePro"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_pro_feature"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSignature" />
<EditText <EditText
android:id="@+id/etSignature" android:id="@+id/etSignature"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/title_optional" android:hint="@string/title_optional"
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintEnd_toStartOf="@+id/ibPro"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSignaturePro" />
app:layout_constraintTop_toBottomOf="@id/tvSignature" />
<ImageButton
android:id="@+id/ibPro"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:src="@drawable/baseline_info_24"
app:layout_constraintBottom_toBottomOf="@id/etSignature"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/etSignature" />
<CheckBox <CheckBox
android:id="@+id/cbSynchronize" android:id="@+id/cbSynchronize"
@ -427,7 +428,7 @@
android:id="@+id/grpAdvanced" android:id="@+id/grpAdvanced"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:constraint_referenced_ids="tvName,etName,tvSignature,tvSignaturePro,etSignature,cbSynchronize,cbPrimary" />
app:constraint_referenced_ids="tvName,etName,tvSignature,etSignature,ibPro,cbSynchronize,cbPrimary" />
<androidx.constraintlayout.widget.Group <androidx.constraintlayout.widget.Group
android:id="@+id/grpFolders" android:id="@+id/grpFolders"


+ 55
- 14
app/src/main/res/layout/fragment_setup.xml View File

@ -37,6 +37,7 @@
android:id="@+id/tvAccountDone" android:id="@+id/tvAccountDone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableStart="@drawable/baseline_check_24"
android:text="@string/title_setup_done" android:text="@string/title_setup_done"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
@ -44,17 +45,26 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvAccount" /> app:layout_constraintTop_toBottomOf="@id/tvAccount" />
<View
android:id="@+id/vSeparatorAccount"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="9dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvAccountDone" />
<!-- identity --> <!-- identity -->
<Button <Button
android:id="@+id/btnIdentity" android:id="@+id/btnIdentity"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginTop="9dp"
android:text="@string/title_setup_identity" android:text="@string/title_setup_identity"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvAccountDone" />
app:layout_constraintTop_toBottomOf="@id/vSeparatorAccount" />
<TextView <TextView
android:id="@+id/tvIdentity" android:id="@+id/tvIdentity"
@ -70,6 +80,7 @@
android:id="@+id/tvIdentityDone" android:id="@+id/tvIdentityDone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableStart="@drawable/baseline_check_24"
android:text="@string/title_setup_done" android:text="@string/title_setup_done"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
@ -77,17 +88,26 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvIdentity" /> app:layout_constraintTop_toBottomOf="@id/tvIdentity" />
<View
android:id="@+id/vSeparatorIdentity"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="9dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvIdentityDone" />
<!-- permissions --> <!-- permissions -->
<Button <Button
android:id="@+id/btnPermissions" android:id="@+id/btnPermissions"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginTop="9dp"
android:text="@string/title_setup_permissions" android:text="@string/title_setup_permissions"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvIdentityDone" />
app:layout_constraintTop_toBottomOf="@id/vSeparatorIdentity" />
<TextView <TextView
android:id="@+id/tvPermissions" android:id="@+id/tvPermissions"
@ -103,24 +123,34 @@
android:id="@+id/tvPermissionsDone" android:id="@+id/tvPermissionsDone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/title_setup_to_do"
android:drawableStart="@drawable/baseline_check_24"
android:text="@string/title_setup_done"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPermissions" /> app:layout_constraintTop_toBottomOf="@id/tvPermissions" />
<View
android:id="@+id/vSeparatorPermissions"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="9dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPermissionsDone" />
<!-- doze --> <!-- doze -->
<Button <Button
android:id="@+id/btnDoze" android:id="@+id/btnDoze"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginTop="9dp"
android:text="@string/title_setup_doze" android:text="@string/title_setup_doze"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPermissionsDone" />
app:layout_constraintTop_toBottomOf="@id/vSeparatorPermissions" />
<TextView <TextView
android:id="@+id/tvDoze" android:id="@+id/tvDoze"
@ -136,13 +166,23 @@
android:id="@+id/tvDozeDone" android:id="@+id/tvDozeDone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/title_setup_to_do"
android:drawableStart="@drawable/baseline_check_24"
android:text="@string/title_setup_done"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDoze" /> app:layout_constraintTop_toBottomOf="@id/tvDoze" />
<View
android:id="@+id/vSeparatorDoze"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="9dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDozeDone" />
<!-- data saver --> <!-- data saver -->
<Button <Button
@ -150,20 +190,21 @@
style="?android:attr/buttonStyleSmall" style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginTop="9dp"
android:minHeight="0dp" android:minHeight="0dp"
android:minWidth="0dp" android:minWidth="0dp"
android:text="@string/title_setup_data" android:text="@string/title_setup_data"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDozeDone" />
app:layout_constraintTop_toBottomOf="@id/vSeparatorDoze" />
<CheckBox
android:id="@+id/cbDarkTheme"
<ToggleButton
android:id="@+id/tbDarkTheme"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp" android:layout_marginTop="18dp"
android:text="@string/title_setup_dark_theme"
android:textOff="@string/title_setup_dark_theme"
android:textOn="@string/title_setup_light_theme"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnData" /> app:layout_constraintTop_toBottomOf="@id/btnData" />
@ -179,6 +220,6 @@
android:text="@string/title_advanced" android:text="@string/title_advanced"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDarkTheme" />
app:layout_constraintTop_toBottomOf="@id/tbDarkTheme" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>

+ 1
- 0
app/src/main/res/values/strings.xml View File

@ -68,6 +68,7 @@
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string> <string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string> <string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string> <string name="title_setup_done">Done</string>
<string name="title_setup_light_theme">Light theme</string>
<string name="title_setup_dark_theme">Dark theme</string> <string name="title_setup_dark_theme">Dark theme</string>
<string name="title_advanced">Advanced options</string> <string name="title_advanced">Advanced options</string>


+ 6
- 0
app/src/main/res/values/styles.xml View File

@ -26,6 +26,7 @@
<item name="android:checkboxStyle">@style/checkboxStyle</item> <item name="android:checkboxStyle">@style/checkboxStyle</item>
<item name="android:buttonStyle">@style/buttonStyle</item> <item name="android:buttonStyle">@style/buttonStyle</item>
<item name="android:buttonStyleSmall">@style/buttonStyleSmall</item> <item name="android:buttonStyleSmall">@style/buttonStyleSmall</item>
<item name="android:buttonStyleToggle">@style/buttonStyleToggle</item>
</style> </style>
<style name="AppThemeDark" parent="Base.Theme.AppCompat"> <style name="AppThemeDark" parent="Base.Theme.AppCompat">
@ -47,6 +48,7 @@
<item name="android:checkboxStyle">@style/checkboxStyle</item> <item name="android:checkboxStyle">@style/checkboxStyle</item>
<item name="android:buttonStyle">@style/buttonStyle</item> <item name="android:buttonStyle">@style/buttonStyle</item>
<item name="android:buttonStyleSmall">@style/buttonStyleSmall</item> <item name="android:buttonStyleSmall">@style/buttonStyleSmall</item>
<item name="android:buttonStyleToggle">@style/buttonStyleToggle</item>
</style> </style>
<style name="Theme.Transparent" parent="Base.Theme.AppCompat"> <style name="Theme.Transparent" parent="Base.Theme.AppCompat">
@ -70,4 +72,8 @@
<style name="buttonStyleSmall" parent="Base.Widget.AppCompat.Button.Small"> <style name="buttonStyleSmall" parent="Base.Widget.AppCompat.Button.Small">
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Small</item> <item name="android:textAppearance">@style/TextAppearance.AppCompat.Small</item>
</style> </style>
<style name="buttonStyleToggle" parent="Base.Widget.AppCompat.Button">
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Medium</item>
</style>
</resources> </resources>

Loading…
Cancel
Save