mirror of https://codeberg.org/gitnex/GitNex.git
Refactor time picker in settings and UI refinements
This commit is contained in:
parent
3b6e60944f
commit
a23c60907e
|
@ -1,14 +1,10 @@
|
|||
package org.mian.gitnex.activities;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.app.TimePickerDialog;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TimePicker;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.timepicker.MaterialTimePicker;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Locale;
|
||||
import org.mian.gitnex.R;
|
||||
|
@ -28,7 +24,6 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||
private static int customFontSelectedChoice = 0;
|
||||
private static String[] themeList;
|
||||
private static int themeSelectedChoice = 0;
|
||||
private View.OnClickListener onClickListener;
|
||||
private static int langSelectedChoice = 0;
|
||||
private static String[] fragmentTabsAnimationList;
|
||||
private static int fragmentTabsAnimationSelectedChoice = 0;
|
||||
|
@ -58,8 +53,7 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||
themeList = getResources().getStringArray(R.array.themes);
|
||||
}
|
||||
|
||||
initCloseListener();
|
||||
activitySettingsAppearanceBinding.close.setOnClickListener(onClickListener);
|
||||
activitySettingsAppearanceBinding.topAppBar.setNavigationOnClickListener(v -> finish());
|
||||
|
||||
String lightMinute = String.valueOf(tinyDB.getInt("lightThemeTimeMinute"));
|
||||
String lightHour = String.valueOf(tinyDB.getInt("lightThemeTimeHour"));
|
||||
|
@ -163,16 +157,10 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||
});
|
||||
|
||||
activitySettingsAppearanceBinding.lightThemeTimeSelectionFrame.setOnClickListener(
|
||||
view -> {
|
||||
LightTimePicker timePicker = new LightTimePicker();
|
||||
timePicker.show(getSupportFragmentManager(), "timePicker");
|
||||
});
|
||||
view -> lightTimePicker());
|
||||
|
||||
activitySettingsAppearanceBinding.darkThemeTimeSelectionFrame.setOnClickListener(
|
||||
view -> {
|
||||
DarkTimePicker timePicker = new DarkTimePicker();
|
||||
timePicker.show(getSupportFragmentManager(), "timePicker");
|
||||
});
|
||||
view -> darkTimePicker());
|
||||
|
||||
// custom font dialog
|
||||
activitySettingsAppearanceBinding.customFontFrame.setOnClickListener(
|
||||
|
@ -239,9 +227,9 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||
|
||||
// language selector dialog
|
||||
activitySettingsAppearanceBinding.helpTranslate.setOnClickListener(
|
||||
v12 -> {
|
||||
AppUtil.openUrlInBrowser(this, getResources().getString(R.string.crowdInLink));
|
||||
});
|
||||
v12 ->
|
||||
AppUtil.openUrlInBrowser(
|
||||
this, getResources().getString(R.string.crowdInLink)));
|
||||
|
||||
langSelectedChoice = tinyDB.getInt("langId");
|
||||
activitySettingsAppearanceBinding.tvLanguageSelected.setText(
|
||||
|
@ -278,62 +266,50 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||
});
|
||||
}
|
||||
|
||||
private void initCloseListener() {
|
||||
onClickListener = view -> finish();
|
||||
public void lightTimePicker() {
|
||||
|
||||
TinyDB db = TinyDB.getInstance(ctx);
|
||||
|
||||
int hour = db.getInt("lightThemeTimeHour");
|
||||
int minute = db.getInt("lightThemeTimeMinute");
|
||||
|
||||
MaterialTimePicker materialTimePicker =
|
||||
new MaterialTimePicker.Builder().setHour(hour).setMinute(minute).build();
|
||||
|
||||
materialTimePicker.addOnPositiveButtonClickListener(
|
||||
selection -> {
|
||||
db.putInt("lightThemeTimeHour", materialTimePicker.getHour());
|
||||
db.putInt("lightThemeTimeMinute", materialTimePicker.getMinute());
|
||||
SettingsFragment.refreshParent = true;
|
||||
overridePendingTransition(0, 0);
|
||||
Toasty.success(ctx, getString(R.string.settingsSave));
|
||||
recreate();
|
||||
});
|
||||
|
||||
materialTimePicker.show(getSupportFragmentManager(), "fragmentManager");
|
||||
}
|
||||
|
||||
public static class LightTimePicker extends DialogFragment
|
||||
implements TimePickerDialog.OnTimeSetListener {
|
||||
public void darkTimePicker() {
|
||||
|
||||
TinyDB db = TinyDB.getInstance(getContext());
|
||||
TinyDB db = TinyDB.getInstance(ctx);
|
||||
|
||||
@NonNull @Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
int hour = db.getInt("lightThemeTimeHour");
|
||||
int minute = db.getInt("lightThemeTimeMinute");
|
||||
int hour = db.getInt("darkThemeTimeHour");
|
||||
int minute = db.getInt("darkThemeTimeMinute");
|
||||
|
||||
return new TimePickerDialog(getActivity(), this, hour, minute, true);
|
||||
}
|
||||
MaterialTimePicker materialTimePicker =
|
||||
new MaterialTimePicker.Builder().setHour(hour).setMinute(minute).build();
|
||||
|
||||
@Override
|
||||
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
||||
db.putInt("lightThemeTimeHour", hourOfDay);
|
||||
db.putInt("lightThemeTimeMinute", minute);
|
||||
SettingsFragment.refreshParent = true;
|
||||
requireActivity().overridePendingTransition(0, 0);
|
||||
this.dismiss();
|
||||
Toasty.success(
|
||||
requireActivity().getApplicationContext(),
|
||||
requireContext().getResources().getString(R.string.settingsSave));
|
||||
requireActivity().recreate();
|
||||
}
|
||||
}
|
||||
materialTimePicker.addOnPositiveButtonClickListener(
|
||||
selection -> {
|
||||
db.putInt("darkThemeTimeHour", materialTimePicker.getHour());
|
||||
db.putInt("darkThemeTimeMinute", materialTimePicker.getMinute());
|
||||
SettingsFragment.refreshParent = true;
|
||||
overridePendingTransition(0, 0);
|
||||
Toasty.success(ctx, getString(R.string.settingsSave));
|
||||
recreate();
|
||||
});
|
||||
|
||||
public static class DarkTimePicker extends DialogFragment
|
||||
implements TimePickerDialog.OnTimeSetListener {
|
||||
|
||||
TinyDB db = TinyDB.getInstance(getContext());
|
||||
|
||||
@NonNull @Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
int hour = db.getInt("darkThemeTimeHour");
|
||||
int minute = db.getInt("darkThemeTimeMinute");
|
||||
|
||||
return new TimePickerDialog(getActivity(), this, hour, minute, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
||||
db.putInt("darkThemeTimeHour", hourOfDay);
|
||||
db.putInt("darkThemeTimeMinute", minute);
|
||||
SettingsFragment.refreshParent = true;
|
||||
requireActivity().overridePendingTransition(0, 0);
|
||||
this.dismiss();
|
||||
Toasty.success(
|
||||
requireActivity().getApplicationContext(),
|
||||
requireContext().getResources().getString(R.string.settingsSave));
|
||||
requireActivity().recreate();
|
||||
}
|
||||
materialTimePicker.show(getSupportFragmentManager(), "fragmentManager");
|
||||
}
|
||||
|
||||
private static String getLanguageDisplayName(String langCode) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.mian.gitnex.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -18,7 +17,6 @@ public class SettingsGeneralActivity extends BaseActivity {
|
|||
private static int homeScreenSelectedChoice = 0;
|
||||
private static int defaultLinkHandlerScreenSelectedChoice = 0;
|
||||
private ActivitySettingsGeneralBinding viewBinding;
|
||||
private View.OnClickListener onClickListener;
|
||||
private List<String> homeScreenList;
|
||||
private List<String> linkHandlerDefaultScreen;
|
||||
|
||||
|
@ -30,8 +28,7 @@ public class SettingsGeneralActivity extends BaseActivity {
|
|||
viewBinding = ActivitySettingsGeneralBinding.inflate(getLayoutInflater());
|
||||
setContentView(viewBinding.getRoot());
|
||||
|
||||
initCloseListener();
|
||||
viewBinding.close.setOnClickListener(onClickListener);
|
||||
viewBinding.topAppBar.setNavigationOnClickListener(v -> finish());
|
||||
|
||||
// home screen
|
||||
String[] appHomeDefaultScreen = getResources().getStringArray(R.array.appDefaultHomeScreen);
|
||||
|
@ -205,8 +202,4 @@ public class SettingsGeneralActivity extends BaseActivity {
|
|||
!viewBinding.crashReportsSwitch.isChecked()));
|
||||
// crash reports switcher
|
||||
}
|
||||
|
||||
private void initCloseListener() {
|
||||
onClickListener = view -> finish();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,351 +1,299 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="vertical">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen10dp"
|
||||
android:theme="@style/Widget.AppCompat.SearchView"
|
||||
app:elevation="@dimen/dimen0dp">
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
style="?attr/collapsingToolbarLayoutLargeStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
app:contentScrim="?attr/primaryBackgroundColor"
|
||||
android:layout_height="?attr/collapsingToolbarLayoutLargeSize">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="@dimen/dimen26dp"
|
||||
android:layout_height="@dimen/dimen26dp"
|
||||
android:layout_marginStart="@dimen/dimen16dp"
|
||||
android:layout_marginEnd="@dimen/dimen16dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/close"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/ic_close"/>
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/topAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:elevation="0dp"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:title="@string/settingsAppearanceHeader"
|
||||
app:layout_collapseMode="pin"
|
||||
app:navigationIcon="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/settingsAppearanceHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen20sp"/>
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/themeSelectionFrame"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/themeHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/themeSelectionHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/themeSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/themeSelectionSelectedText"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lightThemeTimeSelectionFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lightThemeTimeHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsLightThemeTimeSelectorHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lightThemeSelectedTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsThemeTimeSelectedHint"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/darkThemeTimeSelectionFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/darkThemeTimeHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsDarkThemeTimeSelectorHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/darkThemeSelectedTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsThemeTimeSelectedHint"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/customFontFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/customFontHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsCustomFontHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/customFontSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsCustomFontDefault"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentTabsAnimationFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fragmentTabsAnimationFrameHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/fragmentTabsAnimationHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fragmentTabsAnimationFrameSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/fadeOut"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/counterBadgeFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCounterBadgeHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen48dp"
|
||||
android:text="@string/settingsCounterBadges"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switchCounterBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dimen24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_gravity="end"
|
||||
android:layout_toEndOf="@+id/tvCounterBadgeHeader"
|
||||
android:gravity="end"
|
||||
android:paddingStart="@dimen/dimen0dp"
|
||||
android:paddingEnd="@dimen/dimen24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/labelsInListFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/label_title_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="100"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLabelsInListHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="90"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:text="@string/settingsLabelsInListHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/themeSelectionFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
android:gravity="center_vertical|end"
|
||||
android:orientation="horizontal">
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginTop="@dimen/dimen8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switchLabelsInListBadge"
|
||||
<TextView
|
||||
android:id="@+id/themeHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:paddingStart="@dimen/dimen24dp"
|
||||
android:paddingEnd="@dimen/dimen24dp" />
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/themeSelectionHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/themeSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/themeSelectionSelectedText"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lightThemeTimeSelectionFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lightThemeTimeHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsLightThemeTimeSelectorHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lightThemeSelectedTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsThemeTimeSelectedHint"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/darkThemeTimeSelectionFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/darkThemeTimeHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsDarkThemeTimeSelectorHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/darkThemeSelectedTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsThemeTimeSelectedHint"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/customFontFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/customFontHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsCustomFontHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/customFontSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsCustomFontDefault"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentTabsAnimationFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fragmentTabsAnimationFrameHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/fragmentTabsAnimationHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fragmentTabsAnimationFrameSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/fadeOut"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/counterBadgeFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCounterBadgeHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/settingsCounterBadges"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switchCounterBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/settingsCounterBadges"
|
||||
android:layout_weight=".10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/labelsInListFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLabelsInListHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/settingsLabelsInListHeader"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switchLabelsInListBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/settingsLabelsInListHeader"
|
||||
android:layout_weight=".10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dimen96dp"
|
||||
android:text="@string/settingsLabelsInListHint"
|
||||
android:textColor="?attr/hintColor"
|
||||
android:textSize="@dimen/dimen12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/langFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLanguageHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsLanguageSelectorHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLanguageSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsLanguageSelectedHeaderDefault"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/helpTranslate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autoLink="web"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:paddingTop="@dimen/dimen12dp"
|
||||
android:text="@string/settingsHelpTranslateText"
|
||||
android:textColor="@color/lightBlue"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/label_title_frame"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen84dp"
|
||||
android:text="@string/settingsLabelsInListHint"
|
||||
android:textColor="?attr/hintColor"
|
||||
android:textSize="@dimen/dimen12sp" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/langFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLanguageHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsLanguageSelectorHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLanguageSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsLanguageSelectedHeaderDefault"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/helpTranslate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autoLink="web"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:paddingStart="@dimen/dimen40dp"
|
||||
android:paddingTop="@dimen/dimen12dp"
|
||||
android:paddingBottom="@dimen/dimen12dp"
|
||||
android:paddingEnd="@dimen/dimen24dp"
|
||||
android:layout_marginBottom="@dimen/dimen2dp"
|
||||
android:text="@string/settingsHelpTranslateText"
|
||||
android:textColor="@color/lightBlue"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -1,252 +1,213 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="vertical">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen10dp"
|
||||
android:theme="@style/Widget.AppCompat.SearchView"
|
||||
app:elevation="@dimen/dimen0dp">
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
style="?attr/collapsingToolbarLayoutLargeStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
app:contentScrim="?attr/primaryBackgroundColor"
|
||||
android:layout_height="?attr/collapsingToolbarLayoutLargeSize">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="@dimen/dimen26dp"
|
||||
android:layout_height="@dimen/dimen26dp"
|
||||
android:layout_marginStart="@dimen/dimen16dp"
|
||||
android:layout_marginEnd="@dimen/dimen16dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/close"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/ic_close"/>
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/topAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:elevation="0dp"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:title="@string/settingsGeneralHeader"
|
||||
app:layout_collapseMode="pin"
|
||||
app:navigationIcon="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbarTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/settingsGeneralHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen20sp"/>
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/setDefaultLinkHandler"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/generalDeepLinkDefaultScreen"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:text="@string/generalDeepLinkDefaultScreen"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/generalDeepLinkDefaultScreenHintText"
|
||||
android:textColor="?attr/hintColor"
|
||||
android:textSize="@dimen/dimen12sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/generalDeepLinkSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/none"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/homeScreenFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeScreenHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsHomeScreenHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeScreenSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/settingsHomeScreenSelectedText"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/customTabsFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/customTabsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen72dp"
|
||||
android:text="@string/useCustomTabs"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp"/>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switchTabs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dimen24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_gravity="end"
|
||||
android:layout_toEndOf="@+id/customTabsHeader"
|
||||
android:gravity="end"
|
||||
android:paddingStart="@dimen/dimen0dp"
|
||||
android:paddingEnd="@dimen/dimen24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/enableDraftsCommentsDeletion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/enableCommentsDeletionHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="100"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="90"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:text="@string/settingsEnableCommentsDeletionText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/setDefaultLinkHandler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
android:gravity="center_vertical|end"
|
||||
android:layout_marginTop="@dimen/dimen8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/generalDeepLinkDefaultScreen"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen4dp"
|
||||
android:text="@string/generalDeepLinkDefaultScreen"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/generalDeepLinkDefaultScreenHintText"
|
||||
android:textColor="?attr/hintColor"
|
||||
android:textSize="@dimen/dimen12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/generalDeepLinkSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/none"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/homeScreenFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeScreenHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsHomeScreenHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeScreenSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settingsHomeScreenSelectedText"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/customTabsFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/commentsDeletionSwitch"
|
||||
<TextView
|
||||
android:id="@+id/customTabsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:paddingStart="@dimen/dimen24dp"
|
||||
android:paddingEnd="@dimen/dimen24dp" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/useCustomTabs"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switchTabs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/useCustomTabs"
|
||||
android:layout_weight=".10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/enableDraftsCommentsDeletion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/settingsEnableCommentsDeletionText"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/commentsDeletionSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/settingsEnableCommentsDeletionText"
|
||||
android:layout_weight=".10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dimen96dp"
|
||||
android:text="@string/settingsEnableCommentsDeletionHintText"
|
||||
android:textColor="?attr/hintColor"
|
||||
android:textSize="@dimen/dimen12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/enableSendReports"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen32dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enableReportsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/settingsEnableReportsText"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/crashReportsSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/settingsEnableReportsText"
|
||||
android:layout_weight=".10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/enableCommentsDeletionHeader"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen72dp"
|
||||
android:text="@string/settingsEnableCommentsDeletionHintText"
|
||||
android:textColor="?attr/hintColor"
|
||||
android:textSize="@dimen/dimen12sp" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/enableSendReports"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="100"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enableReportsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="90"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:text="@string/settingsEnableReportsText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
android:gravity="center_vertical|end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/crashReportsSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:paddingStart="@dimen/dimen24dp"
|
||||
android:paddingEnd="@dimen/dimen24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/profileTabFollowers" />
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
|||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/profileTabFollowing" />
|
||||
|
||||
|
@ -132,7 +132,7 @@
|
|||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/starredRepos" />
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@
|
|||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_star_unfilled"
|
||||
android:text="@string/repoStars" />
|
||||
|
@ -183,7 +183,7 @@
|
|||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_pull_request"
|
||||
android:text="@string/repoStars" />
|
||||
|
@ -193,7 +193,7 @@
|
|||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_fork"
|
||||
android:text="@string/repoStars" />
|
||||
|
@ -203,7 +203,7 @@
|
|||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_watchers"
|
||||
android:text="@string/repoStars" />
|
||||
|
@ -383,7 +383,7 @@
|
|||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_info"
|
||||
android:text="@string/infoMoreInformation" />
|
||||
|
|
Loading…
Reference in New Issue