mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-26 16:04:07 +08:00
UI, code editor updates and refactors (#1265)
Potentially will close #1255 Closes #1269 Closes #1271 Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1265
This commit is contained in:
parent
8f44e065ca
commit
219317caf8
@ -120,27 +120,21 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".activities.SettingsAppearanceActivity"
|
android:name=".activities.SettingsAppearanceActivity"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||||
|
<activity
|
||||||
|
android:name=".activities.SettingsCodeEditorActivity"
|
||||||
|
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.ProfileActivity"
|
android:name=".activities.ProfileActivity"
|
||||||
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.SettingsSecurityActivity"
|
android:name=".activities.SettingsSecurityActivity"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||||
<activity
|
|
||||||
android:name=".activities.SettingsTranslationActivity"
|
|
||||||
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"/>
|
||||||
|
@ -73,8 +73,25 @@ public class CodeEditorActivity extends BaseActivity {
|
|||||||
binding.codeView.setLineNumberTextSize(32f);
|
binding.codeView.setLineNumberTextSize(32f);
|
||||||
|
|
||||||
// Setup Auto indenting feature
|
// Setup Auto indenting feature
|
||||||
binding.codeView.setTabLength(4);
|
if (tinyDB.getInt("ceIndentationId") == 0) {
|
||||||
binding.codeView.setEnableAutoIndentation(true);
|
binding.codeView.setEnableAutoIndentation(true);
|
||||||
|
switch (tinyDB.getInt("ceIndentationTabsId")) {
|
||||||
|
case 0:
|
||||||
|
binding.codeView.setTabLength(2);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
binding.codeView.setTabLength(4);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
binding.codeView.setTabLength(6);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
binding.codeView.setTabLength(8);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
binding.codeView.setEnableAutoIndentation(false);
|
||||||
|
}
|
||||||
|
|
||||||
// Set up the language and theme with SyntaxManager helper class
|
// Set up the language and theme with SyntaxManager helper class
|
||||||
currentLanguage.applyTheme(this, binding.codeView, currentTheme);
|
currentLanguage.applyTheme(this, binding.codeView, currentTheme);
|
||||||
|
@ -85,6 +85,7 @@ public class IssueDetailActivity extends BaseActivity
|
|||||||
AssigneesListAdapter.AssigneesListAdapterListener,
|
AssigneesListAdapter.AssigneesListAdapterListener,
|
||||||
BottomSheetListener {
|
BottomSheetListener {
|
||||||
|
|
||||||
|
private Typeface myTypeface;
|
||||||
public static boolean singleIssueUpdate = false;
|
public static boolean singleIssueUpdate = false;
|
||||||
public static boolean commentPosted = false;
|
public static boolean commentPosted = false;
|
||||||
private final List<Label> labelsList = new ArrayList<>();
|
private final List<Label> labelsList = new ArrayList<>();
|
||||||
@ -185,7 +186,7 @@ public class IssueDetailActivity extends BaseActivity
|
|||||||
},
|
},
|
||||||
50));
|
50));
|
||||||
|
|
||||||
Typeface myTypeface = AppUtil.getTypeface(this);
|
myTypeface = AppUtil.getTypeface(this);
|
||||||
viewBinding.toolbarTitle.setTypeface(myTypeface);
|
viewBinding.toolbarTitle.setTypeface(myTypeface);
|
||||||
viewBinding.toolbarTitle.setText(repoName);
|
viewBinding.toolbarTitle.setText(repoName);
|
||||||
|
|
||||||
@ -935,13 +936,13 @@ public class IssueDetailActivity extends BaseActivity
|
|||||||
TextDrawable drawable =
|
TextDrawable drawable =
|
||||||
TextDrawable.builder()
|
TextDrawable.builder()
|
||||||
.beginConfig()
|
.beginConfig()
|
||||||
.useFont(Typeface.DEFAULT)
|
.useFont(myTypeface)
|
||||||
.textColor(new ColorInverter().getContrastColor(color))
|
.textColor(new ColorInverter().getContrastColor(color))
|
||||||
.fontSize(textSize)
|
.fontSize(textSize)
|
||||||
.width(
|
.width(
|
||||||
LabelWidthCalculator.calculateLabelWidth(
|
LabelWidthCalculator.calculateLabelWidth(
|
||||||
labelName,
|
labelName,
|
||||||
Typeface.DEFAULT,
|
myTypeface,
|
||||||
textSize,
|
textSize,
|
||||||
AppUtil.getPixelsFromDensity(ctx, 10)))
|
AppUtil.getPixelsFromDensity(ctx, 10)))
|
||||||
.height(height)
|
.height(height)
|
||||||
|
@ -162,6 +162,22 @@ public class MainActivity extends BaseActivity
|
|||||||
Menu menu = navigationView.getMenu();
|
Menu menu = navigationView.getMenu();
|
||||||
navNotifications = menu.findItem(R.id.nav_notifications);
|
navNotifications = menu.findItem(R.id.nav_notifications);
|
||||||
|
|
||||||
|
navigationView
|
||||||
|
.getViewTreeObserver()
|
||||||
|
.addOnGlobalLayoutListener(
|
||||||
|
() -> {
|
||||||
|
ArrayList<View> menuItems = new ArrayList<>(menu.size());
|
||||||
|
for (int i = 0; i < menu.size(); i++) {
|
||||||
|
MenuItem item = menu.getItem(i);
|
||||||
|
navigationView.findViewsWithText(
|
||||||
|
menuItems, item.getTitle(), View.FIND_VIEWS_WITH_TEXT);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (final View menuItem : menuItems) {
|
||||||
|
((TextView) menuItem).setTypeface(myTypeface);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ActionBarDrawerToggle toggle =
|
ActionBarDrawerToggle toggle =
|
||||||
new ActionBarDrawerToggle(
|
new ActionBarDrawerToggle(
|
||||||
this,
|
this,
|
||||||
@ -485,6 +501,7 @@ public class MainActivity extends BaseActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadUserInfo();
|
||||||
handler.postDelayed(
|
handler.postDelayed(
|
||||||
() -> {
|
() -> {
|
||||||
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
||||||
@ -497,7 +514,6 @@ public class MainActivity extends BaseActivity
|
|||||||
noConnection = true;
|
noConnection = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
loadUserInfo();
|
|
||||||
giteaVersion();
|
giteaVersion();
|
||||||
serverPageLimitSettings();
|
serverPageLimitSettings();
|
||||||
noConnection = false;
|
noConnection = false;
|
||||||
|
@ -11,6 +11,8 @@ import android.widget.TimePicker;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.DialogFragment;
|
import androidx.fragment.app.DialogFragment;
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Locale;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.databinding.ActivitySettingsAppearanceBinding;
|
import org.mian.gitnex.databinding.ActivitySettingsAppearanceBinding;
|
||||||
import org.mian.gitnex.fragments.SettingsFragment;
|
import org.mian.gitnex.fragments.SettingsFragment;
|
||||||
@ -29,6 +31,7 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||||||
private static String[] themeList;
|
private static String[] themeList;
|
||||||
private static int themeSelectedChoice = 0;
|
private static int themeSelectedChoice = 0;
|
||||||
private View.OnClickListener onClickListener;
|
private View.OnClickListener onClickListener;
|
||||||
|
private static int langSelectedChoice = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
@ -39,6 +42,12 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||||||
ActivitySettingsAppearanceBinding.inflate(getLayoutInflater());
|
ActivitySettingsAppearanceBinding.inflate(getLayoutInflater());
|
||||||
setContentView(activitySettingsAppearanceBinding.getRoot());
|
setContentView(activitySettingsAppearanceBinding.getRoot());
|
||||||
|
|
||||||
|
LinkedHashMap<String, String> lang = new LinkedHashMap<>();
|
||||||
|
lang.put("", getString(R.string.settingsLanguageSystem));
|
||||||
|
for (String langCode : getResources().getStringArray(R.array.languages)) {
|
||||||
|
lang.put(langCode, getLanguageDisplayName(langCode));
|
||||||
|
}
|
||||||
|
|
||||||
ImageView closeActivity = activitySettingsAppearanceBinding.close;
|
ImageView closeActivity = activitySettingsAppearanceBinding.close;
|
||||||
|
|
||||||
LinearLayout customFontFrame = activitySettingsAppearanceBinding.customFontFrame;
|
LinearLayout customFontFrame = activitySettingsAppearanceBinding.customFontFrame;
|
||||||
@ -196,6 +205,48 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||||||
|
|
||||||
materialAlertDialogBuilder.create().show();
|
materialAlertDialogBuilder.create().show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// language selector dialog
|
||||||
|
LinearLayout langFrame = activitySettingsAppearanceBinding.langFrame;
|
||||||
|
|
||||||
|
activitySettingsAppearanceBinding.helpTranslate.setOnClickListener(
|
||||||
|
v12 -> {
|
||||||
|
AppUtil.openUrlInBrowser(this, getResources().getString(R.string.crowdInLink));
|
||||||
|
});
|
||||||
|
|
||||||
|
langSelectedChoice = tinyDB.getInt("langId");
|
||||||
|
activitySettingsAppearanceBinding.tvLanguageSelected.setText(
|
||||||
|
lang.get(lang.keySet().toArray(new String[0])[langSelectedChoice]));
|
||||||
|
|
||||||
|
// language dialog
|
||||||
|
langFrame.setOnClickListener(
|
||||||
|
view -> {
|
||||||
|
MaterialAlertDialogBuilder materialAlertDialogBuilder =
|
||||||
|
new MaterialAlertDialogBuilder(ctx)
|
||||||
|
.setTitle(R.string.settingsLanguageSelectorDialogTitle)
|
||||||
|
.setCancelable(langSelectedChoice != -1)
|
||||||
|
.setNeutralButton(getString(R.string.cancelButton), null)
|
||||||
|
.setSingleChoiceItems(
|
||||||
|
lang.values().toArray(new String[0]),
|
||||||
|
langSelectedChoice,
|
||||||
|
(dialogInterface, i) -> {
|
||||||
|
String selectedLanguage =
|
||||||
|
lang.keySet().toArray(new String[0])[i];
|
||||||
|
tinyDB.putInt("langId", i);
|
||||||
|
tinyDB.putString("locale", selectedLanguage);
|
||||||
|
|
||||||
|
SettingsFragment.refreshParent = true;
|
||||||
|
this.overridePendingTransition(0, 0);
|
||||||
|
dialogInterface.dismiss();
|
||||||
|
Toasty.success(
|
||||||
|
appCtx,
|
||||||
|
getResources()
|
||||||
|
.getString(R.string.settingsSave));
|
||||||
|
this.recreate();
|
||||||
|
});
|
||||||
|
|
||||||
|
materialAlertDialogBuilder.create().show();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initCloseListener() {
|
private void initCloseListener() {
|
||||||
@ -255,4 +306,12 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
|||||||
requireActivity().recreate();
|
requireActivity().recreate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String getLanguageDisplayName(String langCode) {
|
||||||
|
Locale english = new Locale("en");
|
||||||
|
Locale translated = new Locale(langCode);
|
||||||
|
return String.format(
|
||||||
|
"%s (%s)",
|
||||||
|
translated.getDisplayName(translated), translated.getDisplayName(english));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,148 @@
|
|||||||
|
package org.mian.gitnex.activities;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
import org.mian.gitnex.R;
|
||||||
|
import org.mian.gitnex.databinding.ActivitySettingsCodeEditorBinding;
|
||||||
|
import org.mian.gitnex.fragments.SettingsFragment;
|
||||||
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author M M Arif
|
||||||
|
*/
|
||||||
|
public class SettingsCodeEditorActivity extends BaseActivity {
|
||||||
|
|
||||||
|
private static String[] colorList;
|
||||||
|
private static int colorSelectedChoice = 0;
|
||||||
|
private View.OnClickListener onClickListener;
|
||||||
|
private static String[] indentationList;
|
||||||
|
private static int indentationSelectedChoice = 0;
|
||||||
|
private static String[] indentationTabsList;
|
||||||
|
private static int indentationTabsSelectedChoice = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
ActivitySettingsCodeEditorBinding activitySettingsCodeEditorBinding =
|
||||||
|
ActivitySettingsCodeEditorBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(activitySettingsCodeEditorBinding.getRoot());
|
||||||
|
|
||||||
|
initCloseListener();
|
||||||
|
activitySettingsCodeEditorBinding.close.setOnClickListener(onClickListener);
|
||||||
|
|
||||||
|
// color selector dialog
|
||||||
|
colorList = getResources().getStringArray(R.array.ceColors);
|
||||||
|
colorSelectedChoice = tinyDB.getInt("ceColorId");
|
||||||
|
activitySettingsCodeEditorBinding.ceColorSelected.setText(colorList[colorSelectedChoice]);
|
||||||
|
|
||||||
|
activitySettingsCodeEditorBinding.ceColorSelectionFrame.setOnClickListener(
|
||||||
|
view -> {
|
||||||
|
MaterialAlertDialogBuilder materialAlertDialogBuilder =
|
||||||
|
new MaterialAlertDialogBuilder(ctx)
|
||||||
|
.setTitle(R.string.ceSyntaxHighlightColor)
|
||||||
|
.setSingleChoiceItems(
|
||||||
|
colorList,
|
||||||
|
colorSelectedChoice,
|
||||||
|
(dialogInterfaceColor, i) -> {
|
||||||
|
colorSelectedChoice = i;
|
||||||
|
activitySettingsCodeEditorBinding.ceColorSelected
|
||||||
|
.setText(colorList[i]);
|
||||||
|
tinyDB.putInt("ceColorId", i);
|
||||||
|
|
||||||
|
SettingsFragment.refreshParent = true;
|
||||||
|
this.recreate();
|
||||||
|
this.overridePendingTransition(0, 0);
|
||||||
|
dialogInterfaceColor.dismiss();
|
||||||
|
Toasty.success(
|
||||||
|
appCtx,
|
||||||
|
getResources()
|
||||||
|
.getString(R.string.settingsSave));
|
||||||
|
});
|
||||||
|
|
||||||
|
materialAlertDialogBuilder.create().show();
|
||||||
|
});
|
||||||
|
|
||||||
|
// indentation selector dialog
|
||||||
|
indentationList = getResources().getStringArray(R.array.ceIndentation);
|
||||||
|
indentationSelectedChoice = tinyDB.getInt("ceIndentationId");
|
||||||
|
activitySettingsCodeEditorBinding.indentationSelected.setText(
|
||||||
|
indentationList[indentationSelectedChoice]);
|
||||||
|
|
||||||
|
activitySettingsCodeEditorBinding.indentationSelectionFrame.setOnClickListener(
|
||||||
|
view -> {
|
||||||
|
MaterialAlertDialogBuilder materialAlertDialogBuilder =
|
||||||
|
new MaterialAlertDialogBuilder(ctx)
|
||||||
|
.setTitle(R.string.ceIndentation)
|
||||||
|
.setSingleChoiceItems(
|
||||||
|
indentationList,
|
||||||
|
indentationSelectedChoice,
|
||||||
|
(dialogInterfaceColor, i) -> {
|
||||||
|
indentationSelectedChoice = i;
|
||||||
|
activitySettingsCodeEditorBinding
|
||||||
|
.indentationSelected.setText(
|
||||||
|
indentationList[i]);
|
||||||
|
tinyDB.putInt("ceIndentationId", i);
|
||||||
|
|
||||||
|
SettingsFragment.refreshParent = true;
|
||||||
|
this.recreate();
|
||||||
|
this.overridePendingTransition(0, 0);
|
||||||
|
dialogInterfaceColor.dismiss();
|
||||||
|
Toasty.success(
|
||||||
|
appCtx,
|
||||||
|
getResources()
|
||||||
|
.getString(R.string.settingsSave));
|
||||||
|
});
|
||||||
|
|
||||||
|
materialAlertDialogBuilder.create().show();
|
||||||
|
});
|
||||||
|
|
||||||
|
// indentation tabs selector dialog
|
||||||
|
if (indentationList[indentationSelectedChoice].startsWith("Tabs")) {
|
||||||
|
activitySettingsCodeEditorBinding.indentationTabsSelectionFrame.setVisibility(
|
||||||
|
View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
activitySettingsCodeEditorBinding.indentationTabsSelectionFrame.setVisibility(
|
||||||
|
View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
indentationTabsList = getResources().getStringArray(R.array.ceIndentationTabsWidth);
|
||||||
|
indentationTabsSelectedChoice = tinyDB.getInt("ceIndentationTabsId");
|
||||||
|
activitySettingsCodeEditorBinding.indentationTabsSelected.setText(
|
||||||
|
indentationTabsList[indentationTabsSelectedChoice]);
|
||||||
|
|
||||||
|
activitySettingsCodeEditorBinding.indentationTabsSelectionFrame.setOnClickListener(
|
||||||
|
view -> {
|
||||||
|
MaterialAlertDialogBuilder materialAlertDialogBuilder =
|
||||||
|
new MaterialAlertDialogBuilder(ctx)
|
||||||
|
.setTitle(R.string.ceIndentationTabsWidth)
|
||||||
|
.setSingleChoiceItems(
|
||||||
|
indentationTabsList,
|
||||||
|
indentationTabsSelectedChoice,
|
||||||
|
(dialogInterfaceColor, i) -> {
|
||||||
|
indentationTabsSelectedChoice = i;
|
||||||
|
activitySettingsCodeEditorBinding
|
||||||
|
.indentationTabsSelected.setText(
|
||||||
|
indentationTabsList[i]);
|
||||||
|
tinyDB.putInt("ceIndentationTabsId", i);
|
||||||
|
|
||||||
|
SettingsFragment.refreshParent = true;
|
||||||
|
this.recreate();
|
||||||
|
this.overridePendingTransition(0, 0);
|
||||||
|
dialogInterfaceColor.dismiss();
|
||||||
|
Toasty.success(
|
||||||
|
appCtx,
|
||||||
|
getResources()
|
||||||
|
.getString(R.string.settingsSave));
|
||||||
|
});
|
||||||
|
|
||||||
|
materialAlertDialogBuilder.create().show();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initCloseListener() {
|
||||||
|
onClickListener = view -> finish();
|
||||||
|
}
|
||||||
|
}
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,103 +0,0 @@
|
|||||||
package org.mian.gitnex.activities;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Locale;
|
|
||||||
import org.mian.gitnex.R;
|
|
||||||
import org.mian.gitnex.databinding.ActivitySettingsTranslationBinding;
|
|
||||||
import org.mian.gitnex.fragments.SettingsFragment;
|
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author M M Arif
|
|
||||||
*/
|
|
||||||
public class SettingsTranslationActivity extends BaseActivity {
|
|
||||||
|
|
||||||
private static int langSelectedChoice = 0;
|
|
||||||
private View.OnClickListener onClickListener;
|
|
||||||
|
|
||||||
private static String getLanguageDisplayName(String langCode) {
|
|
||||||
Locale english = new Locale("en");
|
|
||||||
Locale translated = new Locale(langCode);
|
|
||||||
return String.format(
|
|
||||||
"%s (%s)",
|
|
||||||
translated.getDisplayName(translated), translated.getDisplayName(english));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
LinkedHashMap<String, String> langs = new LinkedHashMap<>();
|
|
||||||
langs.put("", getString(R.string.settingsLanguageSystem));
|
|
||||||
for (String langCode : getResources().getStringArray(R.array.languages)) {
|
|
||||||
langs.put(langCode, getLanguageDisplayName(langCode));
|
|
||||||
}
|
|
||||||
|
|
||||||
ActivitySettingsTranslationBinding activitySettingsTranslationBinding =
|
|
||||||
ActivitySettingsTranslationBinding.inflate(getLayoutInflater());
|
|
||||||
setContentView(activitySettingsTranslationBinding.getRoot());
|
|
||||||
|
|
||||||
ImageView closeActivity = activitySettingsTranslationBinding.close;
|
|
||||||
|
|
||||||
initCloseListener();
|
|
||||||
closeActivity.setOnClickListener(onClickListener);
|
|
||||||
|
|
||||||
final TextView tvLanguageSelected =
|
|
||||||
activitySettingsTranslationBinding.tvLanguageSelected; // setter for en, fr
|
|
||||||
TextView helpTranslate = activitySettingsTranslationBinding.helpTranslate;
|
|
||||||
|
|
||||||
LinearLayout langFrame = activitySettingsTranslationBinding.langFrame;
|
|
||||||
|
|
||||||
helpTranslate.setOnClickListener(
|
|
||||||
v12 -> {
|
|
||||||
AppUtil.openUrlInBrowser(this, getResources().getString(R.string.crowdInLink));
|
|
||||||
});
|
|
||||||
|
|
||||||
langSelectedChoice = tinyDB.getInt("langId");
|
|
||||||
tvLanguageSelected.setText(
|
|
||||||
langs.get(langs.keySet().toArray(new String[0])[langSelectedChoice]));
|
|
||||||
|
|
||||||
// language dialog
|
|
||||||
langFrame.setOnClickListener(
|
|
||||||
view -> {
|
|
||||||
MaterialAlertDialogBuilder materialAlertDialogBuilder =
|
|
||||||
new MaterialAlertDialogBuilder(ctx)
|
|
||||||
.setTitle(R.string.settingsLanguageSelectorDialogTitle)
|
|
||||||
.setCancelable(langSelectedChoice != -1)
|
|
||||||
.setNeutralButton(getString(R.string.cancelButton), null)
|
|
||||||
.setSingleChoiceItems(
|
|
||||||
langs.values().toArray(new String[0]),
|
|
||||||
langSelectedChoice,
|
|
||||||
(dialogInterface, i) -> {
|
|
||||||
String selectedLanguage =
|
|
||||||
langs.keySet().toArray(new String[0])[i];
|
|
||||||
tinyDB.putInt("langId", i);
|
|
||||||
tinyDB.putString("locale", selectedLanguage);
|
|
||||||
|
|
||||||
SettingsFragment.refreshParent = true;
|
|
||||||
this.overridePendingTransition(0, 0);
|
|
||||||
dialogInterface.dismiss();
|
|
||||||
Toasty.success(
|
|
||||||
appCtx,
|
|
||||||
getResources()
|
|
||||||
.getString(R.string.settingsSave));
|
|
||||||
this.recreate();
|
|
||||||
});
|
|
||||||
|
|
||||||
materialAlertDialogBuilder.create().show();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initCloseListener() {
|
|
||||||
|
|
||||||
onClickListener = view -> finish();
|
|
||||||
}
|
|
||||||
}
|
|
@ -230,6 +230,8 @@ public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
LinearLayout.LayoutParams.WRAP_CONTENT);
|
LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||||
params.setMargins(0, 0, 15, 0);
|
params.setMargins(0, 0, 15, 0);
|
||||||
|
|
||||||
|
Typeface typeface = AppUtil.getTypeface(context);
|
||||||
|
|
||||||
if (issue.getLabels() != null) {
|
if (issue.getLabels() != null) {
|
||||||
|
|
||||||
if (!tinyDb.getBoolean("showLabelsInList", false)) { // default
|
if (!tinyDb.getBoolean("showLabelsInList", false)) { // default
|
||||||
@ -251,7 +253,7 @@ public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
TextDrawable drawable =
|
TextDrawable drawable =
|
||||||
TextDrawable.builder()
|
TextDrawable.builder()
|
||||||
.beginConfig()
|
.beginConfig()
|
||||||
.useFont(Typeface.DEFAULT)
|
.useFont(typeface)
|
||||||
.width(54)
|
.width(54)
|
||||||
.height(54)
|
.height(54)
|
||||||
.endConfig()
|
.endConfig()
|
||||||
@ -283,13 +285,13 @@ public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
TextDrawable drawable =
|
TextDrawable drawable =
|
||||||
TextDrawable.builder()
|
TextDrawable.builder()
|
||||||
.beginConfig()
|
.beginConfig()
|
||||||
.useFont(Typeface.DEFAULT)
|
.useFont(typeface)
|
||||||
.textColor(new ColorInverter().getContrastColor(color))
|
.textColor(new ColorInverter().getContrastColor(color))
|
||||||
.fontSize(textSize)
|
.fontSize(textSize)
|
||||||
.width(
|
.width(
|
||||||
LabelWidthCalculator.calculateLabelWidth(
|
LabelWidthCalculator.calculateLabelWidth(
|
||||||
labelName,
|
labelName,
|
||||||
Typeface.DEFAULT,
|
typeface,
|
||||||
textSize,
|
textSize,
|
||||||
AppUtil.getPixelsFromDensity(context, 8)))
|
AppUtil.getPixelsFromDensity(context, 8)))
|
||||||
.height(height)
|
.height(height)
|
||||||
|
@ -457,6 +457,7 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
|
|
||||||
void bindData(TimelineComment timelineComment) {
|
void bindData(TimelineComment timelineComment) {
|
||||||
|
|
||||||
|
Typeface typeface = AppUtil.getTypeface(context);
|
||||||
int fontSize = 14;
|
int fontSize = 14;
|
||||||
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
||||||
|
|
||||||
@ -500,13 +501,13 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
TextDrawable drawable =
|
TextDrawable drawable =
|
||||||
TextDrawable.builder()
|
TextDrawable.builder()
|
||||||
.beginConfig()
|
.beginConfig()
|
||||||
.useFont(Typeface.DEFAULT)
|
.useFont(typeface)
|
||||||
.textColor(new ColorInverter().getContrastColor(color))
|
.textColor(new ColorInverter().getContrastColor(color))
|
||||||
.fontSize(textSize)
|
.fontSize(textSize)
|
||||||
.width(
|
.width(
|
||||||
LabelWidthCalculator.calculateLabelWidth(
|
LabelWidthCalculator.calculateLabelWidth(
|
||||||
issueComment.getLabel().getName(),
|
issueComment.getLabel().getName(),
|
||||||
Typeface.DEFAULT,
|
typeface,
|
||||||
textSize,
|
textSize,
|
||||||
AppUtil.getPixelsFromDensity(context, 10)))
|
AppUtil.getPixelsFromDensity(context, 10)))
|
||||||
.height(height)
|
.height(height)
|
||||||
|
@ -208,6 +208,8 @@ public class IssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||||||
LinearLayout.LayoutParams.WRAP_CONTENT);
|
LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||||
params.setMargins(0, 0, 15, 0);
|
params.setMargins(0, 0, 15, 0);
|
||||||
|
|
||||||
|
Typeface typeface = AppUtil.getTypeface(context);
|
||||||
|
|
||||||
if (issue.getLabels() != null) {
|
if (issue.getLabels() != null) {
|
||||||
|
|
||||||
if (!tinyDb.getBoolean("showLabelsInList", false)) { // default
|
if (!tinyDb.getBoolean("showLabelsInList", false)) { // default
|
||||||
@ -229,7 +231,7 @@ public class IssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||||||
TextDrawable drawable =
|
TextDrawable drawable =
|
||||||
TextDrawable.builder()
|
TextDrawable.builder()
|
||||||
.beginConfig()
|
.beginConfig()
|
||||||
.useFont(Typeface.DEFAULT)
|
.useFont(typeface)
|
||||||
.width(54)
|
.width(54)
|
||||||
.height(54)
|
.height(54)
|
||||||
.endConfig()
|
.endConfig()
|
||||||
@ -261,13 +263,13 @@ public class IssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||||||
TextDrawable drawable =
|
TextDrawable drawable =
|
||||||
TextDrawable.builder()
|
TextDrawable.builder()
|
||||||
.beginConfig()
|
.beginConfig()
|
||||||
.useFont(Typeface.DEFAULT)
|
.useFont(typeface)
|
||||||
.textColor(new ColorInverter().getContrastColor(color))
|
.textColor(new ColorInverter().getContrastColor(color))
|
||||||
.fontSize(textSize)
|
.fontSize(textSize)
|
||||||
.width(
|
.width(
|
||||||
LabelWidthCalculator.calculateLabelWidth(
|
LabelWidthCalculator.calculateLabelWidth(
|
||||||
labelName,
|
labelName,
|
||||||
Typeface.DEFAULT,
|
typeface,
|
||||||
textSize,
|
textSize,
|
||||||
AppUtil.getPixelsFromDensity(context, 8)))
|
AppUtil.getPixelsFromDensity(context, 8)))
|
||||||
.height(height)
|
.height(height)
|
||||||
|
@ -198,6 +198,8 @@ public class PullRequestsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||||||
LinearLayout.LayoutParams.WRAP_CONTENT);
|
LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||||
params.setMargins(0, 0, 15, 0);
|
params.setMargins(0, 0, 15, 0);
|
||||||
|
|
||||||
|
Typeface typeface = AppUtil.getTypeface(context);
|
||||||
|
|
||||||
if (pullRequest.getLabels() != null) {
|
if (pullRequest.getLabels() != null) {
|
||||||
|
|
||||||
if (!tinyDb.getBoolean("showLabelsInList", false)) { // default
|
if (!tinyDb.getBoolean("showLabelsInList", false)) { // default
|
||||||
@ -219,7 +221,7 @@ public class PullRequestsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||||||
TextDrawable drawable =
|
TextDrawable drawable =
|
||||||
TextDrawable.builder()
|
TextDrawable.builder()
|
||||||
.beginConfig()
|
.beginConfig()
|
||||||
.useFont(Typeface.DEFAULT)
|
.useFont(typeface)
|
||||||
.width(54)
|
.width(54)
|
||||||
.height(54)
|
.height(54)
|
||||||
.endConfig()
|
.endConfig()
|
||||||
@ -251,13 +253,13 @@ public class PullRequestsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||||||
TextDrawable drawable =
|
TextDrawable drawable =
|
||||||
TextDrawable.builder()
|
TextDrawable.builder()
|
||||||
.beginConfig()
|
.beginConfig()
|
||||||
.useFont(Typeface.DEFAULT)
|
.useFont(typeface)
|
||||||
.textColor(new ColorInverter().getContrastColor(color))
|
.textColor(new ColorInverter().getContrastColor(color))
|
||||||
.fontSize(textSize)
|
.fontSize(textSize)
|
||||||
.width(
|
.width(
|
||||||
LabelWidthCalculator.calculateLabelWidth(
|
LabelWidthCalculator.calculateLabelWidth(
|
||||||
labelName,
|
labelName,
|
||||||
Typeface.DEFAULT,
|
typeface,
|
||||||
textSize,
|
textSize,
|
||||||
AppUtil.getPixelsFromDensity(context, 8)))
|
AppUtil.getPixelsFromDensity(context, 8)))
|
||||||
.height(height)
|
.height(height)
|
||||||
|
@ -16,12 +16,10 @@ 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.SettingsCodeEditorActivity;
|
||||||
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.databinding.CustomAboutDialogBinding;
|
import org.mian.gitnex.databinding.CustomAboutDialogBinding;
|
||||||
import org.mian.gitnex.databinding.FragmentSettingsBinding;
|
import org.mian.gitnex.databinding.FragmentSettingsBinding;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -63,8 +61,8 @@ public class SettingsFragment extends Fragment {
|
|||||||
fragmentSettingsBinding.appearanceFrame.setOnClickListener(
|
fragmentSettingsBinding.appearanceFrame.setOnClickListener(
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsAppearanceActivity.class)));
|
v1 -> startActivity(new Intent(ctx, SettingsAppearanceActivity.class)));
|
||||||
|
|
||||||
fragmentSettingsBinding.draftsFrame.setOnClickListener(
|
fragmentSettingsBinding.codeEditorFrame.setOnClickListener(
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsDraftsActivity.class)));
|
v1 -> startActivity(new Intent(ctx, SettingsCodeEditorActivity.class)));
|
||||||
|
|
||||||
fragmentSettingsBinding.securityFrame.setOnClickListener(
|
fragmentSettingsBinding.securityFrame.setOnClickListener(
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsSecurityActivity.class)));
|
v1 -> startActivity(new Intent(ctx, SettingsSecurityActivity.class)));
|
||||||
@ -72,12 +70,6 @@ public class SettingsFragment extends Fragment {
|
|||||||
fragmentSettingsBinding.notificationsFrame.setOnClickListener(
|
fragmentSettingsBinding.notificationsFrame.setOnClickListener(
|
||||||
v1 -> startActivity(new Intent(ctx, SettingsNotificationsActivity.class)));
|
v1 -> startActivity(new Intent(ctx, SettingsNotificationsActivity.class)));
|
||||||
|
|
||||||
fragmentSettingsBinding.languagesFrame.setOnClickListener(
|
|
||||||
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());
|
||||||
@ -135,10 +127,14 @@ public class SettingsFragment extends Fragment {
|
|||||||
requireContext(), getResources().getString(R.string.appWebsiteLink));
|
requireContext(), getResources().getString(R.string.appWebsiteLink));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
aboutAppDialogBinding.feedback.setOnClickListener(
|
||||||
|
v14 -> {
|
||||||
|
AppUtil.openUrlInBrowser(
|
||||||
|
requireContext(), getResources().getString(R.string.feedbackLink));
|
||||||
|
});
|
||||||
|
|
||||||
if (AppUtil.isPro(requireContext())) {
|
if (AppUtil.isPro(requireContext())) {
|
||||||
aboutAppDialogBinding.supportHeader.setVisibility(View.GONE);
|
aboutAppDialogBinding.layoutFrame1.setVisibility(View.GONE);
|
||||||
aboutAppDialogBinding.donationLinkPatreon.setVisibility(View.GONE);
|
|
||||||
aboutAppDialogBinding.donationLinkBuyMeaCoffee.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
materialAlertDialogBuilder.show();
|
materialAlertDialogBuilder.show();
|
||||||
|
@ -599,6 +599,9 @@ public class AppUtil {
|
|||||||
Typeface.createFromAsset(
|
Typeface.createFromAsset(
|
||||||
context.getAssets(), "fonts/sourcecodeproregular.ttf");
|
context.getAssets(), "fonts/sourcecodeproregular.ttf");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
typeface = Typeface.DEFAULT;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
typeface =
|
typeface =
|
||||||
Typeface.createFromAsset(
|
Typeface.createFromAsset(
|
||||||
|
@ -14,7 +14,7 @@ public class FontsOverride {
|
|||||||
public static void setDefaultFont(Context context) {
|
public static void setDefaultFont(Context context) {
|
||||||
final Typeface regular = AppUtil.getTypeface(context);
|
final Typeface regular = AppUtil.getTypeface(context);
|
||||||
|
|
||||||
for (String field : new String[] {"DEFAULT", "MONOSPACE", "SERIF", "SANS_SERIF"}) {
|
for (String field : new String[] {"MONOSPACE"}) {
|
||||||
replaceFont(field, regular);
|
replaceFont(field, regular);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
package org.mian.gitnex.helpers.codeeditor.theme;
|
||||||
|
|
||||||
|
import androidx.annotation.ColorRes;
|
||||||
|
import org.mian.gitnex.R;
|
||||||
|
import org.mian.gitnex.helpers.codeeditor.languages.LanguageElement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author M M Arif
|
||||||
|
*/
|
||||||
|
public class BlueMoonDarkTheme implements Theme {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@ColorRes
|
||||||
|
public int getColor(LanguageElement element) {
|
||||||
|
switch (element) {
|
||||||
|
case HEX:
|
||||||
|
case NUMBER:
|
||||||
|
case KEYWORD:
|
||||||
|
case OPERATION:
|
||||||
|
case GENERIC:
|
||||||
|
return R.color.moon_dark_blue;
|
||||||
|
case CHAR:
|
||||||
|
case STRING:
|
||||||
|
return R.color.moon_dark_turquoise;
|
||||||
|
case SINGLE_LINE_COMMENT:
|
||||||
|
case MULTI_LINE_COMMENT:
|
||||||
|
return R.color.moon_dark_grey;
|
||||||
|
case ATTRIBUTE:
|
||||||
|
case TODO_COMMENT:
|
||||||
|
case ANNOTATION:
|
||||||
|
return R.color.moon_deep_sky_blue;
|
||||||
|
default:
|
||||||
|
return R.color.moon_dark_white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@ColorRes
|
||||||
|
public int getDefaultColor() {
|
||||||
|
return R.color.moon_dark_white;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@ColorRes
|
||||||
|
public int getBackgroundColor() {
|
||||||
|
return R.color.moon_dark_black;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package org.mian.gitnex.helpers.codeeditor.theme;
|
||||||
|
|
||||||
|
import androidx.annotation.ColorRes;
|
||||||
|
import org.mian.gitnex.R;
|
||||||
|
import org.mian.gitnex.helpers.codeeditor.languages.LanguageElement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author M M Arif
|
||||||
|
*/
|
||||||
|
public class BlueMoonTheme implements Theme {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@ColorRes
|
||||||
|
public int getColor(LanguageElement element) {
|
||||||
|
switch (element) {
|
||||||
|
case HEX:
|
||||||
|
case NUMBER:
|
||||||
|
case KEYWORD:
|
||||||
|
case OPERATION:
|
||||||
|
case GENERIC:
|
||||||
|
return R.color.moon_dark_blue;
|
||||||
|
case CHAR:
|
||||||
|
case STRING:
|
||||||
|
return R.color.moon_dark_turquoise;
|
||||||
|
case SINGLE_LINE_COMMENT:
|
||||||
|
case MULTI_LINE_COMMENT:
|
||||||
|
return R.color.moon_dark_grey;
|
||||||
|
case ATTRIBUTE:
|
||||||
|
case TODO_COMMENT:
|
||||||
|
case ANNOTATION:
|
||||||
|
return R.color.moon_deep_sky_blue;
|
||||||
|
default:
|
||||||
|
return R.color.moon_dark_black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@ColorRes
|
||||||
|
public int getDefaultColor() {
|
||||||
|
return R.color.moon_dark_black;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@ColorRes
|
||||||
|
public int getBackgroundColor() {
|
||||||
|
return R.color.moon_background_grey;
|
||||||
|
}
|
||||||
|
}
|
@ -23,8 +23,6 @@ public class FiveColorsDarkTheme implements Theme {
|
|||||||
case CHAR:
|
case CHAR:
|
||||||
case STRING:
|
case STRING:
|
||||||
return R.color.five_dark_yellow;
|
return R.color.five_dark_yellow;
|
||||||
case BUILTIN:
|
|
||||||
return R.color.five_dark_white;
|
|
||||||
case SINGLE_LINE_COMMENT:
|
case SINGLE_LINE_COMMENT:
|
||||||
case MULTI_LINE_COMMENT:
|
case MULTI_LINE_COMMENT:
|
||||||
return R.color.five_dark_grey;
|
return R.color.five_dark_grey;
|
||||||
|
@ -23,8 +23,6 @@ public class FiveColorsTheme implements Theme {
|
|||||||
case CHAR:
|
case CHAR:
|
||||||
case STRING:
|
case STRING:
|
||||||
return R.color.five_yellow;
|
return R.color.five_yellow;
|
||||||
case BUILTIN:
|
|
||||||
return R.color.five_dark_black;
|
|
||||||
case SINGLE_LINE_COMMENT:
|
case SINGLE_LINE_COMMENT:
|
||||||
case MULTI_LINE_COMMENT:
|
case MULTI_LINE_COMMENT:
|
||||||
return R.color.five_dark_grey;
|
return R.color.five_dark_grey;
|
||||||
|
@ -4,21 +4,31 @@ import android.content.Context;
|
|||||||
import androidx.annotation.ColorRes;
|
import androidx.annotation.ColorRes;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.codeeditor.languages.LanguageElement;
|
import org.mian.gitnex.helpers.codeeditor.languages.LanguageElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qwerty287
|
* @author qwerty287
|
||||||
|
* @author M M Arif
|
||||||
*/
|
*/
|
||||||
public interface Theme {
|
public interface Theme {
|
||||||
|
|
||||||
FiveColorsTheme FIVE_COLORS = new FiveColorsTheme();
|
FiveColorsTheme FIVE_COLORS = new FiveColorsTheme();
|
||||||
|
|
||||||
FiveColorsDarkTheme FIVE_COLORS_DARK = new FiveColorsDarkTheme();
|
FiveColorsDarkTheme FIVE_COLORS_DARK = new FiveColorsDarkTheme();
|
||||||
|
BlueMoonTheme BLUE_MOON_THEME = new BlueMoonTheme();
|
||||||
|
BlueMoonDarkTheme BLUE_MOON_DARK_THEME = new BlueMoonDarkTheme();
|
||||||
|
|
||||||
static Theme getDefaultTheme(Context context) {
|
static Theme getDefaultTheme(Context context) {
|
||||||
return AppUtil.getColorFromAttribute(context, R.attr.isDark) == 1
|
TinyDB tinyDB = TinyDB.getInstance(context);
|
||||||
? FIVE_COLORS_DARK
|
if (tinyDB.getInt("ceColorId") == 0) {
|
||||||
: FIVE_COLORS;
|
return AppUtil.getColorFromAttribute(context, R.attr.isDark) == 1
|
||||||
|
? FIVE_COLORS_DARK
|
||||||
|
: FIVE_COLORS;
|
||||||
|
} else {
|
||||||
|
return AppUtil.getColorFromAttribute(context, R.attr.isDark) == 1
|
||||||
|
? BLUE_MOON_DARK_THEME
|
||||||
|
: BLUE_MOON_THEME;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ColorRes
|
@ColorRes
|
||||||
|
41
app/src/main/res/drawable/ic_bmc.xml
Normal file
41
app/src/main/res/drawable/ic_bmc.xml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M3,14c0.83,0.642 2.077,1.017 3.5,1c1.423,0.017 2.67,-0.358 3.5,-1c0.83,-0.642 2.077,-1.017 3.5,-1c1.423,-0.017 2.67,0.358 3.5,1"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M8,3a2.4,2.4 0,0 0,-1 2a2.4,2.4 0,0 0,1 2"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M12,3a2.4,2.4 0,0 0,-1 2a2.4,2.4 0,0 0,1 2"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M3,10h14v5a6,6 0,0 1,-6 6h-2a6,6 0,0 1,-6 -6v-5z"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M16.746,16.726a3,3 0,1 0,0.252 -5.555"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
</vector>
|
27
app/src/main/res/drawable/ic_code_v2.xml
Normal file
27
app/src/main/res/drawable/ic_code_v2.xml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M7,8l-4,4l4,4"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M17,8l4,4l-4,4"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M14,4l-4,16"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
</vector>
|
48
app/src/main/res/drawable/ic_feedback.xml
Normal file
48
app/src/main/res/drawable/ic_feedback.xml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M9,5h-2a2,2 0,0 0,-2 2v12a2,2 0,0 0,2 2h10a2,2 0,0 0,2 -2v-12a2,2 0,0 0,-2 -2h-2"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M9,3m0,2a2,2 0,0 1,2 -2h2a2,2 0,0 1,2 2v0a2,2 0,0 1,-2 2h-2a2,2 0,0 1,-2 -2z"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M9,12l0.01,0"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M13,12l2,0"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M9,16l0.01,0"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M13,16l2,0"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
</vector>
|
20
app/src/main/res/drawable/ic_patreon.xml
Normal file
20
app/src/main/res/drawable/ic_patreon.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M3,3h3v18h-3z"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M15,9.5m-6.5,0a6.5,6.5 0,1 0,13 0a6.5,6.5 0,1 0,-13 0"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="?attr/iconsColor"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
</vector>
|
@ -95,7 +95,8 @@
|
|||||||
app:endIconTint="?attr/iconsColor"
|
app:endIconTint="?attr/iconsColor"
|
||||||
app:hintTextColor="?attr/hintColor"
|
app:hintTextColor="?attr/hintColor"
|
||||||
app:startIconDrawable="@drawable/ic_link"
|
app:startIconDrawable="@drawable/ic_link"
|
||||||
app:startIconTint="?attr/iconsColor">
|
app:startIconTint="?attr/iconsColor"
|
||||||
|
app:helperText="@string/instanceHelperText">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/instanceUrl"
|
android:id="@+id/instanceUrl"
|
||||||
|
@ -97,7 +97,8 @@
|
|||||||
app:endIconTint="?attr/iconsColor"
|
app:endIconTint="?attr/iconsColor"
|
||||||
app:hintTextColor="?attr/hintColor"
|
app:hintTextColor="?attr/hintColor"
|
||||||
app:startIconDrawable="@drawable/ic_link"
|
app:startIconDrawable="@drawable/ic_link"
|
||||||
app:startIconTint="?attr/iconsColor">
|
app:startIconTint="?attr/iconsColor"
|
||||||
|
app:helperText="@string/instanceHelperText">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/instance_url"
|
android:id="@+id/instance_url"
|
||||||
|
@ -216,7 +216,7 @@
|
|||||||
android:id="@+id/labelsInListFrame"
|
android:id="@+id/labelsInListFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/dimen60dp"
|
android:layout_marginBottom="@dimen/dimen6dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="@dimen/dimen16dp">
|
android:padding="@dimen/dimen16dp">
|
||||||
@ -268,4 +268,51 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</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>
|
</LinearLayout>
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/primaryBackgroundColor">
|
android:background="?attr/primaryBackgroundColor"
|
||||||
|
android:theme="@style/AppTheme.AppBarOverlay">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
@ -39,7 +40,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:text="@string/settingsLanguageHeaderText"
|
android:text="@string/codeEditor"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="@dimen/dimen20sp"/>
|
android:textSize="@dimen/dimen20sp"/>
|
||||||
|
|
||||||
@ -48,9 +49,10 @@
|
|||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/langFrame"
|
android:id="@+id/ceColorSelectionFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dimen6dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
@ -58,39 +60,91 @@
|
|||||||
android:padding="@dimen/dimen16dp">
|
android:padding="@dimen/dimen16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvLanguageHeaderSelector"
|
android:id="@+id/ceColorHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
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:text="@string/settingsLanguageSelectorHeader"
|
android:text="@string/ceSyntaxHighlightColor"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="@dimen/dimen18sp"/>
|
android:textSize="@dimen/dimen18sp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvLanguageSelected"
|
android:id="@+id/ceColorSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
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:text="@string/settingsLanguageSelectedHeaderDefault"
|
android:text="@string/themeSelectionSelectedText"
|
||||||
android:textColor="?attr/selectedTextColor"
|
android:textColor="?attr/selectedTextColor"
|
||||||
android:textSize="@dimen/dimen16sp"/>
|
android:textSize="@dimen/dimen16sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/helpTranslate"
|
android:id="@+id/indentationSelectionFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:autoLink="web"
|
android:layout_marginBottom="@dimen/dimen6dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:paddingStart="@dimen/dimen40dp"
|
android:clickable="true"
|
||||||
android:paddingTop="@dimen/dimen16dp"
|
android:focusable="true"
|
||||||
android:paddingEnd="@dimen/dimen24dp"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/dimen16dp"
|
android:padding="@dimen/dimen16dp">
|
||||||
android:text="@string/settingsHelpTranslateText"
|
|
||||||
android:textColor="@color/lightBlue"
|
<TextView
|
||||||
android:textSize="@dimen/dimen16sp"/>
|
android:id="@+id/indentationHeaderSelector"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dimen24dp"
|
||||||
|
android:layout_marginEnd="@dimen/dimen24dp"
|
||||||
|
android:text="@string/ceIndentation"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="@dimen/dimen18sp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/indentationSelected"
|
||||||
|
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/indentationTabsSelectionFrame"
|
||||||
|
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/indentationTabsHeaderSelector"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dimen24dp"
|
||||||
|
android:layout_marginEnd="@dimen/dimen24dp"
|
||||||
|
android:text="@string/ceIndentationTabsWidth"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="@dimen/dimen18sp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/indentationTabsSelected"
|
||||||
|
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>
|
</LinearLayout>
|
@ -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>
|
|
@ -9,7 +9,8 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/dimen16dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -17,7 +18,6 @@
|
|||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="@dimen/dimen12dp"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:ignore="UselessParent">
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
@ -70,7 +70,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:text="@string/appVersionBuild"
|
android:text="@string/appVersionBuild"
|
||||||
android:textColor="@color/retroThemeColorSecondary"
|
android:textColor="@color/retroThemeInputTextColor"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
android:paddingTop="@dimen/dimen8dp"
|
android:paddingTop="@dimen/dimen8dp"
|
||||||
android:paddingBottom="@dimen/dimen8dp"
|
android:paddingBottom="@dimen/dimen8dp"
|
||||||
@ -85,112 +85,158 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dimen16dp"
|
android:layout_marginTop="@dimen/dimen24dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- user server version -->
|
<!-- user server version -->
|
||||||
<TextView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/userServerVersionHeader"
|
style="?attr/materialCardViewFilledStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dimen72dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
app:cardBackgroundColor="?attr/materialCardBackgroundColor"
|
||||||
|
app:cardCornerRadius="@dimen/dimen16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/userServerVersionHeader"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="@dimen/dimen12dp"
|
||||||
|
android:text="@string/commitPage"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="@dimen/dimen16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/userServerVersion"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dimen28dp"
|
||||||
|
android:padding="@dimen/dimen12dp"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="@dimen/dimen14sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<!-- donate text -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_frame_1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dimen24dp"
|
android:layout_marginTop="@dimen/dimen12dp"
|
||||||
android:paddingStart="@dimen/dimen28dp"
|
android:orientation="horizontal">
|
||||||
android:paddingEnd="@dimen/dimen28dp"
|
|
||||||
android:text="@string/commitPage"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="@dimen/dimen16sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/userServerVersion"
|
android:id="@+id/donationLinkPatreon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dimen0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dimen60dp"
|
||||||
android:paddingStart="@dimen/dimen28dp"
|
android:layout_marginEnd="@dimen/dimen4dp"
|
||||||
android:paddingEnd="@dimen/dimen28dp"
|
android:layout_marginStart="@dimen/dimen0dp"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:layout_weight=".5"
|
||||||
android:textIsSelectable="true"
|
android:stateListAnimator="@null"
|
||||||
android:textSize="@dimen/dimen14sp" />
|
android:text="@string/supportTextPatreon"
|
||||||
<!-- user server version -->
|
android:textStyle="bold"
|
||||||
|
android:contentDescription="@string/supportTextPatreon"
|
||||||
|
android:textColor="?attr/materialCardBackgroundColor"
|
||||||
|
app:iconTint="?attr/materialCardBackgroundColor"
|
||||||
|
android:backgroundTint="?attr/fabColor"
|
||||||
|
app:icon="@drawable/ic_patreon" />
|
||||||
|
|
||||||
<!-- support -->
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
<TextView
|
android:id="@+id/donationLinkBuyMeaCoffee"
|
||||||
android:id="@+id/supportHeader"
|
android:layout_width="@dimen/dimen0dp"
|
||||||
|
android:layout_height="@dimen/dimen60dp"
|
||||||
|
android:layout_marginEnd="@dimen/dimen0dp"
|
||||||
|
android:layout_marginStart="@dimen/dimen6dp"
|
||||||
|
android:layout_weight=".5"
|
||||||
|
android:stateListAnimator="@null"
|
||||||
|
android:text="@string/supportTextBuyMeaCoffee"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:contentDescription="@string/supportTextBuyMeaCoffee"
|
||||||
|
android:textColor="?attr/materialCardBackgroundColor"
|
||||||
|
app:iconTint="?attr/materialCardBackgroundColor"
|
||||||
|
android:backgroundTint="?attr/fabColor"
|
||||||
|
app:icon="@drawable/ic_bmc" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- translate/website text -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_frame_2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dimen24dp"
|
android:layout_marginTop="@dimen/dimen12dp"
|
||||||
android:paddingStart="@dimen/dimen28dp"
|
android:orientation="horizontal">
|
||||||
android:paddingEnd="@dimen/dimen28dp"
|
|
||||||
android:text="@string/supportText"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="@dimen/dimen16sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/donationLinkPatreon"
|
android:id="@+id/translateLink"
|
||||||
|
android:layout_width="@dimen/dimen0dp"
|
||||||
|
android:layout_height="@dimen/dimen60dp"
|
||||||
|
android:layout_marginEnd="@dimen/dimen4dp"
|
||||||
|
android:layout_marginStart="@dimen/dimen0dp"
|
||||||
|
android:layout_weight=".5"
|
||||||
|
android:stateListAnimator="@null"
|
||||||
|
android:text="@string/translateWithCrowdin"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:contentDescription="@string/translateWithCrowdin"
|
||||||
|
android:textColor="?attr/materialCardBackgroundColor"
|
||||||
|
app:iconTint="?attr/materialCardBackgroundColor"
|
||||||
|
android:backgroundTint="?attr/fabColor"
|
||||||
|
app:icon="@drawable/ic_language" />
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
|
android:id="@+id/appWebsite"
|
||||||
|
android:layout_width="@dimen/dimen0dp"
|
||||||
|
android:layout_height="@dimen/dimen60dp"
|
||||||
|
android:layout_marginEnd="@dimen/dimen0dp"
|
||||||
|
android:layout_marginStart="@dimen/dimen6dp"
|
||||||
|
android:layout_weight=".5"
|
||||||
|
android:stateListAnimator="@null"
|
||||||
|
android:text="@string/websiteText"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:contentDescription="@string/websiteText"
|
||||||
|
android:textColor="?attr/materialCardBackgroundColor"
|
||||||
|
app:iconTint="?attr/materialCardBackgroundColor"
|
||||||
|
android:backgroundTint="?attr/fabColor"
|
||||||
|
app:icon="@drawable/ic_browser" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- feedback text -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_frame_3"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:autoLink="web"
|
android:layout_marginTop="@dimen/dimen12dp"
|
||||||
android:paddingStart="@dimen/dimen28dp"
|
android:orientation="horizontal">
|
||||||
android:paddingEnd="@dimen/dimen28dp"
|
|
||||||
android:text="@string/supportTextPatreon"
|
|
||||||
android:textColor="@color/lightBlue"
|
|
||||||
android:textColorLink="@color/lightBlue"
|
|
||||||
android:textSize="@dimen/dimen14sp" />
|
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/donationLinkBuyMeaCoffee"
|
android:id="@+id/feedback"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="@dimen/dimen0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dimen60dp"
|
||||||
android:autoLink="web"
|
android:layout_marginEnd="@dimen/dimen4dp"
|
||||||
android:paddingStart="@dimen/dimen28dp"
|
android:layout_marginStart="@dimen/dimen0dp"
|
||||||
android:paddingEnd="@dimen/dimen28dp"
|
android:layout_weight=".5"
|
||||||
android:text="@string/supportTextBuyMeaCoffee"
|
android:stateListAnimator="@null"
|
||||||
android:textColor="@color/lightBlue"
|
android:text="@string/feedbackText"
|
||||||
android:textColorLink="@color/lightBlue"
|
android:textStyle="bold"
|
||||||
android:textSize="@dimen/dimen14sp" />
|
android:contentDescription="@string/feedbackText"
|
||||||
<!-- support -->
|
android:textColor="?attr/materialCardBackgroundColor"
|
||||||
|
app:iconTint="?attr/materialCardBackgroundColor"
|
||||||
|
android:backgroundTint="?attr/fabColor"
|
||||||
|
app:icon="@drawable/ic_feedback" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:layout_weight=".5" />
|
||||||
|
|
||||||
<!-- translate -->
|
</LinearLayout>
|
||||||
<TextView
|
|
||||||
android:id="@+id/translateHeader"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dimen24dp"
|
|
||||||
android:paddingStart="@dimen/dimen28dp"
|
|
||||||
android:paddingEnd="@dimen/dimen28dp"
|
|
||||||
android:text="@string/translateText"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="@dimen/dimen16sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/translateLink"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:autoLink="web"
|
|
||||||
android:gravity="start"
|
|
||||||
android:paddingStart="@dimen/dimen28dp"
|
|
||||||
android:paddingEnd="@dimen/dimen28dp"
|
|
||||||
android:text="@string/translateWithCrowdin"
|
|
||||||
android:textColor="@color/lightBlue"
|
|
||||||
android:textColorLink="@color/lightBlue"
|
|
||||||
android:textSize="@dimen/dimen14sp"
|
|
||||||
android:visibility="visible" />
|
|
||||||
<!-- translate -->
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/appWebsite"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/dimen54dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_margin="@dimen/dimen24dp"
|
|
||||||
android:text="@string/websiteText"
|
|
||||||
android:textColor="?attr/materialCardBackgroundColor"
|
|
||||||
android:textSize="@dimen/dimen16sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/draftsFrame"
|
android:id="@+id/codeEditorFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
@ -142,7 +142,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/generalImgContentText"
|
android:contentDescription="@string/generalImgContentText"
|
||||||
app:srcCompat="@drawable/ic_drafts"/>
|
app:srcCompat="@drawable/ic_code_v2"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@ -153,23 +153,23 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/draftsHeader"
|
android:id="@+id/codeEditor"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
android:text="@string/draftsHeader"
|
android:text="@string/codeEditor"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="18sp"/>
|
android:textSize="18sp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/draftsHintText"
|
android:id="@+id/codeEditorHintText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
android:text="@string/draftsHintText"
|
android:text="@string/codeEditorHintText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="12sp"/>
|
android:textSize="12sp"/>
|
||||||
|
|
||||||
@ -293,116 +293,6 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/languagesFrame"
|
|
||||||
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_flag"/>
|
|
||||||
|
|
||||||
<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/tvLanguages"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:paddingEnd="12dp"
|
|
||||||
android:text="@string/settingsLanguageHeaderText"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="18sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/languagesHintText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:paddingEnd="12dp"
|
|
||||||
android:text="@string/languagesHintText"
|
|
||||||
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
|
|
||||||
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"
|
||||||
|
@ -7,13 +7,13 @@
|
|||||||
android:icon="@drawable/ic_branch"
|
android:icon="@drawable/ic_branch"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/strSwitchBranches"
|
android:title="@string/strSwitchBranches"
|
||||||
app:showAsAction="ifRoom|withText" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/branchCommits"
|
android:id="@+id/branchCommits"
|
||||||
android:icon="@drawable/ic_commit"
|
android:icon="@drawable/ic_commit"
|
||||||
android:orderInCategory="2"
|
android:orderInCategory="2"
|
||||||
android:title="@string/commitTitle"
|
android:title="@string/commitTitle"
|
||||||
app:showAsAction="ifRoom|withText" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
23
app/src/main/res/values/code_editor_colors.xml
Normal file
23
app/src/main/res/values/code_editor_colors.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- five o clock colors -->
|
||||||
|
<color name="five_dark_black">#252526</color>
|
||||||
|
<color name="five_dark_blue">#267ae9</color>
|
||||||
|
<color name="five_dark_yellow">#fde92f</color>
|
||||||
|
<color name="five_dark_purple">#eb84f3</color>
|
||||||
|
<color name="five_dark_grey">#a9b1ae</color>
|
||||||
|
<color name="five_dark_white">#ffffff</color>
|
||||||
|
<color name="gold">#e6b121</color>
|
||||||
|
<color name="five_yellow">#fdc92f</color>
|
||||||
|
<color name="five_background_grey">#f5f2f0</color>
|
||||||
|
|
||||||
|
<!-- blue moon colors -->
|
||||||
|
<color name="moon_dark_black">#252526</color>
|
||||||
|
<color name="moon_dark_blue">#1E90FF</color>
|
||||||
|
<color name="moon_dark_aquamarine">#7FFFD4</color>
|
||||||
|
<color name="moon_dark_turquoise">#40E0D0</color>
|
||||||
|
<color name="moon_dark_grey">#B0C4DE</color>
|
||||||
|
<color name="moon_dark_white">#ffffff</color>
|
||||||
|
<color name="moon_deep_sky_blue">#00BFFF</color>
|
||||||
|
<color name="moon_background_grey">#f5f2f0</color>
|
||||||
|
</resources>
|
@ -65,15 +65,4 @@
|
|||||||
<color name="pitchBlackThemeGeneralBackgroundColor">#151515</color>
|
<color name="pitchBlackThemeGeneralBackgroundColor">#151515</color>
|
||||||
<color name="pitchBlackThemeColorSecondary">#161918</color>
|
<color name="pitchBlackThemeColorSecondary">#161918</color>
|
||||||
<color name="pitchBlackThemeCardBackground">#0C0C0C</color>
|
<color name="pitchBlackThemeCardBackground">#0C0C0C</color>
|
||||||
|
|
||||||
<!-- code editor colors -->
|
|
||||||
<color name="five_dark_black">#252526</color>
|
|
||||||
<color name="five_dark_blue">#267ae9</color>
|
|
||||||
<color name="five_dark_yellow">#fde92f</color>
|
|
||||||
<color name="five_dark_purple">#eb84f3</color>
|
|
||||||
<color name="five_dark_grey">#a9b1ae</color>
|
|
||||||
<color name="five_dark_white">#ffffff</color>
|
|
||||||
<color name="gold">#e6b121</color>
|
|
||||||
<color name="five_yellow">#fdc92f</color>
|
|
||||||
<color name="five_background_grey">#f5f2f0</color>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="versionLow" translatable="false">1.17</string>
|
<string name="versionLow" translatable="false">1.18</string>
|
||||||
<string name="versionHigh" translatable="false">1.19</string>
|
<string name="versionHigh" translatable="false">1.20</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<item>Roboto</item>
|
<item>Roboto</item>
|
||||||
<item>Manrope</item>
|
<item>Manrope</item>
|
||||||
<item>Source Code Pro</item>
|
<item>Source Code Pro</item>
|
||||||
|
<item>@string/system_font</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="themes">
|
<string-array name="themes">
|
||||||
@ -90,4 +91,21 @@
|
|||||||
<item>500 MB</item>
|
<item>500 MB</item>
|
||||||
<item>1 GB</item>
|
<item>1 GB</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="ceColors">
|
||||||
|
<item>Five O Clock</item>
|
||||||
|
<item>Blue Moon</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="ceIndentation">
|
||||||
|
<item>Tabs</item>
|
||||||
|
<item>Spaces</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="ceIndentationTabsWidth">
|
||||||
|
<item>2</item>
|
||||||
|
<item>4</item>
|
||||||
|
<item>6</item>
|
||||||
|
<item>8</item>
|
||||||
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<string name="commitPage" translatable="false">Your Instance Version</string>
|
<string name="commitPage" translatable="false">Your Instance Version</string>
|
||||||
<string name="supportLinkPatreon" translatable="false">https://www.patreon.com/mmarif</string>
|
<string name="supportLinkPatreon" translatable="false">https://www.patreon.com/mmarif</string>
|
||||||
<string name="supportLinkBuyMeaCoffee" translatable="false">https://www.buymeacoffee.com/mmarif</string>
|
<string name="supportLinkBuyMeaCoffee" translatable="false">https://www.buymeacoffee.com/mmarif</string>
|
||||||
|
<string name="feedbackLink" translatable="false">https://cloud.swatian.com/apps/forms/s/xe7KekTNKgrj58EK6WHQyJDf</string>
|
||||||
<string name="appVersionBuild" translatable="false">%s / %d</string>
|
<string name="appVersionBuild" translatable="false">%s / %d</string>
|
||||||
<string name="appDesc" translatable="false">GitNex is a free, open-source Android client for Git repository management tools Forgejo and Gitea. GitNex is Licensed under GPLv3.\n\nThanks to all the contributors and donators for your generous work and donations.</string>
|
<string name="appDesc" translatable="false">GitNex is a free, open-source Android client for Git repository management tools Forgejo and Gitea. GitNex is Licensed under GPLv3.\n\nThanks to all the contributors and donators for your generous work and donations.</string>
|
||||||
<string name="crowdInLink" translatable="false">https://crowdin.com/project/gitnex</string>
|
<string name="crowdInLink" translatable="false">https://crowdin.com/project/gitnex</string>
|
||||||
@ -17,7 +18,8 @@
|
|||||||
<string name="supportText" translatable="false">Support</string>
|
<string name="supportText" translatable="false">Support</string>
|
||||||
|
|
||||||
<string name="supportTextPatreon" translatable="false">Patreon</string>
|
<string name="supportTextPatreon" translatable="false">Patreon</string>
|
||||||
<string name="supportTextBuyMeaCoffee" translatable="false">Buy Me a Coffee</string>
|
<string name="supportTextBuyMeaCoffee" translatable="false">BMC</string>
|
||||||
|
<string name="feedbackText" translatable="false">Feedback</string>
|
||||||
|
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<string name="navMyRepos">My Repositories</string>
|
<string name="navMyRepos">My Repositories</string>
|
||||||
@ -87,6 +89,7 @@
|
|||||||
<string name="emptyFieldUsername">Username is required</string>
|
<string name="emptyFieldUsername">Username is required</string>
|
||||||
<string name="emptyFieldPassword">Password is required</string>
|
<string name="emptyFieldPassword">Password is required</string>
|
||||||
<string name="protocolEmptyError">Protocol is required</string>
|
<string name="protocolEmptyError">Protocol is required</string>
|
||||||
|
<string name="instanceHelperText">Enter URL without http or https. Example: codeberg.org</string>
|
||||||
|
|
||||||
<string name="checkNetConnection">Cannot access network, please check your Internet connection</string>
|
<string name="checkNetConnection">Cannot access network, please check your Internet connection</string>
|
||||||
|
|
||||||
@ -240,7 +243,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>
|
||||||
@ -248,6 +251,10 @@
|
|||||||
<string name="settingsBiometricHeader">Biometric Support</string>
|
<string name="settingsBiometricHeader">Biometric Support</string>
|
||||||
<string name="settingsLabelsInListHeader">Labels With Text Support</string>
|
<string name="settingsLabelsInListHeader">Labels With Text Support</string>
|
||||||
<string name="settingsLabelsInListHint">Enabling this will show labels with text in issues and pr lists, default are color dots</string>
|
<string name="settingsLabelsInListHint">Enabling this will show labels with text in issues and pr lists, default are color dots</string>
|
||||||
|
<string name="ceSyntaxHighlightColor">Syntax Highlighting Color</string>
|
||||||
|
<string name="ceIndentation">Indentation</string>
|
||||||
|
<string name="ceIndentationTabsWidth">Tabs Width</string>
|
||||||
|
<string name="system_font">System Default Font</string>
|
||||||
<!-- settings -->
|
<!-- settings -->
|
||||||
|
|
||||||
<string name="noMoreData">No more data available</string>
|
<string name="noMoreData">No more data available</string>
|
||||||
@ -620,12 +627,13 @@
|
|||||||
<string name="resetCounterDialogMessage">Do you want to reset counter for repository %s?</string>
|
<string name="resetCounterDialogMessage">Do you want to reset counter for repository %s?</string>
|
||||||
<string name="resetCounterAllDialogMessage">This will reset all the counters for this account repositories.</string>
|
<string name="resetCounterAllDialogMessage">This will reset all the counters for this account repositories.</string>
|
||||||
|
|
||||||
<string name="appearanceHintText">Themes, fonts, badges</string>
|
<string name="appearanceHintText">Themes, fonts, badges, translation</string>
|
||||||
<string name="securityHintText">Biometric authentication, SSL certificates, cache</string>
|
<string name="securityHintText">Biometric authentication, SSL certificates, cache</string>
|
||||||
<string name="languagesHintText">Languages</string>
|
<string name="languagesHintText">Languages</string>
|
||||||
<string name="reportsHintText">Crash reports</string>
|
<string name="reportsHintText">Crash reports</string>
|
||||||
<string name="rateAppHintText">If you like GitNex you can give it a thumbs up</string>
|
<string name="rateAppHintText">If you like GitNex you can give it a thumbs up</string>
|
||||||
<string name="aboutAppHintText">App version, build, user instance version</string>
|
<string name="aboutAppHintText">App version, build, user instance version</string>
|
||||||
|
<string name="codeEditorHintText">Syntax color, indentation</string>
|
||||||
|
|
||||||
<string name="archivedRepository">Archived</string>
|
<string name="archivedRepository">Archived</string>
|
||||||
<string name="archivedRepositoryMessage">This repo is archived. You can view files, but cannot push or open issues/pull-requests.</string>
|
<string name="archivedRepositoryMessage">This repo is archived. You can view files, but cannot push or open issues/pull-requests.</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user