1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-31 20:25:38 +00:00

Change storage location

This commit is contained in:
M66B 2021-11-08 11:34:24 +01:00
parent 14f5616536
commit cb509b3ab1
3 changed files with 26 additions and 1 deletions

View file

@ -109,6 +109,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private ImageButton ibResetLanguage;
private SwitchCompat swDeepL;
private ImageButton ibDeepL;
private TextView tvSdcard;
private SwitchCompat swWatchdog;
private SwitchCompat swUpdates;
private SwitchCompat swCheckWeekly;
@ -241,6 +242,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
ibResetLanguage = view.findViewById(R.id.ibResetLanguage);
swDeepL = view.findViewById(R.id.swDeepL);
ibDeepL = view.findViewById(R.id.ibDeepL);
tvSdcard = view.findViewById(R.id.tvSdcard);
swWatchdog = view.findViewById(R.id.swWatchdog);
swUpdates = view.findViewById(R.id.swUpdates);
swCheckWeekly = view.findViewById(R.id.swWeekly);
@ -516,6 +518,14 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
}
});
tvSdcard.setPaintFlags(tvSdcard.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvSdcard.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.viewFAQ(v.getContext(), 93);
}
});
swWatchdog.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

View file

@ -318,6 +318,20 @@
app:layout_constraintTop_toBottomOf="@id/swDeepL"
app:srcCompat="@drawable/twotone_info_24" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvSdcard"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_12"
android:drawablePadding="6dp"
android:drawableTint="?android:attr/textColorLink"
android:text="@string/title_advanced_sdcard"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibDeepL" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swWatchdog"
android:layout_width="0dp"
@ -327,7 +341,7 @@
android:text="@string/title_advanced_watchdog"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibDeepL"
app:layout_constraintTop_toBottomOf="@id/tvSdcard"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat

View file

@ -647,6 +647,7 @@
<string name="title_advanced_language">Language</string>
<string name="title_advanced_language_system">System</string>
<string name="title_advanced_deepl">DeepL integration</string>
<string name="title_advanced_sdcard">I want to use an sdcard</string>
<string name="title_advanced_watchdog">Periodically check if FairEmail is still active</string>
<string name="title_advanced_updates">Check for GitHub updates</string>
<string name="title_advanced_check_weekly">Check weekly instead of daily</string>