mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2023-12-13 20:50:18 +01:00
Refactor settings screen, move drafts and crash to general section
This commit is contained in:
parent
0db3bed589
commit
9574692eae
|
@ -129,18 +129,12 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.SettingsTranslationActivity"
|
android:name=".activities.SettingsTranslationActivity"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||||
<activity
|
|
||||||
android:name=".activities.SettingsReportsActivity"
|
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.AddNewTeamMemberActivity"
|
android:name=".activities.AddNewTeamMemberActivity"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.AddNewTeamRepoActivity"
|
android:name=".activities.AddNewTeamRepoActivity"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||||
<activity
|
|
||||||
android:name=".activities.SettingsDraftsActivity"
|
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.RepoForksActivity"
|
android:name=".activities.RepoForksActivity"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
package org.mian.gitnex.activities;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import org.mian.gitnex.R;
|
|
||||||
import org.mian.gitnex.databinding.ActivitySettingsDraftsBinding;
|
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author M M Arif
|
|
||||||
*/
|
|
||||||
public class SettingsDraftsActivity extends BaseActivity {
|
|
||||||
|
|
||||||
private View.OnClickListener onClickListener;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
ActivitySettingsDraftsBinding activitySettingsDraftsBinding =
|
|
||||||
ActivitySettingsDraftsBinding.inflate(getLayoutInflater());
|
|
||||||
setContentView(activitySettingsDraftsBinding.getRoot());
|
|
||||||
|
|
||||||
ImageView closeActivity = activitySettingsDraftsBinding.close;
|
|
||||||
|
|
||||||
initCloseListener();
|
|
||||||
closeActivity.setOnClickListener(onClickListener);
|
|
||||||
|
|
||||||
activitySettingsDraftsBinding.commentsDeletionSwitch.setChecked(
|
|
||||||
tinyDB.getBoolean("draftsCommentsDeletionEnabled", true));
|
|
||||||
|
|
||||||
// delete comments on submit switcher
|
|
||||||
activitySettingsDraftsBinding.commentsDeletionSwitch.setOnCheckedChangeListener(
|
|
||||||
(buttonView, isChecked) -> {
|
|
||||||
tinyDB.putBoolean("draftsCommentsDeletionEnabled", isChecked);
|
|
||||||
Toasty.success(appCtx, getResources().getString(R.string.settingsSave));
|
|
||||||
});
|
|
||||||
activitySettingsDraftsBinding.enableDraftsCommentsDeletion.setOnClickListener(
|
|
||||||
v ->
|
|
||||||
activitySettingsDraftsBinding.commentsDeletionSwitch.setChecked(
|
|
||||||
!activitySettingsDraftsBinding.commentsDeletionSwitch.isChecked()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initCloseListener() {
|
|
||||||
onClickListener = view -> finish();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -169,6 +169,34 @@ public class SettingsGeneralActivity extends BaseActivity {
|
||||||
viewBinding.customTabsFrame.setOnClickListener(
|
viewBinding.customTabsFrame.setOnClickListener(
|
||||||
v -> viewBinding.switchTabs.setChecked(!viewBinding.switchTabs.isChecked()));
|
v -> viewBinding.switchTabs.setChecked(!viewBinding.switchTabs.isChecked()));
|
||||||
// custom tabs
|
// custom tabs
|
||||||
|
|
||||||
|
// enable drafts deletion
|
||||||
|
viewBinding.commentsDeletionSwitch.setChecked(
|
||||||
|
tinyDB.getBoolean("draftsCommentsDeletionEnabled", true));
|
||||||
|
|
||||||
|
// delete comments on submit switcher
|
||||||
|
viewBinding.commentsDeletionSwitch.setOnCheckedChangeListener(
|
||||||
|
(buttonView, isChecked) -> {
|
||||||
|
tinyDB.putBoolean("draftsCommentsDeletionEnabled", isChecked);
|
||||||
|
Toasty.success(appCtx, getResources().getString(R.string.settingsSave));
|
||||||
|
});
|
||||||
|
viewBinding.enableDraftsCommentsDeletion.setOnClickListener(
|
||||||
|
v ->
|
||||||
|
viewBinding.commentsDeletionSwitch.setChecked(
|
||||||
|
!viewBinding.commentsDeletionSwitch.isChecked()));
|
||||||
|
// enable drafts deletion
|
||||||
|
|
||||||
|
// crash reports switcher
|
||||||
|
viewBinding.crashReportsSwitch.setOnCheckedChangeListener(
|
||||||
|
(buttonView, isChecked) -> {
|
||||||
|
tinyDB.putBoolean("crashReportingEnabled", isChecked);
|
||||||
|
Toasty.success(appCtx, getResources().getString(R.string.settingsSave));
|
||||||
|
});
|
||||||
|
viewBinding.enableSendReports.setOnClickListener(
|
||||||
|
v ->
|
||||||
|
viewBinding.crashReportsSwitch.setChecked(
|
||||||
|
!viewBinding.crashReportsSwitch.isChecked()));
|
||||||
|
// crash reports switcher
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initCloseListener() {
|
private void initCloseListener() {
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
package org.mian.gitnex.activities;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import org.mian.gitnex.R;
|
|
||||||
import org.mian.gitnex.databinding.ActivitySettingsReportsBinding;
|
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author M M Arif
|
|
||||||
*/
|
|
||||||
public class SettingsReportsActivity extends BaseActivity {
|
|
||||||
|
|
||||||
private View.OnClickListener onClickListener;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
ActivitySettingsReportsBinding activitySettingsReportsBinding =
|
|
||||||
ActivitySettingsReportsBinding.inflate(getLayoutInflater());
|
|
||||||
setContentView(activitySettingsReportsBinding.getRoot());
|
|
||||||
|
|
||||||
ImageView closeActivity = activitySettingsReportsBinding.close;
|
|
||||||
|
|
||||||
initCloseListener();
|
|
||||||
closeActivity.setOnClickListener(onClickListener);
|
|
||||||
|
|
||||||
activitySettingsReportsBinding.crashReportsSwitch.setChecked(
|
|
||||||
tinyDB.getBoolean("crashReportingEnabled", true));
|
|
||||||
|
|
||||||
// crash reports switcher
|
|
||||||
activitySettingsReportsBinding.crashReportsSwitch.setOnCheckedChangeListener(
|
|
||||||
(buttonView, isChecked) -> {
|
|
||||||
tinyDB.putBoolean("crashReportingEnabled", isChecked);
|
|
||||||
Toasty.success(appCtx, getResources().getString(R.string.settingsSave));
|
|
||||||
});
|
|
||||||
activitySettingsReportsBinding.enableSendReports.setOnClickListener(
|
|
||||||
v ->
|
|
||||||
activitySettingsReportsBinding.crashReportsSwitch.setChecked(
|
|
||||||
!activitySettingsReportsBinding.crashReportsSwitch.isChecked()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initCloseListener() {
|
|
||||||
onClickListener = view -> finish();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,10 +16,8 @@ import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.BaseActivity;
|
import org.mian.gitnex.activities.BaseActivity;
|
||||||
import org.mian.gitnex.activities.MainActivity;
|
import org.mian.gitnex.activities.MainActivity;
|
||||||
import org.mian.gitnex.activities.SettingsAppearanceActivity;
|
import org.mian.gitnex.activities.SettingsAppearanceActivity;
|
||||||
import org.mian.gitnex.activities.SettingsDraftsActivity;
|
|
||||||
import org.mian.gitnex.activities.SettingsGeneralActivity;
|
import org.mian.gitnex.activities.SettingsGeneralActivity;
|
||||||
import org.mian.gitnex.activities.SettingsNotificationsActivity;
|
import org.mian.gitnex.activities.SettingsNotificationsActivity;
|
||||||
import org.mian.gitnex.activities.SettingsReportsActivity;
|
|
||||||
import org.mian.gitnex.activities.SettingsSecurityActivity;
|
import org.mian.gitnex.activities.SettingsSecurityActivity;
|
||||||
import org.mian.gitnex.activities.SettingsTranslationActivity;
|
import org.mian.gitnex.activities.SettingsTranslationActivity;
|
||||||
import org.mian.gitnex.databinding.CustomAboutDialogBinding;
|
import org.mian.gitnex.databinding.CustomAboutDialogBinding;
|
||||||
|
@ -64,10 +62,7 @@ public class SettingsFragment extends Fragment {
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsAppearanceActivity.class)));
|
v1 -> startActivity(new Intent(ctx, SettingsAppearanceActivity.class)));
|
||||||
|
|
||||||
fragmentSettingsBinding.codeEditorFrame.setOnClickListener(
|
fragmentSettingsBinding.codeEditorFrame.setOnClickListener(
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsReportsActivity.class)));
|
v1 -> startActivity(new Intent(ctx, SettingsAppearanceActivity.class)));
|
||||||
|
|
||||||
fragmentSettingsBinding.draftsFrame.setOnClickListener(
|
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsDraftsActivity.class)));
|
|
||||||
|
|
||||||
fragmentSettingsBinding.securityFrame.setOnClickListener(
|
fragmentSettingsBinding.securityFrame.setOnClickListener(
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsSecurityActivity.class)));
|
v1 -> startActivity(new Intent(ctx, SettingsSecurityActivity.class)));
|
||||||
|
@ -78,9 +73,6 @@ public class SettingsFragment extends Fragment {
|
||||||
fragmentSettingsBinding.languagesFrame.setOnClickListener(
|
fragmentSettingsBinding.languagesFrame.setOnClickListener(
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsTranslationActivity.class)));
|
v1 -> startActivity(new Intent(ctx, SettingsTranslationActivity.class)));
|
||||||
|
|
||||||
fragmentSettingsBinding.reportsFrame.setOnClickListener(
|
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsReportsActivity.class)));
|
|
||||||
|
|
||||||
fragmentSettingsBinding.rateAppFrame.setOnClickListener(rateApp -> rateThisApp());
|
fragmentSettingsBinding.rateAppFrame.setOnClickListener(rateApp -> rateThisApp());
|
||||||
|
|
||||||
fragmentSettingsBinding.aboutAppFrame.setOnClickListener(aboutApp -> showAboutAppDialog());
|
fragmentSettingsBinding.aboutAppFrame.setOnClickListener(aboutApp -> showAboutAppDialog());
|
||||||
|
|
|
@ -1,106 +0,0 @@
|
||||||
<?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"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/primaryBackgroundColor"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
|
||||||
android:id="@+id/appbar"
|
|
||||||
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">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/primaryBackgroundColor"
|
|
||||||
android:theme="@style/AppTheme.AppBarOverlay">
|
|
||||||
|
|
||||||
<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" />
|
|
||||||
|
|
||||||
<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/draftsHeader"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="@dimen/dimen20sp" />
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<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">
|
|
||||||
|
|
||||||
<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" />
|
|
||||||
|
|
||||||
<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/commentsDeletionSwitch"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/dimen32dp"
|
|
||||||
android:paddingStart="@dimen/dimen24dp"
|
|
||||||
android:paddingEnd="@dimen/dimen24dp" />
|
|
||||||
|
|
||||||
</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" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
|
@ -65,6 +65,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dimen24dp"
|
android:layout_marginStart="@dimen/dimen24dp"
|
||||||
android:layout_marginEnd="@dimen/dimen24dp"
|
android:layout_marginEnd="@dimen/dimen24dp"
|
||||||
|
android:layout_marginBottom="@dimen/dimen6dp"
|
||||||
android:text="@string/generalDeepLinkDefaultScreen"
|
android:text="@string/generalDeepLinkDefaultScreen"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="@dimen/dimen18sp"/>
|
android:textSize="@dimen/dimen18sp"/>
|
||||||
|
@ -155,4 +156,97 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</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">
|
||||||
|
|
||||||
|
<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" />
|
||||||
|
|
||||||
|
<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/commentsDeletionSwitch"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dimen32dp"
|
||||||
|
android:paddingStart="@dimen/dimen24dp"
|
||||||
|
android:paddingEnd="@dimen/dimen24dp" />
|
||||||
|
|
||||||
|
</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" />
|
||||||
|
|
||||||
|
</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>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
<?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"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/primaryBackgroundColor"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
|
||||||
android:id="@+id/appbar"
|
|
||||||
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">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/primaryBackgroundColor">
|
|
||||||
|
|
||||||
<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" />
|
|
||||||
|
|
||||||
<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/reportViewerHeader"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="@dimen/dimen20sp" />
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<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>
|
|
|
@ -183,61 +183,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/draftsFrame"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="15dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:contentDescription="@string/generalImgContentText"
|
|
||||||
app:srcCompat="@drawable/ic_drafts"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/draftsHeader"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:paddingEnd="12dp"
|
|
||||||
android:text="@string/draftsHeader"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="18sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/draftsHintText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:paddingEnd="12dp"
|
|
||||||
android:text="@string/draftsHintText"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="12sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:contentDescription="@string/generalImgContentText"
|
|
||||||
app:srcCompat="@drawable/ic_chevron_right"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/securityFrame"
|
android:id="@+id/securityFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -403,61 +348,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/reportsFrame"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="15dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:contentDescription="@string/generalImgContentText"
|
|
||||||
app:srcCompat="@drawable/ic_bug_report"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/appReports"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:paddingEnd="12dp"
|
|
||||||
android:text="@string/reportViewerHeader"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="18sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/reportsHintText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:paddingEnd="12dp"
|
|
||||||
android:text="@string/reportsHintText"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="12sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:contentDescription="@string/generalImgContentText"
|
|
||||||
app:srcCompat="@drawable/ic_chevron_right"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/rateAppFrame"
|
android:id="@+id/rateAppFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -242,7 +242,7 @@
|
||||||
<string name="settingsEnableCommentsDeletionText">Enable Drafts Deletion</string>
|
<string name="settingsEnableCommentsDeletionText">Enable Drafts Deletion</string>
|
||||||
<string name="settingsEnableCommentsDeletionHintText">Delete comment draft when comment is posted</string>
|
<string name="settingsEnableCommentsDeletionHintText">Delete comment draft when comment is posted</string>
|
||||||
<string name="settingsGeneralHeader">General</string>
|
<string name="settingsGeneralHeader">General</string>
|
||||||
<string name="generalHintText">Home screen, default link handler</string>
|
<string name="generalHintText">Home screen, drafts, crash reports</string>
|
||||||
<string name="generalDeepLinkDefaultScreen">Default Link Handler</string>
|
<string name="generalDeepLinkDefaultScreen">Default Link Handler</string>
|
||||||
<string name="generalDeepLinkDefaultScreenHintText">Choose what screen should be loaded if the app cannot handle external links. It will redirect you automatically.</string>
|
<string name="generalDeepLinkDefaultScreenHintText">Choose what screen should be loaded if the app cannot handle external links. It will redirect you automatically.</string>
|
||||||
<string name="generalDeepLinkSelectedText">N/A</string>
|
<string name="generalDeepLinkSelectedText">N/A</string>
|
||||||
|
|
Loading…
Reference in a new issue