Implement multi-session notification polling and additional improvements/refactors/cleanups/fixes (#875)
Merge branch 'master' of https://codeberg.org/gitnex/GitNex into notifications-performance-improvements Conflicts: app/src/main/java/org/mian/gitnex/adapters/DraftsAdapter.java app/src/main/java/org/mian/gitnex/adapters/NotificationsAdapter.java app/src/main/java/org/mian/gitnex/adapters/UserAccountsAdapter.java app/src/main/java/org/mian/gitnex/adapters/UserAccountsNavAdapter.java app/src/main/res/layout/bottom_sheet_repository_in_list.xml app/src/main/res/layout/list_files.xml Merge branch 'master' into notifications-performance-improvements Merge branch 'master' into notifications-performance-improvements Merge branch 'master' of https://codeberg.org/gitnex/GitNex into notifications-performance-improvements Conflicts: app/src/main/res/values-it/strings.xml Add ripple effect to buttons. Run syntax highlighting on separate thread. (#859) Initial commit. Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/875 Reviewed-by: M M Arif <mmarif@noreply.codeberg.org> Co-Authored-By: opyale <opyale@noreply.codeberg.org> Co-Committed-By: opyale <opyale@noreply.codeberg.org>
This commit is contained in:
parent
9d3cd49d23
commit
d72f097012
@ -12,6 +12,7 @@ import org.gitnex.tea4j.models.GiteaVersion;
|
|||||||
import org.gitnex.tea4j.models.UserInfo;
|
import org.gitnex.tea4j.models.UserInfo;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.UserAccountsApi;
|
import org.mian.gitnex.database.api.UserAccountsApi;
|
||||||
import org.mian.gitnex.databinding.ActivityAddNewAccountBinding;
|
import org.mian.gitnex.databinding.ActivityAddNewAccountBinding;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -114,9 +115,7 @@ public class AddNewAccountActivity extends BaseActivity {
|
|||||||
private void versionCheck(final String instanceUrl, final String loginToken) {
|
private void versionCheck(final String instanceUrl, final String loginToken) {
|
||||||
|
|
||||||
Call<GiteaVersion> callVersion;
|
Call<GiteaVersion> callVersion;
|
||||||
|
|
||||||
callVersion = RetrofitClient.getApiInterface(ctx).getGiteaVersionWithToken("token " + loginToken);
|
callVersion = RetrofitClient.getApiInterface(ctx).getGiteaVersionWithToken("token " + loginToken);
|
||||||
|
|
||||||
callVersion.enqueue(new Callback<GiteaVersion>() {
|
callVersion.enqueue(new Callback<GiteaVersion>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -205,14 +204,15 @@ public class AddNewAccountActivity extends BaseActivity {
|
|||||||
assert userDetails != null;
|
assert userDetails != null;
|
||||||
// insert new account to db if does not exist
|
// insert new account to db if does not exist
|
||||||
String accountName = userDetails.getUsername() + "@" + instanceUrl;
|
String accountName = userDetails.getUsername() + "@" + instanceUrl;
|
||||||
UserAccountsApi userAccountsApi = new UserAccountsApi(ctx);
|
UserAccountsApi userAccountsApi = BaseApi.getInstance(ctx, UserAccountsApi.class);
|
||||||
int checkAccount = userAccountsApi.getCount(accountName);
|
boolean userAccountExists = userAccountsApi.userAccountExists(accountName);
|
||||||
|
|
||||||
if(checkAccount == 0) {
|
if(!userAccountExists) {
|
||||||
|
|
||||||
userAccountsApi.insertNewAccount(accountName, instanceUrl, userDetails.getUsername(), loginToken, "");
|
userAccountsApi.createNewAccount(accountName, instanceUrl, userDetails.getUsername(), loginToken, "");
|
||||||
Toasty.success(ctx, getResources().getString(R.string.accountAddedMessage));
|
Toasty.success(ctx, getResources().getString(R.string.accountAddedMessage));
|
||||||
finish();
|
finish();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
@ -13,11 +13,13 @@ import org.gitnex.tea4j.models.PullRequests;
|
|||||||
import org.gitnex.tea4j.models.UserRepositories;
|
import org.gitnex.tea4j.models.UserRepositories;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.api.UserAccountsApi;
|
import org.mian.gitnex.database.api.UserAccountsApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.database.models.UserAccount;
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import org.mian.gitnex.databinding.ActivityDeeplinksBinding;
|
import org.mian.gitnex.databinding.ActivityDeeplinksBinding;
|
||||||
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
import org.mian.gitnex.helpers.UrlHelper;
|
import org.mian.gitnex.helpers.UrlHelper;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -65,7 +67,7 @@ public class DeepLinksActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for the links(URI) to be in the db
|
// check for the links(URI) to be in the db
|
||||||
UserAccountsApi userAccountsApi = new UserAccountsApi(ctx);
|
UserAccountsApi userAccountsApi = BaseApi.getInstance(ctx, UserAccountsApi.class);
|
||||||
List<UserAccount> userAccounts = userAccountsApi.usersAccounts();
|
List<UserAccount> userAccounts = userAccountsApi.usersAccounts();
|
||||||
|
|
||||||
for(UserAccount userAccount : userAccounts) {
|
for(UserAccount userAccount : userAccounts) {
|
||||||
@ -79,13 +81,9 @@ public class DeepLinksActivity extends BaseActivity {
|
|||||||
|
|
||||||
accountFound = true;
|
accountFound = true;
|
||||||
|
|
||||||
tinyDB.putString("loginUid", userAccount.getUserName());
|
AppUtil.switchToAccount(ctx, userAccount);
|
||||||
tinyDB.putString("userLogin", userAccount.getUserName());
|
|
||||||
tinyDB.putString(userAccount.getUserName() + "-token", userAccount.getToken());
|
|
||||||
tinyDB.putString("instanceUrl", userAccount.getInstanceUrl());
|
|
||||||
tinyDB.putInt("currentActiveAccountId", userAccount.getAccountId());
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +110,7 @@ public class DeepLinksActivity extends BaseActivity {
|
|||||||
final String repoName = restOfUrl[restOfUrl.length - 3];
|
final String repoName = restOfUrl[restOfUrl.length - 3];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDB.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDB.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(ctx);
|
RepositoriesApi repositoryData = BaseApi.getInstance(ctx, RepositoriesApi.class);
|
||||||
|
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
|
||||||
@ -344,7 +342,7 @@ public class DeepLinksActivity extends BaseActivity {
|
|||||||
tinyDB.putString("repoFullName", repoOwner + "/" + repoName);
|
tinyDB.putString("repoFullName", repoOwner + "/" + repoName);
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDB.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDB.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(ctx);
|
RepositoriesApi repositoryData = BaseApi.getInstance(ctx, RepositoriesApi.class);
|
||||||
|
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
|
||||||
@ -415,7 +413,7 @@ public class DeepLinksActivity extends BaseActivity {
|
|||||||
tinyDB.putString("repoBranch", repoInfo.getDefault_branch());
|
tinyDB.putString("repoBranch", repoInfo.getDefault_branch());
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDB.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDB.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(ctx);
|
RepositoriesApi repositoryData = BaseApi.getInstance(ctx, RepositoriesApi.class);
|
||||||
|
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ import org.gitnex.tea4j.models.UserInfo;
|
|||||||
import org.gitnex.tea4j.models.UserTokens;
|
import org.gitnex.tea4j.models.UserTokens;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.UserAccountsApi;
|
import org.mian.gitnex.database.api.UserAccountsApi;
|
||||||
import org.mian.gitnex.database.models.UserAccount;
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import org.mian.gitnex.databinding.ActivityLoginBinding;
|
import org.mian.gitnex.databinding.ActivityLoginBinding;
|
||||||
@ -358,19 +359,19 @@ public class LoginActivity extends BaseActivity {
|
|||||||
|
|
||||||
// insert new account to db if does not exist
|
// insert new account to db if does not exist
|
||||||
String accountName = userDetails.getUsername() + "@" + TinyDB.getInstance(ctx).getString("instanceUrl");
|
String accountName = userDetails.getUsername() + "@" + TinyDB.getInstance(ctx).getString("instanceUrl");
|
||||||
UserAccountsApi userAccountsApi = new UserAccountsApi(ctx);
|
UserAccountsApi userAccountsApi = BaseApi.getInstance(ctx, UserAccountsApi.class);
|
||||||
int checkAccount = userAccountsApi.getCount(accountName);
|
boolean userAccountExists = userAccountsApi.userAccountExists(accountName);
|
||||||
long accountId;
|
long accountId;
|
||||||
|
|
||||||
if(checkAccount == 0) {
|
if(!userAccountExists) {
|
||||||
|
|
||||||
accountId = userAccountsApi.insertNewAccount(accountName, TinyDB.getInstance(ctx).getString("instanceUrl"), userDetails.getUsername(), loginToken, "");
|
accountId = userAccountsApi.createNewAccount(accountName, TinyDB.getInstance(ctx).getString("instanceUrl"), userDetails.getUsername(), loginToken, "");
|
||||||
tinyDB.putInt("currentActiveAccountId", (int) accountId);
|
tinyDB.putInt("currentActiveAccountId", (int) accountId);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
userAccountsApi.updateTokenByAccountName(accountName, loginToken);
|
userAccountsApi.updateTokenByAccountName(accountName, loginToken);
|
||||||
UserAccount data = userAccountsApi.getAccountData(accountName);
|
UserAccount data = userAccountsApi.getAccountByName(accountName);
|
||||||
tinyDB.putInt("currentActiveAccountId", data.getAccountId());
|
tinyDB.putInt("currentActiveAccountId", data.getAccountId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -546,20 +547,20 @@ public class LoginActivity extends BaseActivity {
|
|||||||
|
|
||||||
// insert new account to db if does not exist
|
// insert new account to db if does not exist
|
||||||
String accountName = userDetails.getUsername() + "@" + TinyDB.getInstance(ctx).getString("instanceUrl");
|
String accountName = userDetails.getUsername() + "@" + TinyDB.getInstance(ctx).getString("instanceUrl");
|
||||||
UserAccountsApi userAccountsApi = new UserAccountsApi(ctx);
|
UserAccountsApi userAccountsApi = BaseApi.getInstance(ctx, UserAccountsApi.class);
|
||||||
int checkAccount = userAccountsApi.getCount(accountName);
|
boolean userAccountExists = userAccountsApi.userAccountExists(accountName);
|
||||||
long accountId;
|
long accountId;
|
||||||
|
|
||||||
if(checkAccount == 0) {
|
if(!userAccountExists) {
|
||||||
|
|
||||||
accountId = userAccountsApi
|
accountId = userAccountsApi
|
||||||
.insertNewAccount(accountName, TinyDB.getInstance(ctx).getString("instanceUrl"), userDetails.getUsername(), newToken.getSha1(), "");
|
.createNewAccount(accountName, TinyDB.getInstance(ctx).getString("instanceUrl"), userDetails.getUsername(), newToken.getSha1(), "");
|
||||||
tinyDB.putInt("currentActiveAccountId", (int) accountId);
|
tinyDB.putInt("currentActiveAccountId", (int) accountId);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
userAccountsApi.updateTokenByAccountName(accountName, newToken.getSha1());
|
userAccountsApi.updateTokenByAccountName(accountName, newToken.getSha1());
|
||||||
UserAccount data = userAccountsApi.getAccountData(accountName);
|
UserAccount data = userAccountsApi.getAccountByName(accountName);
|
||||||
tinyDB.putInt("currentActiveAccountId", data.getAccountId());
|
tinyDB.putInt("currentActiveAccountId", data.getAccountId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ import androidx.appcompat.widget.Toolbar;
|
|||||||
import androidx.biometric.BiometricPrompt;
|
import androidx.biometric.BiometricPrompt;
|
||||||
import androidx.cardview.widget.CardView;
|
import androidx.cardview.widget.CardView;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.content.res.ResourcesCompat;
|
|
||||||
import androidx.core.view.GravityCompat;
|
import androidx.core.view.GravityCompat;
|
||||||
import androidx.drawerlayout.widget.DrawerLayout;
|
import androidx.drawerlayout.widget.DrawerLayout;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
@ -34,6 +33,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.adapters.UserAccountsNavAdapter;
|
import org.mian.gitnex.adapters.UserAccountsNavAdapter;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.UserAccountsApi;
|
import org.mian.gitnex.database.api.UserAccountsApi;
|
||||||
import org.mian.gitnex.database.models.UserAccount;
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import org.mian.gitnex.databinding.ActivityMainBinding;
|
import org.mian.gitnex.databinding.ActivityMainBinding;
|
||||||
@ -90,38 +90,25 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
ActivityMainBinding activityMainBinding = ActivityMainBinding.inflate(getLayoutInflater());
|
ActivityMainBinding activityMainBinding = ActivityMainBinding.inflate(getLayoutInflater());
|
||||||
setContentView(activityMainBinding.getRoot());
|
setContentView(activityMainBinding.getRoot());
|
||||||
|
|
||||||
tinyDB.putBoolean("noConnection", false);
|
|
||||||
|
|
||||||
String currentVersion = tinyDB.getString("giteaVersion");
|
|
||||||
|
|
||||||
Intent mainIntent = getIntent();
|
Intent mainIntent = getIntent();
|
||||||
String launchFragment = mainIntent.getStringExtra("launchFragment");
|
|
||||||
|
// DO NOT MOVE
|
||||||
|
if(mainIntent.hasExtra("switchAccountId") &&
|
||||||
|
AppUtil.switchToAccount(ctx, BaseApi.getInstance(ctx, UserAccountsApi.class)
|
||||||
|
.getAccountById(mainIntent.getIntExtra("switchAccountId", 0)))) {
|
||||||
|
|
||||||
|
mainIntent.removeExtra("switchAccountId");
|
||||||
|
recreate();
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
// DO NOT MOVE
|
||||||
|
|
||||||
|
tinyDB.putBoolean("noConnection", false);
|
||||||
|
|
||||||
loginUid = tinyDB.getString("loginUid");
|
loginUid = tinyDB.getString("loginUid");
|
||||||
instanceToken = "token " + tinyDB.getString(loginUid + "-token");
|
instanceToken = "token " + tinyDB.getString(loginUid + "-token");
|
||||||
|
|
||||||
if(tinyDB.getString("dateFormat").isEmpty()) {
|
|
||||||
|
|
||||||
tinyDB.putString("dateFormat", "pretty");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tinyDB.getString("codeBlockStr").isEmpty()) {
|
|
||||||
|
|
||||||
tinyDB.putInt("codeBlockColor", ResourcesCompat.getColor(getResources(), R.color.colorLightGreen, null));
|
|
||||||
tinyDB.putInt("codeBlockBackground", ResourcesCompat.getColor(getResources(), R.color.black, null));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tinyDB.getString("enableCounterIssueBadgeInit").isEmpty()) {
|
|
||||||
|
|
||||||
tinyDB.putBoolean("enableCounterIssueBadge", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tinyDB.getString("homeScreenStr").isEmpty()) {
|
|
||||||
|
|
||||||
tinyDB.putString("homeScreenStr", "yes");
|
|
||||||
tinyDB.putInt("homeScreenId", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
||||||
|
|
||||||
if(!tinyDB.getBoolean("loggedInMode")) {
|
if(!tinyDB.getBoolean("loggedInMode")) {
|
||||||
@ -130,9 +117,10 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tinyDB.getInt("currentActiveAccountId") <= 0) {
|
if(tinyDB.getInt("currentActiveAccountId", -1) <= 0) {
|
||||||
|
AlertDialogs.forceLogoutDialog(ctx,
|
||||||
AlertDialogs.forceLogoutDialog(ctx, getResources().getString(R.string.forceLogoutDialogHeader), getResources().getString(R.string.forceLogoutDialogDescription), getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
getResources().getString(R.string.forceLogoutDialogHeader),
|
||||||
|
getResources().getString(R.string.forceLogoutDialogDescription), getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
||||||
}
|
}
|
||||||
|
|
||||||
Toolbar toolbar = activityMainBinding.toolbar;
|
Toolbar toolbar = activityMainBinding.toolbar;
|
||||||
@ -141,17 +129,17 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
switch(tinyDB.getInt("customFontId", -1)) {
|
switch(tinyDB.getInt("customFontId", -1)) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
|
|
||||||
myTypeface = Typeface.createFromAsset(getAssets(), "fonts/roboto.ttf");
|
myTypeface = Typeface.createFromAsset(getAssets(), "fonts/roboto.ttf");
|
||||||
break;
|
break;
|
||||||
case 2:
|
|
||||||
|
|
||||||
|
case 2:
|
||||||
myTypeface = Typeface.createFromAsset(getAssets(), "fonts/sourcecodeproregular.ttf");
|
myTypeface = Typeface.createFromAsset(getAssets(), "fonts/sourcecodeproregular.ttf");
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
|
|
||||||
|
default:
|
||||||
myTypeface = Typeface.createFromAsset(getAssets(), "fonts/manroperegular.ttf");
|
myTypeface = Typeface.createFromAsset(getAssets(), "fonts/manroperegular.ttf");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// biometric auth
|
// biometric auth
|
||||||
@ -198,43 +186,33 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
Fragment fragmentById = fm.findFragmentById(R.id.fragment_container);
|
Fragment fragmentById = fm.findFragmentById(R.id.fragment_container);
|
||||||
|
|
||||||
if(fragmentById instanceof SettingsFragment) {
|
if(fragmentById instanceof SettingsFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleSettings));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleSettings));
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof MyRepositoriesFragment) {
|
else if(fragmentById instanceof MyRepositoriesFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleMyRepos));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleMyRepos));
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof StarredRepositoriesFragment) {
|
else if(fragmentById instanceof StarredRepositoriesFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleStarredRepos));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleStarredRepos));
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof OrganizationsFragment) {
|
else if(fragmentById instanceof OrganizationsFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleOrganizations));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleOrganizations));
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof ExploreFragment) {
|
else if(fragmentById instanceof ExploreFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleExplore));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleExplore));
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof NotificationsFragment) {
|
else if(fragmentById instanceof NotificationsFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(R.string.pageTitleNotifications);
|
toolbarTitle.setText(R.string.pageTitleNotifications);
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof ProfileFragment) {
|
else if(fragmentById instanceof ProfileFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleProfile));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleProfile));
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof DraftsFragment) {
|
else if(fragmentById instanceof DraftsFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.titleDrafts));
|
toolbarTitle.setText(getResources().getString(R.string.titleDrafts));
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof AdministrationFragment) {
|
else if(fragmentById instanceof AdministrationFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleAdministration));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleAdministration));
|
||||||
}
|
}
|
||||||
else if(fragmentById instanceof UserAccountsFragment) {
|
else if(fragmentById instanceof UserAccountsFragment) {
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleUserAccounts));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleUserAccounts));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,7 +253,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
|
|
||||||
List<UserAccount> userAccountsList = new ArrayList<>();
|
List<UserAccount> userAccountsList = new ArrayList<>();
|
||||||
UserAccountsApi userAccountsApi;
|
UserAccountsApi userAccountsApi;
|
||||||
userAccountsApi = new UserAccountsApi(ctx);
|
userAccountsApi = BaseApi.getInstance(ctx, UserAccountsApi.class);
|
||||||
|
|
||||||
RecyclerView navRecyclerViewUserAccounts = hView.findViewById(R.id.userAccounts);
|
RecyclerView navRecyclerViewUserAccounts = hView.findViewById(R.id.userAccounts);
|
||||||
UserAccountsNavAdapter adapterUserAccounts;
|
UserAccountsNavAdapter adapterUserAccounts;
|
||||||
@ -294,12 +272,10 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
userFullName.setTypeface(myTypeface);
|
userFullName.setTypeface(myTypeface);
|
||||||
|
|
||||||
if(!userEmailNav.equals("")) {
|
if(!userEmailNav.equals("")) {
|
||||||
|
|
||||||
userEmail.setText(userEmailNav);
|
userEmail.setText(userEmailNav);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!userFullNameNav.equals("")) {
|
if(!userFullNameNav.equals("")) {
|
||||||
|
|
||||||
userFullName.setText(Html.fromHtml(userFullNameNav));
|
userFullName.setText(Html.fromHtml(userFullNameNav));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,7 +323,8 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
public void onDrawerSlide(@NonNull View drawerView, float slideOffset) {
|
public void onDrawerSlide(@NonNull View drawerView, float slideOffset) {
|
||||||
|
|
||||||
navigationView.getMenu().findItem(R.id.nav_administration).setVisible(tinyDB.getBoolean("userIsAdmin"));
|
navigationView.getMenu().findItem(R.id.nav_administration).setVisible(tinyDB.getBoolean("userIsAdmin"));
|
||||||
navigationView.getMenu().findItem(R.id.nav_notifications).setVisible(new Version(currentVersion).higherOrEqual("1.12.3"));
|
navigationView.getMenu().findItem(R.id.nav_notifications).setVisible(new Version(tinyDB.getString("giteaVersion")).higherOrEqual("1.12.3"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -361,6 +338,8 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
toggle.syncState();
|
toggle.syncState();
|
||||||
toolbar.setNavigationIcon(R.drawable.ic_menu);
|
toolbar.setNavigationIcon(R.drawable.ic_menu);
|
||||||
|
|
||||||
|
String launchFragment = mainIntent.getStringExtra("launchFragment");
|
||||||
|
|
||||||
if(launchFragment != null) {
|
if(launchFragment != null) {
|
||||||
|
|
||||||
mainIntent.removeExtra("launchFragment");
|
mainIntent.removeExtra("launchFragment");
|
||||||
@ -368,13 +347,12 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
switch(launchFragment) {
|
switch(launchFragment) {
|
||||||
|
|
||||||
case "drafts":
|
case "drafts":
|
||||||
|
|
||||||
toolbarTitle.setText(getResources().getString(R.string.titleDrafts));
|
toolbarTitle.setText(getResources().getString(R.string.titleDrafts));
|
||||||
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new DraftsFragment()).commit();
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new DraftsFragment()).commit();
|
||||||
navigationView.setCheckedItem(R.id.nav_comments_draft);
|
navigationView.setCheckedItem(R.id.nav_comments_draft);
|
||||||
return;
|
return;
|
||||||
case "notifications":
|
|
||||||
|
|
||||||
|
case "notifications":
|
||||||
toolbarTitle.setText(getResources().getString(R.string.pageTitleNotifications));
|
toolbarTitle.setText(getResources().getString(R.string.pageTitleNotifications));
|
||||||
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new NotificationsFragment()).commit();
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new NotificationsFragment()).commit();
|
||||||
navigationView.setCheckedItem(R.id.nav_notifications);
|
navigationView.setCheckedItem(R.id.nav_notifications);
|
||||||
@ -415,9 +393,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
if(savedInstanceState == null) {
|
if(savedInstanceState == null) {
|
||||||
|
|
||||||
if(!new Version(tinyDB.getString("giteaVersion")).higherOrEqual("1.12.3")) {
|
if(!new Version(tinyDB.getString("giteaVersion")).higherOrEqual("1.12.3")) {
|
||||||
|
|
||||||
if(tinyDB.getInt("homeScreenId") == 7) {
|
if(tinyDB.getInt("homeScreenId") == 7) {
|
||||||
|
|
||||||
tinyDB.putInt("homeScreenId", 0);
|
tinyDB.putInt("homeScreenId", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -658,29 +634,22 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
|
|
||||||
private void giteaVersion() {
|
private void giteaVersion() {
|
||||||
|
|
||||||
final TinyDB tinyDb = TinyDB.getInstance(appCtx);
|
Call<GiteaVersion> callVersion = RetrofitClient.getApiInterface(ctx).getGiteaVersionWithToken(Authorization.get(ctx));
|
||||||
|
|
||||||
final String token = "token " + tinyDb.getString(tinyDb.getString("loginUid") + "-token");
|
|
||||||
|
|
||||||
Call<GiteaVersion> callVersion = RetrofitClient.getApiInterface(ctx).getGiteaVersionWithToken(token);
|
|
||||||
|
|
||||||
callVersion.enqueue(new Callback<GiteaVersion>() {
|
callVersion.enqueue(new Callback<GiteaVersion>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull final Call<GiteaVersion> callVersion, @NonNull retrofit2.Response<GiteaVersion> responseVersion) {
|
public void onResponse(@NonNull final Call<GiteaVersion> callVersion, @NonNull retrofit2.Response<GiteaVersion> responseVersion) {
|
||||||
|
|
||||||
if(responseVersion.code() == 200) {
|
if(responseVersion.code() == 200 && responseVersion.body() != null) {
|
||||||
|
String version = responseVersion.body().getVersion();
|
||||||
|
|
||||||
GiteaVersion version = responseVersion.body();
|
tinyDB.putString("giteaVersion", version);
|
||||||
assert version != null;
|
BaseApi.getInstance(ctx, UserAccountsApi.class).updateServerVersion(version, tinyDB.getInt("currentActiveAccountId"));
|
||||||
|
|
||||||
tinyDb.putString("giteaVersion", version.getVersion());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<GiteaVersion> callVersion, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<GiteaVersion> callVersion, @NonNull Throwable t) {
|
||||||
|
|
||||||
Log.e("onFailure-version", t.toString());
|
Log.e("onFailure-version", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -14,6 +14,7 @@ import org.gitnex.tea4j.models.RepositoryTransfer;
|
|||||||
import org.gitnex.tea4j.models.UserRepositories;
|
import org.gitnex.tea4j.models.UserRepositories;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.databinding.ActivityRepositorySettingsBinding;
|
import org.mian.gitnex.databinding.ActivityRepositorySettingsBinding;
|
||||||
import org.mian.gitnex.databinding.CustomRepositoryDeleteDialogBinding;
|
import org.mian.gitnex.databinding.CustomRepositoryDeleteDialogBinding;
|
||||||
@ -139,7 +140,7 @@ public class RepositorySettingsActivity extends BaseActivity {
|
|||||||
Toasty.success(ctx, getString(R.string.repoTransferSuccess));
|
Toasty.success(ctx, getString(R.string.repoTransferSuccess));
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
RepositoriesApi.deleteRepository((int) tinyDB.getLong("repositoryId", 0));
|
BaseApi.getInstance(ctx, RepositoriesApi.class).deleteRepository((int) tinyDB.getLong("repositoryId", 0));
|
||||||
Intent intent = new Intent(RepositorySettingsActivity.this, MainActivity.class);
|
Intent intent = new Intent(RepositorySettingsActivity.this, MainActivity.class);
|
||||||
RepositorySettingsActivity.this.startActivity(intent);
|
RepositorySettingsActivity.this.startActivity(intent);
|
||||||
}
|
}
|
||||||
@ -220,7 +221,7 @@ public class RepositorySettingsActivity extends BaseActivity {
|
|||||||
Toasty.success(ctx, getString(R.string.repoDeletionSuccess));
|
Toasty.success(ctx, getString(R.string.repoDeletionSuccess));
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
RepositoriesApi.deleteRepository((int) tinyDB.getLong("repositoryId", 0));
|
BaseApi.getInstance(ctx, RepositoriesApi.class).deleteRepository((int) tinyDB.getLong("repositoryId", 0));
|
||||||
Intent intent = new Intent(RepositorySettingsActivity.this, MainActivity.class);
|
Intent intent = new Intent(RepositorySettingsActivity.this, MainActivity.class);
|
||||||
RepositorySettingsActivity.this.startActivity(intent);
|
RepositorySettingsActivity.this.startActivity(intent);
|
||||||
}
|
}
|
||||||
@ -383,7 +384,7 @@ public class RepositorySettingsActivity extends BaseActivity {
|
|||||||
if(!repositoryName.equals(repoName)) {
|
if(!repositoryName.equals(repoName)) {
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
RepositoriesApi.updateRepositoryOwnerAndName(repositoryOwner, repoName, (int) tinyDB.getLong("repositoryId", 0));
|
BaseApi.getInstance(ctx, RepositoriesApi.class).updateRepositoryOwnerAndName(repositoryOwner, repoName, (int) tinyDB.getLong("repositoryId", 0));
|
||||||
Intent intent = new Intent(RepositorySettingsActivity.this, MainActivity.class);
|
Intent intent = new Intent(RepositorySettingsActivity.this, MainActivity.class);
|
||||||
RepositorySettingsActivity.this.startActivity(intent);
|
RepositorySettingsActivity.this.startActivity(intent);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,13 @@ public class SettingsNotificationsActivity extends BaseActivity {
|
|||||||
viewBinding.enableNotificationsMode.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
viewBinding.enableNotificationsMode.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||||
|
|
||||||
tinyDB.putBoolean("notificationsEnabled", isChecked);
|
tinyDB.putBoolean("notificationsEnabled", isChecked);
|
||||||
if(!isChecked) Notifications.stopWorker(ctx);
|
|
||||||
|
if(isChecked) {
|
||||||
|
Notifications.startWorker(ctx);
|
||||||
|
} else {
|
||||||
|
Notifications.stopWorker(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
Toasty.info(appCtx, getResources().getString(R.string.settingsSave));
|
Toasty.info(appCtx, getResources().getString(R.string.settingsSave));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -17,6 +17,7 @@ import androidx.fragment.app.FragmentManager;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.IssueDetailActivity;
|
import org.mian.gitnex.activities.IssueDetailActivity;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.DraftsApi;
|
import org.mian.gitnex.database.api.DraftsApi;
|
||||||
import org.mian.gitnex.database.models.DraftWithRepository;
|
import org.mian.gitnex.database.models.DraftWithRepository;
|
||||||
import org.mian.gitnex.fragments.BottomSheetReplyFragment;
|
import org.mian.gitnex.fragments.BottomSheetReplyFragment;
|
||||||
@ -56,8 +57,10 @@ public class DraftsAdapter extends RecyclerView.Adapter<DraftsAdapter.DraftsView
|
|||||||
|
|
||||||
int getDraftId = draftWithRepository.getDraftId();
|
int getDraftId = draftWithRepository.getDraftId();
|
||||||
deleteDraft(getAdapterPosition());
|
deleteDraft(getAdapterPosition());
|
||||||
DraftsApi draftsApi = new DraftsApi(context);
|
|
||||||
|
DraftsApi draftsApi = BaseApi.getInstance(context, DraftsApi.class);
|
||||||
draftsApi.deleteSingleDraft(getDraftId);
|
draftsApi.deleteSingleDraft(getDraftId);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
itemView.setOnClickListener(itemEdit -> {
|
itemView.setOnClickListener(itemEdit -> {
|
||||||
|
@ -19,6 +19,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.activities.RepoDetailActivity;
|
import org.mian.gitnex.activities.RepoDetailActivity;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -98,7 +99,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(context);
|
RepositoriesApi repositoryData = BaseApi.getInstance(context, RepositoriesApi.class);
|
||||||
|
|
||||||
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
@ -21,6 +21,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.activities.RepoDetailActivity;
|
import org.mian.gitnex.activities.RepoDetailActivity;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -96,7 +97,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(context);
|
RepositoriesApi repositoryData = BaseApi.getInstance(context, RepositoriesApi.class);
|
||||||
|
|
||||||
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
@ -13,6 +13,7 @@ import androidx.core.text.HtmlCompat;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.gitnex.tea4j.models.NotificationThread;
|
import org.gitnex.tea4j.models.NotificationThread;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
@ -87,8 +88,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter<NotificationsAdap
|
|||||||
|
|
||||||
if(notificationThread.isPinned()) {
|
if(notificationThread.isPinned()) {
|
||||||
holder.pinned.setVisibility(View.VISIBLE);
|
holder.pinned.setVisibility(View.VISIBLE);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
holder.pinned.setVisibility(View.GONE);
|
holder.pinned.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,17 +123,14 @@ public class NotificationsAdapter extends RecyclerView.Adapter<NotificationsAdap
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(context);
|
RepositoriesApi repositoryData = BaseApi.getInstance(context, RepositoriesApi.class);
|
||||||
|
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
|
||||||
if(count == 0) {
|
if(count == 0) {
|
||||||
|
|
||||||
long id = repositoryData.insertRepository(currentActiveAccountId, repoOwner, repoName);
|
long id = repositoryData.insertRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
tinyDb.putLong("repositoryId", id);
|
tinyDb.putLong("repositoryId", id);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
|
|
||||||
Repository data = repositoryData.getRepository(currentActiveAccountId, repoOwner, repoName);
|
Repository data = repositoryData.getRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
tinyDb.putLong("repositoryId", data.getRepositoryId());
|
tinyDb.putLong("repositoryId", data.getRepositoryId());
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.activities.RepoDetailActivity;
|
import org.mian.gitnex.activities.RepoDetailActivity;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -220,7 +221,7 @@ public class RepoForksAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(context);
|
RepositoriesApi repositoryData = BaseApi.getInstance(context, RepositoriesApi.class);
|
||||||
|
|
||||||
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
@ -21,6 +21,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.activities.RepoDetailActivity;
|
import org.mian.gitnex.activities.RepoDetailActivity;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -96,7 +97,7 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(context);
|
RepositoriesApi repositoryData = BaseApi.getInstance(context, RepositoriesApi.class);
|
||||||
|
|
||||||
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
@ -21,6 +21,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.activities.RepoDetailActivity;
|
import org.mian.gitnex.activities.RepoDetailActivity;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -96,7 +97,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(context);
|
RepositoriesApi repositoryData = BaseApi.getInstance(context, RepositoriesApi.class);
|
||||||
|
|
||||||
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
@ -15,6 +15,7 @@ import org.gitnex.tea4j.models.Issues;
|
|||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.IssueDetailActivity;
|
import org.mian.gitnex.activities.IssueDetailActivity;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -80,7 +81,7 @@ public class SearchIssuesAdapter extends RecyclerView.Adapter<SearchIssuesAdapte
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(context);
|
RepositoriesApi repositoryData = BaseApi.getInstance(context, RepositoriesApi.class);
|
||||||
|
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.activities.RepoDetailActivity;
|
import org.mian.gitnex.activities.RepoDetailActivity;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.RepositoriesApi;
|
import org.mian.gitnex.database.api.RepositoriesApi;
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -96,7 +97,7 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
int currentActiveAccountId = tinyDb.getInt("currentActiveAccountId");
|
||||||
RepositoriesApi repositoryData = new RepositoriesApi(context);
|
RepositoriesApi repositoryData = BaseApi.getInstance(context, RepositoriesApi.class);
|
||||||
|
|
||||||
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
//RepositoriesRepository.deleteRepositoriesByAccount(currentActiveAccountId);
|
||||||
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
Integer count = repositoryData.checkRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
|
@ -14,6 +14,7 @@ import androidx.appcompat.content.res.AppCompatResources;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.UserAccountsApi;
|
import org.mian.gitnex.database.api.UserAccountsApi;
|
||||||
import org.mian.gitnex.database.models.UserAccount;
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
@ -63,7 +64,7 @@ public class UserAccountsAdapter extends RecyclerView.Adapter<UserAccountsAdapte
|
|||||||
.setPositiveButton(context.getResources().getString(R.string.removeButton), (dialog, which) -> {
|
.setPositiveButton(context.getResources().getString(R.string.removeButton), (dialog, which) -> {
|
||||||
|
|
||||||
updateLayoutByPosition(getAdapterPosition());
|
updateLayoutByPosition(getAdapterPosition());
|
||||||
UserAccountsApi userAccountsApi = new UserAccountsApi(context);
|
UserAccountsApi userAccountsApi = BaseApi.getInstance(context, UserAccountsApi.class);
|
||||||
userAccountsApi.deleteAccount(Integer.parseInt(String.valueOf(accountId)));
|
userAccountsApi.deleteAccount(Integer.parseInt(String.valueOf(accountId)));
|
||||||
}).setNeutralButton(context.getResources().getString(R.string.cancelButton), null)
|
}).setNeutralButton(context.getResources().getString(R.string.cancelButton), null)
|
||||||
.show();
|
.show();
|
||||||
@ -71,25 +72,19 @@ public class UserAccountsAdapter extends RecyclerView.Adapter<UserAccountsAdapte
|
|||||||
|
|
||||||
itemView.setOnClickListener(switchAccount -> {
|
itemView.setOnClickListener(switchAccount -> {
|
||||||
|
|
||||||
UserAccountsApi userAccountsApi = new UserAccountsApi(context);
|
UserAccountsApi userAccountsApi = BaseApi.getInstance(context, UserAccountsApi.class);
|
||||||
UserAccount userAccount = userAccountsApi.getAccountData(accountName);
|
UserAccount userAccount = userAccountsApi.getAccountByName(accountName);
|
||||||
|
|
||||||
if(tinyDB.getInt("currentActiveAccountId") != userAccount.getAccountId()) {
|
if(AppUtil.switchToAccount(context, userAccount)) {
|
||||||
|
|
||||||
String url = UrlBuilder.fromString(userAccount.getInstanceUrl())
|
String url = UrlBuilder.fromString(userAccount.getInstanceUrl())
|
||||||
.withPath("/")
|
.withPath("/")
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
tinyDB.putString("loginUid", userAccount.getUserName());
|
|
||||||
tinyDB.putString("userLogin", userAccount.getUserName());
|
|
||||||
tinyDB.putString(userAccount.getUserName() + "-token", userAccount.getToken());
|
|
||||||
tinyDB.putString("instanceUrl", userAccount.getInstanceUrl());
|
|
||||||
tinyDB.putInt("currentActiveAccountId", userAccount.getAccountId());
|
|
||||||
|
|
||||||
Toasty.success(context, context.getResources().getString(R.string.switchAccountSuccess, userAccount.getUserName(), url));
|
Toasty.success(context, context.getResources().getString(R.string.switchAccountSuccess, userAccount.getUserName(), url));
|
||||||
((Activity) context).recreate();
|
((Activity) context).recreate();
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -18,12 +18,10 @@ import androidx.drawerlayout.widget.DrawerLayout;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
import org.mian.gitnex.database.api.UserAccountsApi;
|
|
||||||
import org.mian.gitnex.database.models.UserAccount;
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import org.mian.gitnex.fragments.UserAccountsFragment;
|
import org.mian.gitnex.fragments.UserAccountsFragment;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
import org.mian.gitnex.helpers.RoundedTransformation;
|
import org.mian.gitnex.helpers.RoundedTransformation;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import io.mikael.urlbuilder.UrlBuilder;
|
import io.mikael.urlbuilder.UrlBuilder;
|
||||||
@ -103,7 +101,6 @@ public class UserAccountsNavAdapter extends RecyclerView.Adapter<UserAccountsNav
|
|||||||
|
|
||||||
private void customDialogUserAccountsList(List<UserAccount> allAccountsList) {
|
private void customDialogUserAccountsList(List<UserAccount> allAccountsList) {
|
||||||
|
|
||||||
TinyDB tinyDB = TinyDB.getInstance(context);
|
|
||||||
Dialog dialog = new Dialog(context, R.style.ThemeOverlay_MaterialComponents_Dialog_Alert);
|
Dialog dialog = new Dialog(context, R.style.ThemeOverlay_MaterialComponents_Dialog_Alert);
|
||||||
dialog.setContentView(R.layout.custom_user_accounts_dialog);
|
dialog.setContentView(R.layout.custom_user_accounts_dialog);
|
||||||
|
|
||||||
@ -120,6 +117,7 @@ public class UserAccountsNavAdapter extends RecyclerView.Adapter<UserAccountsNav
|
|||||||
AppCompatActivity activity = (AppCompatActivity) context;
|
AppCompatActivity activity = (AppCompatActivity) context;
|
||||||
activity.getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new UserAccountsFragment()).commit();
|
activity.getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new UserAccountsFragment()).commit();
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
UserAccountsListDialogAdapter arrayAdapter = new UserAccountsListDialogAdapter(context, R.layout.custom_user_accounts_list, allAccountsList);
|
UserAccountsListDialogAdapter arrayAdapter = new UserAccountsListDialogAdapter(context, R.layout.custom_user_accounts_list, allAccountsList);
|
||||||
@ -127,27 +125,21 @@ public class UserAccountsNavAdapter extends RecyclerView.Adapter<UserAccountsNav
|
|||||||
|
|
||||||
listView.setOnItemClickListener((adapterView, view, which, l) -> {
|
listView.setOnItemClickListener((adapterView, view, which, l) -> {
|
||||||
|
|
||||||
String accountNameSwitch = allAccountsList.get(which).getAccountName();
|
UserAccount userAccount = allAccountsList.get(which);
|
||||||
UserAccountsApi userAccountsApi = new UserAccountsApi(context);
|
|
||||||
UserAccount userAccount = userAccountsApi.getAccountData(accountNameSwitch);
|
|
||||||
|
|
||||||
if(tinyDB.getInt("currentActiveAccountId") != userAccount.getAccountId()) {
|
if(AppUtil.switchToAccount(context, userAccount)) {
|
||||||
|
|
||||||
String url = UrlBuilder.fromString(userAccount.getInstanceUrl())
|
String url = UrlBuilder.fromString(userAccount.getInstanceUrl())
|
||||||
.withPath("/")
|
.withPath("/")
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
tinyDB.putString("loginUid", userAccount.getUserName());
|
|
||||||
tinyDB.putString("userLogin", userAccount.getUserName());
|
|
||||||
tinyDB.putString(userAccount.getUserName() + "-token", userAccount.getToken());
|
|
||||||
tinyDB.putString("instanceUrl", userAccount.getInstanceUrl());
|
|
||||||
tinyDB.putInt("currentActiveAccountId", userAccount.getAccountId());
|
|
||||||
|
|
||||||
Toasty.success(context, context.getResources().getString(R.string.switchAccountSuccess, userAccount.getUserName(), url));
|
Toasty.success(context, context.getResources().getString(R.string.switchAccountSuccess, userAccount.getUserName(), url));
|
||||||
((Activity) context).recreate();
|
((Activity) context).recreate();
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package org.mian.gitnex.core;
|
|||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
import org.acra.ACRA;
|
import org.acra.ACRA;
|
||||||
import org.acra.BuildConfig;
|
import org.acra.BuildConfig;
|
||||||
import org.acra.ReportField;
|
import org.acra.ReportField;
|
||||||
@ -34,7 +35,6 @@ import org.mian.gitnex.notifications.Notifications;
|
|||||||
|
|
||||||
public class MainApplication extends Application {
|
public class MainApplication extends Application {
|
||||||
|
|
||||||
private Context appCtx;
|
|
||||||
private TinyDB tinyDB;
|
private TinyDB tinyDB;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -42,7 +42,7 @@ public class MainApplication extends Application {
|
|||||||
|
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
appCtx = getApplicationContext();
|
Context appCtx = getApplicationContext();
|
||||||
tinyDB = TinyDB.getInstance(appCtx);
|
tinyDB = TinyDB.getInstance(appCtx);
|
||||||
|
|
||||||
setDefaults();
|
setDefaults();
|
||||||
@ -76,6 +76,7 @@ public class MainApplication extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void attachBaseContext(Context context) {
|
protected void attachBaseContext(Context context) {
|
||||||
|
|
||||||
super.attachBaseContext(context);
|
super.attachBaseContext(context);
|
||||||
|
|
||||||
tinyDB = TinyDB.getInstance(context);
|
tinyDB = TinyDB.getInstance(context);
|
||||||
@ -97,46 +98,59 @@ public class MainApplication extends Application {
|
|||||||
|
|
||||||
// enabling counter badges by default
|
// enabling counter badges by default
|
||||||
if(tinyDB.getString("enableCounterBadgesInit").isEmpty()) {
|
if(tinyDB.getString("enableCounterBadgesInit").isEmpty()) {
|
||||||
|
|
||||||
tinyDB.putBoolean("enableCounterBadges", true);
|
tinyDB.putBoolean("enableCounterBadges", true);
|
||||||
tinyDB.putString("enableCounterBadgesInit", "yes");
|
tinyDB.putString("enableCounterBadgesInit", "yes");
|
||||||
}
|
}
|
||||||
|
|
||||||
// enable crash reports by default
|
// enable crash reports by default
|
||||||
if(tinyDB.getString("crashReportingEnabledInit").isEmpty()) {
|
if(tinyDB.getString("crashReportingEnabledInit").isEmpty()) {
|
||||||
|
|
||||||
tinyDB.putBoolean("crashReportingEnabled", true);
|
tinyDB.putBoolean("crashReportingEnabled", true);
|
||||||
tinyDB.putString("crashReportingEnabledInit", "yes");
|
tinyDB.putString("crashReportingEnabledInit", "yes");
|
||||||
}
|
}
|
||||||
|
|
||||||
// default cache setter
|
// default cache setter
|
||||||
if(tinyDB.getString("cacheSizeStr").isEmpty()) {
|
if(tinyDB.getString("cacheSizeStr").isEmpty()) {
|
||||||
|
|
||||||
tinyDB.putString("cacheSizeStr", getResources().getString(R.string.cacheSizeDataSelectionSelectedText));
|
tinyDB.putString("cacheSizeStr", getResources().getString(R.string.cacheSizeDataSelectionSelectedText));
|
||||||
}
|
}
|
||||||
if(tinyDB.getString("cacheSizeImagesStr").isEmpty()) {
|
if(tinyDB.getString("cacheSizeImagesStr").isEmpty()) {
|
||||||
|
|
||||||
tinyDB.putString("cacheSizeImagesStr", getResources().getString(R.string.cacheSizeImagesSelectionSelectedText));
|
tinyDB.putString("cacheSizeImagesStr", getResources().getString(R.string.cacheSizeImagesSelectionSelectedText));
|
||||||
}
|
}
|
||||||
|
|
||||||
// enable comment drafts by default
|
// enable comment drafts by default
|
||||||
if(tinyDB.getString("draftsCommentsDeletionEnabledInit").isEmpty()) {
|
if(tinyDB.getString("draftsCommentsDeletionEnabledInit").isEmpty()) {
|
||||||
|
|
||||||
tinyDB.putBoolean("draftsCommentsDeletionEnabled", true);
|
tinyDB.putBoolean("draftsCommentsDeletionEnabled", true);
|
||||||
tinyDB.putString("draftsCommentsDeletionEnabledInit", "yes");
|
tinyDB.putString("draftsCommentsDeletionEnabledInit", "yes");
|
||||||
}
|
}
|
||||||
|
|
||||||
// setting default polling delay
|
// setting default polling delay
|
||||||
if(tinyDB.getInt("pollingDelayMinutes", 0) <= 0) {
|
if(tinyDB.getInt("pollingDelayMinutes", 0) <= 0) {
|
||||||
|
|
||||||
tinyDB.putInt("pollingDelayMinutes", Constants.defaultPollingDelay);
|
tinyDB.putInt("pollingDelayMinutes", Constants.defaultPollingDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable biometric by default
|
// disable biometric by default
|
||||||
if(tinyDB.getString("biometricStatusInit").isEmpty()) {
|
if(tinyDB.getString("biometricStatusInit").isEmpty()) {
|
||||||
|
|
||||||
tinyDB.putBoolean("biometricStatus", false);
|
tinyDB.putBoolean("biometricStatus", false);
|
||||||
tinyDB.putString("biometricStatusInit", "yes");
|
tinyDB.putString("biometricStatusInit", "yes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set default date format
|
||||||
|
if(tinyDB.getString("dateFormat").isEmpty()) {
|
||||||
|
tinyDB.putString("dateFormat", "pretty");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tinyDB.getString("codeBlockStr").isEmpty()) {
|
||||||
|
tinyDB.putInt("codeBlockColor", ResourcesCompat.getColor(getResources(), R.color.colorLightGreen, null));
|
||||||
|
tinyDB.putInt("codeBlockBackground", ResourcesCompat.getColor(getResources(), R.color.black, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tinyDB.getString("enableCounterIssueBadgeInit").isEmpty()) {
|
||||||
|
tinyDB.putBoolean("enableCounterIssueBadge", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tinyDB.getString("homeScreenStr").isEmpty()) {
|
||||||
|
tinyDB.putString("homeScreenStr", "yes");
|
||||||
|
tinyDB.putInt("homeScreenId", 0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
57
app/src/main/java/org/mian/gitnex/database/api/BaseApi.java
Normal file
57
app/src/main/java/org/mian/gitnex/database/api/BaseApi.java
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
package org.mian.gitnex.database.api;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import org.mian.gitnex.database.db.GitnexDatabase;
|
||||||
|
import org.mian.gitnex.helpers.Constants;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author opyale
|
||||||
|
*/
|
||||||
|
|
||||||
|
public abstract class BaseApi {
|
||||||
|
|
||||||
|
private static final Map<Class<? extends BaseApi>, Object> instances = new HashMap<>();
|
||||||
|
|
||||||
|
protected static final ExecutorService executorService = Executors.newCachedThreadPool();
|
||||||
|
protected final GitnexDatabase gitnexDatabase;
|
||||||
|
|
||||||
|
protected BaseApi(Context context) {
|
||||||
|
gitnexDatabase = GitnexDatabase.getDatabaseInstance(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T extends BaseApi> T getInstance(@NonNull Context context, @NonNull Class<T> clazz) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
if(!instances.containsKey(clazz)) {
|
||||||
|
synchronized(BaseApi.class) {
|
||||||
|
if(!instances.containsKey(clazz)) {
|
||||||
|
|
||||||
|
T instance = clazz
|
||||||
|
.getDeclaredConstructor(Context.class)
|
||||||
|
.newInstance(context);
|
||||||
|
|
||||||
|
instances.put(clazz, instance);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (T) instances.get(clazz);
|
||||||
|
|
||||||
|
} catch(NoSuchMethodException | IllegalAccessException |
|
||||||
|
InvocationTargetException | InstantiationException ignored) {}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,30 +1,23 @@
|
|||||||
package org.mian.gitnex.database.api;
|
package org.mian.gitnex.database.api;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
|
||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import org.mian.gitnex.database.dao.DraftsDao;
|
import org.mian.gitnex.database.dao.DraftsDao;
|
||||||
import org.mian.gitnex.database.db.GitnexDatabase;
|
|
||||||
import org.mian.gitnex.database.models.Draft;
|
import org.mian.gitnex.database.models.Draft;
|
||||||
import org.mian.gitnex.database.models.DraftWithRepository;
|
import org.mian.gitnex.database.models.DraftWithRepository;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class DraftsApi {
|
public class DraftsApi extends BaseApi {
|
||||||
|
|
||||||
private static DraftsDao draftsDao;
|
private final DraftsDao draftsDao;
|
||||||
private static long draftId;
|
|
||||||
private static Integer checkDraftFlag;
|
|
||||||
|
|
||||||
public DraftsApi(Context context) {
|
DraftsApi(Context context) {
|
||||||
|
super(context);
|
||||||
GitnexDatabase db;
|
draftsDao = gitnexDatabase.draftsDao();
|
||||||
db = GitnexDatabase.getDatabaseInstance(context);
|
|
||||||
draftsDao = db.draftsDao();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long insertDraft(int repositoryId, int draftAccountId, int issueId, String draftText, String draftType, String commentId, String issueType) {
|
public long insertDraft(int repositoryId, int draftAccountId, int issueId, String draftText, String draftType, String commentId, String issueType) {
|
||||||
@ -41,87 +34,44 @@ public class DraftsApi {
|
|||||||
return insertDraftAsyncTask(draft);
|
return insertDraftAsyncTask(draft);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static long insertDraftAsyncTask(final Draft draft) {
|
private long insertDraftAsyncTask(final Draft draft) {
|
||||||
|
return draftsDao.insertDraft(draft);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> draftId = draftsDao.insertDraft(draft));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.draftsApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return draftId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDraftIdAsync(int issueId, int draftRepositoryId) {
|
public long getDraftIdAsync(int issueId, int draftRepositoryId) {
|
||||||
|
return draftsDao.getDraftId(issueId, draftRepositoryId);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> draftId = draftsDao.getDraftId(issueId, draftRepositoryId));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.draftsApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return draftId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer checkDraft(int issueId, int draftRepositoryId, String commentId) {
|
public Integer checkDraft(int issueId, int draftRepositoryId, String commentId) {
|
||||||
|
return draftsDao.checkDraftDao(issueId, draftRepositoryId, commentId);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> checkDraftFlag = draftsDao.checkDraftDao(issueId, draftRepositoryId, commentId));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.draftsApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return checkDraftFlag;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<List<DraftWithRepository>> getDrafts(int accountId) {
|
public LiveData<List<DraftWithRepository>> getDrafts(int accountId) {
|
||||||
|
|
||||||
return draftsDao.fetchAllDrafts(accountId);
|
return draftsDao.fetchAllDrafts(accountId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<Draft> getDraftByIssueId(int issueId) {
|
public LiveData<Draft> getDraftByIssueId(int issueId) {
|
||||||
|
|
||||||
return draftsDao.fetchDraftByIssueId(issueId);
|
return draftsDao.fetchDraftByIssueId(issueId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteSingleDraft(final int draftId) {
|
public void deleteSingleDraft(final int draftId) {
|
||||||
|
|
||||||
final LiveData<Draft> draft = draftsDao.fetchDraftById(draftId);
|
final LiveData<Draft> draft = draftsDao.fetchDraftById(draftId);
|
||||||
|
|
||||||
if(draft != null) {
|
if(draft != null) {
|
||||||
|
executorService.execute(() -> draftsDao.deleteByDraftId(draftId));
|
||||||
new Thread(() -> draftsDao.deleteByDraftId(draftId)).start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void deleteAllDrafts(final int accountId) {
|
public void deleteAllDrafts(final int accountId) {
|
||||||
|
executorService.execute(() -> draftsDao.deleteAllDrafts(accountId));
|
||||||
new Thread(() -> draftsDao.deleteAllDrafts(accountId)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateDraft(final String draftText, final int draftId, final String commentId) {
|
public void updateDraft(final String draftText, final int draftId, final String commentId) {
|
||||||
|
executorService.execute(() -> draftsDao.updateDraft(draftText, draftId, commentId));
|
||||||
new Thread(() -> draftsDao.updateDraft(draftText, draftId, commentId)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateDraftByIssueIdAsyncTask(final String draftText, final int issueId, final int draftRepositoryId, final String commentId) {
|
public void updateDraftByIssueIdAsyncTask(final String draftText, final int issueId, final int draftRepositoryId, final String commentId) {
|
||||||
|
executorService.execute(() -> draftsDao.updateDraftByIssueId(draftText, issueId, draftRepositoryId, commentId));
|
||||||
new Thread(() -> draftsDao.updateDraftByIssueId(draftText, issueId, draftRepositoryId, commentId)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,22 @@
|
|||||||
package org.mian.gitnex.database.api;
|
package org.mian.gitnex.database.api;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
|
||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import org.mian.gitnex.database.dao.RepositoriesDao;
|
import org.mian.gitnex.database.dao.RepositoriesDao;
|
||||||
import org.mian.gitnex.database.db.GitnexDatabase;
|
|
||||||
import org.mian.gitnex.database.models.Repository;
|
import org.mian.gitnex.database.models.Repository;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class RepositoriesApi {
|
public class RepositoriesApi extends BaseApi {
|
||||||
|
|
||||||
private static RepositoriesDao repositoriesDao;
|
private final RepositoriesDao repositoriesDao;
|
||||||
private static long repositoryId;
|
|
||||||
private static Repository repository;
|
|
||||||
private static Integer checkRepository;
|
|
||||||
|
|
||||||
public RepositoriesApi(Context context) {
|
RepositoriesApi(Context context) {
|
||||||
|
super(context);
|
||||||
GitnexDatabase db;
|
repositoriesDao = gitnexDatabase.repositoriesDao();
|
||||||
db = GitnexDatabase.getDatabaseInstance(context);
|
|
||||||
repositoriesDao = db.repositoriesDao();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long insertRepository(int repoAccountId, String repositoryOwner, String repositoryName) {
|
public long insertRepository(int repoAccountId, String repositoryOwner, String repositoryName) {
|
||||||
@ -38,108 +30,43 @@ public class RepositoriesApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public long insertRepositoryAsyncTask(Repository repository) {
|
public long insertRepositoryAsyncTask(Repository repository) {
|
||||||
|
return repositoriesDao.newRepository(repository);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> repositoryId = repositoriesDao.newRepository(repository));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.repositoriesApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return repositoryId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Repository getRepository(int repoAccountId, String repositoryOwner, String repositoryName) {
|
public Repository getRepository(int repoAccountId, String repositoryOwner, String repositoryName) {
|
||||||
|
return repositoriesDao.getSingleRepositoryDao(repoAccountId, repositoryOwner, repositoryName);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> repository = repositoriesDao.getSingleRepositoryDao(repoAccountId, repositoryOwner, repositoryName));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.repositoriesApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return repository;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<List<Repository>> getAllRepositories() {
|
public LiveData<List<Repository>> getAllRepositories() {
|
||||||
|
|
||||||
return repositoriesDao.fetchAllRepositories();
|
return repositoriesDao.fetchAllRepositories();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<List<Repository>> getAllRepositoriesByAccount(int repoAccountId) {
|
public LiveData<List<Repository>> getAllRepositoriesByAccount(int repoAccountId) {
|
||||||
|
|
||||||
return repositoriesDao.getAllRepositoriesByAccountDao(repoAccountId);
|
return repositoriesDao.getAllRepositoriesByAccountDao(repoAccountId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer checkRepository(int repoAccountId, String repositoryOwner, String repositoryName) {
|
public Integer checkRepository(int repoAccountId, String repositoryOwner, String repositoryName) {
|
||||||
|
return repositoriesDao.checkRepositoryDao(repoAccountId, repositoryOwner, repositoryName);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> checkRepository = repositoriesDao.checkRepositoryDao(repoAccountId, repositoryOwner, repositoryName));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.repositoriesApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return checkRepository;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Repository fetchRepositoryById(int repositoryId) {
|
public Repository fetchRepositoryById(int repositoryId) {
|
||||||
|
return repositoriesDao.fetchRepositoryByIdDao(repositoryId);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> repository = repositoriesDao.fetchRepositoryByIdDao(repositoryId));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.repositoriesApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return repository;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Repository fetchRepositoryByAccountIdByRepositoryId(int repositoryId, int repoAccountId) {
|
public Repository fetchRepositoryByAccountIdByRepositoryId(int repositoryId, int repoAccountId) {
|
||||||
|
return repositoriesDao.fetchRepositoryByAccountIdByRepositoryIdDao(repositoryId, repoAccountId);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> repository = repositoriesDao.fetchRepositoryByAccountIdByRepositoryIdDao(repositoryId, repoAccountId));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.repositoriesApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return repository;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateRepositoryOwnerAndName(String repositoryOwner, String repositoryName, int repositoryId) {
|
public void updateRepositoryOwnerAndName(String repositoryOwner, String repositoryName, int repositoryId) {
|
||||||
|
executorService.execute(() -> repositoriesDao.updateRepositoryOwnerAndName(repositoryOwner, repositoryName, repositoryId));
|
||||||
new Thread(() -> repositoriesDao.updateRepositoryOwnerAndName(repositoryOwner, repositoryName, repositoryId)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void deleteRepositoriesByAccount(final int repoAccountId) {
|
public void deleteRepositoriesByAccount(final int repoAccountId) {
|
||||||
|
executorService.execute(() -> repositoriesDao.deleteRepositoriesByAccount(repoAccountId));
|
||||||
new Thread(() -> repositoriesDao.deleteRepositoriesByAccount(repoAccountId)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void deleteRepository(final int repositoryId) {
|
public void deleteRepository(final int repositoryId) {
|
||||||
|
executorService.execute(() -> repositoriesDao.deleteRepository(repositoryId));
|
||||||
new Thread(() -> repositoriesDao.deleteRepository(repositoryId)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,34 +1,25 @@
|
|||||||
package org.mian.gitnex.database.api;
|
package org.mian.gitnex.database.api;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
|
||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import org.mian.gitnex.database.dao.UserAccountsDao;
|
import org.mian.gitnex.database.dao.UserAccountsDao;
|
||||||
import org.mian.gitnex.database.db.GitnexDatabase;
|
|
||||||
import org.mian.gitnex.database.models.UserAccount;
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class UserAccountsApi {
|
public class UserAccountsApi extends BaseApi {
|
||||||
|
|
||||||
private static UserAccountsDao userAccountsDao;
|
private final UserAccountsDao userAccountsDao;
|
||||||
private static UserAccount userAccount;
|
|
||||||
private static List<UserAccount> userAccounts;
|
|
||||||
private static Integer checkAccount;
|
|
||||||
private static long accountId;
|
|
||||||
|
|
||||||
public UserAccountsApi(Context context) {
|
UserAccountsApi(Context context) {
|
||||||
|
super(context);
|
||||||
GitnexDatabase db;
|
userAccountsDao = gitnexDatabase.userAccountsDao();
|
||||||
db = GitnexDatabase.getDatabaseInstance(context);
|
|
||||||
userAccountsDao = db.userAccountsDao();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long insertNewAccount(String accountName, String instanceUrl, String userName, String token, String serverVersion) {
|
public long createNewAccount(String accountName, String instanceUrl, String userName, String token, String serverVersion) {
|
||||||
|
|
||||||
UserAccount userAccount = new UserAccount();
|
UserAccount userAccount = new UserAccount();
|
||||||
userAccount.setAccountName(accountName);
|
userAccount.setAccountName(accountName);
|
||||||
@ -37,96 +28,48 @@ public class UserAccountsApi {
|
|||||||
userAccount.setToken(token);
|
userAccount.setToken(token);
|
||||||
userAccount.setServerVersion(serverVersion);
|
userAccount.setServerVersion(serverVersion);
|
||||||
|
|
||||||
return insertNewAccountAsync(userAccount);
|
return userAccountsDao.createAccount(userAccount);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static long insertNewAccountAsync(final UserAccount userAccount) {
|
public void updateServerVersion(final String serverVersion, final int accountId) {
|
||||||
|
executorService.execute(() -> userAccountsDao.updateServerVersion(serverVersion, accountId));
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> accountId = userAccountsDao.newAccount(userAccount));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.userAccountsApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return accountId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void updateServerVersion(final String serverVersion, final int accountId) {
|
|
||||||
|
|
||||||
new Thread(() -> userAccountsDao.updateServerVersion(serverVersion, accountId)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateToken(final int accountId, final String token) {
|
public void updateToken(final int accountId, final String token) {
|
||||||
|
executorService.execute(() -> userAccountsDao.updateAccountToken(accountId, token));
|
||||||
new Thread(() -> userAccountsDao.updateAccountToken(accountId, token)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateTokenByAccountName(final String accountName, final String token) {
|
public void updateTokenByAccountName(final String accountName, final String token) {
|
||||||
|
executorService.execute(() -> userAccountsDao.updateAccountTokenByAccountName(accountName, token));
|
||||||
new Thread(() -> userAccountsDao.updateAccountTokenByAccountName(accountName, token)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserAccount getAccountData(String accountName) {
|
public UserAccount getAccountByName(String accountName) {
|
||||||
|
return userAccountsDao.getAccountByName(accountName);
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> userAccount = userAccountsDao.fetchRowByAccount_(accountName));
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.userAccountsApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return userAccount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getCount(String accountName) {
|
public UserAccount getAccountById(int accountId) {
|
||||||
|
return userAccountsDao.getAccountById(accountId);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
public Integer getCount() {
|
||||||
|
return userAccountsDao.getCount();
|
||||||
|
}
|
||||||
|
|
||||||
Thread thread = new Thread(() -> checkAccount = userAccountsDao.getCount(accountName));
|
public Boolean userAccountExists(String accountName) {
|
||||||
thread.start();
|
return userAccountsDao.userAccountExists(accountName);
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.userAccountsApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return checkAccount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<List<UserAccount>> getAllAccounts() {
|
public LiveData<List<UserAccount>> getAllAccounts() {
|
||||||
|
return userAccountsDao.getAllAccounts();
|
||||||
return userAccountsDao.fetchAllAccounts();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<UserAccount> usersAccounts() {
|
public List<UserAccount> usersAccounts() {
|
||||||
|
return userAccountsDao.userAccounts();
|
||||||
try {
|
|
||||||
|
|
||||||
Thread thread = new Thread(() -> userAccounts = userAccountsDao.userAccounts());
|
|
||||||
thread.start();
|
|
||||||
thread.join();
|
|
||||||
}
|
|
||||||
catch(InterruptedException e) {
|
|
||||||
|
|
||||||
Log.e(Constants.userAccountsApi, e.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return userAccounts;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteAccount(final int accountId) {
|
public void deleteAccount(final int accountId) {
|
||||||
|
executorService.execute(() -> userAccountsDao.deleteAccount(accountId));
|
||||||
new Thread(() -> userAccountsDao.deleteAccount(accountId)).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,22 +15,25 @@ import java.util.List;
|
|||||||
public interface UserAccountsDao {
|
public interface UserAccountsDao {
|
||||||
|
|
||||||
@Insert
|
@Insert
|
||||||
long newAccount(UserAccount userAccounts);
|
long createAccount(UserAccount userAccounts);
|
||||||
|
|
||||||
@Query("SELECT * FROM UserAccounts ORDER BY accountId ASC")
|
@Query("SELECT * FROM UserAccounts ORDER BY accountId ASC")
|
||||||
LiveData<List<UserAccount>> fetchAllAccounts();
|
LiveData<List<UserAccount>> getAllAccounts();
|
||||||
|
|
||||||
@Query("SELECT * FROM UserAccounts ORDER BY accountId ASC")
|
@Query("SELECT * FROM UserAccounts ORDER BY accountId ASC")
|
||||||
List<UserAccount> userAccounts();
|
List<UserAccount> userAccounts();
|
||||||
|
|
||||||
@Query("SELECT COUNT(accountId) FROM UserAccounts WHERE accountName = :accountName")
|
@Query("SELECT COUNT(accountId) FROM UserAccounts")
|
||||||
Integer getCount(String accountName);
|
Integer getCount();
|
||||||
|
|
||||||
@Query("SELECT * FROM UserAccounts WHERE accountName = :accountName")
|
@Query("SELECT COUNT(accountId) FROM UserAccounts WHERE accountName = :accountName LIMIT 1")
|
||||||
UserAccount fetchRowByAccount_(String accountName);
|
Boolean userAccountExists(String accountName);
|
||||||
|
|
||||||
@Query("SELECT * FROM UserAccounts WHERE accountId = :accountId")
|
@Query("SELECT * FROM UserAccounts WHERE accountName = :accountName LIMIT 1")
|
||||||
UserAccount fetchRowByAccountId(int accountId);
|
UserAccount getAccountByName(String accountName);
|
||||||
|
|
||||||
|
@Query("SELECT * FROM UserAccounts WHERE accountId = :accountId LIMIT 1")
|
||||||
|
UserAccount getAccountById(int accountId);
|
||||||
|
|
||||||
@Query("UPDATE UserAccounts SET serverVersion = :serverVersion WHERE accountId = :accountId")
|
@Query("UPDATE UserAccounts SET serverVersion = :serverVersion WHERE accountId = :accountId")
|
||||||
void updateServerVersion(String serverVersion, int accountId);
|
void updateServerVersion(String serverVersion, int accountId);
|
||||||
|
@ -22,32 +22,16 @@ import org.mian.gitnex.database.models.UserAccount;
|
|||||||
version = 3, exportSchema = false)
|
version = 3, exportSchema = false)
|
||||||
public abstract class GitnexDatabase extends RoomDatabase {
|
public abstract class GitnexDatabase extends RoomDatabase {
|
||||||
|
|
||||||
|
private static final String DB_NAME = "gitnex";
|
||||||
private static GitnexDatabase gitnexDatabase;
|
private static GitnexDatabase gitnexDatabase;
|
||||||
|
|
||||||
public static GitnexDatabase getDatabaseInstance(Context context) {
|
|
||||||
|
|
||||||
if (gitnexDatabase == null) {
|
|
||||||
|
|
||||||
String DB_NAME = "gitnex";
|
|
||||||
gitnexDatabase = Room.databaseBuilder(context, GitnexDatabase.class, DB_NAME)
|
|
||||||
//.fallbackToDestructiveMigration()
|
|
||||||
.addMigrations(MIGRATION_1_2, MIGRATION_2_3)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
return gitnexDatabase;
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract DraftsDao draftsDao();
|
public abstract DraftsDao draftsDao();
|
||||||
|
|
||||||
public abstract RepositoriesDao repositoriesDao();
|
public abstract RepositoriesDao repositoriesDao();
|
||||||
|
|
||||||
public abstract UserAccountsDao userAccountsDao();
|
public abstract UserAccountsDao userAccountsDao();
|
||||||
|
|
||||||
private static final Migration MIGRATION_1_2 = new Migration(1, 2) {
|
private static final Migration MIGRATION_1_2 = new Migration(1, 2) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
|
||||||
//database.execSQL("DROP TABLE Drafts");
|
//database.execSQL("DROP TABLE Drafts");
|
||||||
database.execSQL("ALTER TABLE 'Drafts' ADD COLUMN 'commentId' TEXT");
|
database.execSQL("ALTER TABLE 'Drafts' ADD COLUMN 'commentId' TEXT");
|
||||||
}
|
}
|
||||||
@ -56,8 +40,27 @@ public abstract class GitnexDatabase extends RoomDatabase {
|
|||||||
private static final Migration MIGRATION_2_3 = new Migration(2, 3) {
|
private static final Migration MIGRATION_2_3 = new Migration(2, 3) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
|
||||||
database.execSQL("ALTER TABLE 'Drafts' ADD COLUMN 'issueType' TEXT");
|
database.execSQL("ALTER TABLE 'Drafts' ADD COLUMN 'issueType' TEXT");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static GitnexDatabase getDatabaseInstance(Context context) {
|
||||||
|
|
||||||
|
if (gitnexDatabase == null) {
|
||||||
|
synchronized(GitnexDatabase.class) {
|
||||||
|
if(gitnexDatabase == null) {
|
||||||
|
|
||||||
|
gitnexDatabase = Room.databaseBuilder(context, GitnexDatabase.class, DB_NAME)
|
||||||
|
// .fallbackToDestructiveMigration()
|
||||||
|
.allowMainThreadQueries()
|
||||||
|
.addMigrations(MIGRATION_1_2, MIGRATION_2_3)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return gitnexDatabase;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.actions.ActionResult;
|
import org.mian.gitnex.actions.ActionResult;
|
||||||
import org.mian.gitnex.actions.IssueActions;
|
import org.mian.gitnex.actions.IssueActions;
|
||||||
import org.mian.gitnex.activities.MainActivity;
|
import org.mian.gitnex.activities.MainActivity;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.DraftsApi;
|
import org.mian.gitnex.database.api.DraftsApi;
|
||||||
import org.mian.gitnex.databinding.BottomSheetReplyLayoutBinding;
|
import org.mian.gitnex.databinding.BottomSheetReplyLayoutBinding;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
@ -57,7 +58,7 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment {
|
|||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
|
|
||||||
tinyDB = TinyDB.getInstance(context);
|
tinyDB = TinyDB.getInstance(context);
|
||||||
draftsApi = new DraftsApi(context);
|
draftsApi = BaseApi.getInstance(context, DraftsApi.class);
|
||||||
|
|
||||||
repositoryId = (int) tinyDB.getLong("repositoryId", 0);
|
repositoryId = (int) tinyDB.getLong("repositoryId", 0);
|
||||||
currentActiveAccountId = tinyDB.getInt("currentActiveAccountId");
|
currentActiveAccountId = tinyDB.getInt("currentActiveAccountId");
|
||||||
@ -281,7 +282,7 @@ public class BottomSheetReplyFragment extends BottomSheetDialogFragment {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
DraftsApi.updateDraft(text, (int) draftId, "TODO");
|
draftsApi.updateDraft(text, (int) draftId, "TODO");
|
||||||
}
|
}
|
||||||
|
|
||||||
draftsHint.setVisibility(View.VISIBLE);
|
draftsHint.setVisibility(View.VISIBLE);
|
||||||
|
@ -22,6 +22,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
|||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.MainActivity;
|
import org.mian.gitnex.activities.MainActivity;
|
||||||
import org.mian.gitnex.adapters.DraftsAdapter;
|
import org.mian.gitnex.adapters.DraftsAdapter;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.DraftsApi;
|
import org.mian.gitnex.database.api.DraftsApi;
|
||||||
import org.mian.gitnex.database.models.DraftWithRepository;
|
import org.mian.gitnex.database.models.DraftWithRepository;
|
||||||
import org.mian.gitnex.databinding.FragmentDraftsBinding;
|
import org.mian.gitnex.databinding.FragmentDraftsBinding;
|
||||||
@ -59,7 +60,7 @@ public class DraftsFragment extends Fragment {
|
|||||||
TinyDB tinyDb = TinyDB.getInstance(ctx);
|
TinyDB tinyDb = TinyDB.getInstance(ctx);
|
||||||
|
|
||||||
draftsList_ = new ArrayList<>();
|
draftsList_ = new ArrayList<>();
|
||||||
draftsApi = new DraftsApi(ctx);
|
draftsApi = BaseApi.getInstance(ctx, DraftsApi.class);
|
||||||
|
|
||||||
noData = fragmentDraftsBinding.noData;
|
noData = fragmentDraftsBinding.noData;
|
||||||
mRecyclerView = fragmentDraftsBinding.recyclerView;
|
mRecyclerView = fragmentDraftsBinding.recyclerView;
|
||||||
@ -123,7 +124,7 @@ public class DraftsFragment extends Fragment {
|
|||||||
|
|
||||||
if(draftsList_.size() > 0) {
|
if(draftsList_.size() > 0) {
|
||||||
|
|
||||||
DraftsApi.deleteAllDrafts(accountId);
|
BaseApi.getInstance(ctx, DraftsApi.class).deleteAllDrafts(accountId);
|
||||||
draftsList_.clear();
|
draftsList_.clear();
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
Toasty.success(ctx, getResources().getString(R.string.draftsDeleteSuccess));
|
Toasty.success(ctx, getResources().getString(R.string.draftsDeleteSuccess));
|
||||||
|
@ -63,8 +63,7 @@ public class RepositoriesFragment extends Fragment {
|
|||||||
mRecyclerView.setHasFixedSize(true);
|
mRecyclerView.setHasFixedSize(true);
|
||||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(),
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
||||||
DividerItemDecoration.VERTICAL);
|
|
||||||
mRecyclerView.addItemDecoration(dividerItemDecoration);
|
mRecyclerView.addItemDecoration(dividerItemDecoration);
|
||||||
|
|
||||||
createNewRepo = fragmentRepositoriesBinding.addNewRepo;
|
createNewRepo = fragmentRepositoriesBinding.addNewRepo;
|
||||||
|
@ -18,6 +18,7 @@ import org.mian.gitnex.R;
|
|||||||
import org.mian.gitnex.activities.AddNewAccountActivity;
|
import org.mian.gitnex.activities.AddNewAccountActivity;
|
||||||
import org.mian.gitnex.activities.MainActivity;
|
import org.mian.gitnex.activities.MainActivity;
|
||||||
import org.mian.gitnex.adapters.UserAccountsAdapter;
|
import org.mian.gitnex.adapters.UserAccountsAdapter;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
import org.mian.gitnex.database.api.UserAccountsApi;
|
import org.mian.gitnex.database.api.UserAccountsApi;
|
||||||
import org.mian.gitnex.database.models.UserAccount;
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import org.mian.gitnex.databinding.FragmentUserAccountsBinding;
|
import org.mian.gitnex.databinding.FragmentUserAccountsBinding;
|
||||||
@ -48,7 +49,7 @@ public class UserAccountsFragment extends Fragment {
|
|||||||
((MainActivity) requireActivity()).setActionBarTitle(getResources().getString(R.string.pageTitleUserAccounts));
|
((MainActivity) requireActivity()).setActionBarTitle(getResources().getString(R.string.pageTitleUserAccounts));
|
||||||
|
|
||||||
userAccountsList = new ArrayList<>();
|
userAccountsList = new ArrayList<>();
|
||||||
userAccountsApi = new UserAccountsApi(ctx);
|
userAccountsApi = BaseApi.getInstance(ctx, UserAccountsApi.class);
|
||||||
|
|
||||||
mRecyclerView = fragmentUserAccountsBinding.recyclerView;
|
mRecyclerView = fragmentUserAccountsBinding.recyclerView;
|
||||||
final SwipeRefreshLayout swipeRefresh = fragmentUserAccountsBinding.pullToRefresh;
|
final SwipeRefreshLayout swipeRefresh = fragmentUserAccountsBinding.pullToRefresh;
|
||||||
|
@ -13,6 +13,7 @@ import android.util.TypedValue;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import androidx.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
import androidx.core.content.pm.PackageInfoCompat;
|
import androidx.core.content.pm.PackageInfoCompat;
|
||||||
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
@ -69,7 +70,6 @@ public class AppUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasNetworkConnection(Context context) {
|
public static boolean hasNetworkConnection(Context context) {
|
||||||
|
|
||||||
return NetworkStatusObserver.getInstance(context).hasNetworkConnection();
|
return NetworkStatusObserver.getInstance(context).hasNetworkConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,32 +274,27 @@ public class AppUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getLastCharactersOfWord(String str, int count) {
|
public static String getLastCharactersOfWord(String str, int count) {
|
||||||
|
|
||||||
return str.substring(str.length() - count);
|
return str.substring(str.length() - count);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setMultiVisibility(int visibility, View... views) {
|
public static void setMultiVisibility(int visibility, View... views) {
|
||||||
|
|
||||||
for(View view : views) {
|
for(View view : views) {
|
||||||
|
|
||||||
view.setVisibility(visibility);
|
view.setVisibility(visibility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getPixelsFromDensity(Context context, int dp) {
|
public static int getPixelsFromDensity(Context context, int dp) {
|
||||||
|
|
||||||
return (int) (context.getResources().getDisplayMetrics().density * dp);
|
return (int) (context.getResources().getDisplayMetrics().density * dp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getPixelsFromScaledDensity(Context context, int sp) {
|
public static int getPixelsFromScaledDensity(Context context, int sp) {
|
||||||
|
|
||||||
return (int) (context.getResources().getDisplayMetrics().scaledDensity * sp);
|
return (int) (context.getResources().getDisplayMetrics().scaledDensity * sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getLineCount(String s) {
|
public static long getLineCount(String s) {
|
||||||
|
|
||||||
int lines = 0;
|
long lines = 0;
|
||||||
|
|
||||||
Pattern pattern = Pattern.compile("(\r\n|\r|\n)");
|
Pattern pattern = Pattern.compile("(\r\n|\r|\n)");
|
||||||
Matcher matcher = pattern.matcher(s);
|
Matcher matcher = pattern.matcher(s);
|
||||||
@ -307,6 +302,11 @@ public class AppUtil {
|
|||||||
while(matcher.find())
|
while(matcher.find())
|
||||||
lines++;
|
lines++;
|
||||||
|
|
||||||
|
// Sometimes there may be text, but no line breaks.
|
||||||
|
// This should still count as one line.
|
||||||
|
if(s.length() > 0 && lines == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
return lines;
|
return lines;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -320,5 +320,27 @@ public class AppUtil {
|
|||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
|
|
||||||
Toasty.info(ctx, message);
|
Toasty.info(ctx, message);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean switchToAccount(Context context, UserAccount userAccount) {
|
||||||
|
|
||||||
|
TinyDB tinyDB = TinyDB.getInstance(context);
|
||||||
|
|
||||||
|
if(tinyDB.getInt("currentActiveAccountId") != userAccount.getAccountId()) {
|
||||||
|
|
||||||
|
tinyDB.putString("loginUid", userAccount.getUserName());
|
||||||
|
tinyDB.putString("userLogin", userAccount.getUserName());
|
||||||
|
tinyDB.putString(userAccount.getUserName() + "-token", userAccount.getToken());
|
||||||
|
tinyDB.putString("instanceUrl", userAccount.getInstanceUrl());
|
||||||
|
tinyDB.putInt("currentActiveAccountId", userAccount.getAccountId());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.mian.gitnex.helpers;
|
package org.mian.gitnex.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import okhttp3.Credentials;
|
import okhttp3.Credentials;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,11 +25,14 @@ public class Authorization {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String get(UserAccount userAccount) {
|
||||||
|
return "token " + userAccount.getToken();
|
||||||
|
}
|
||||||
|
|
||||||
public static String getWeb(Context context) {
|
public static String getWeb(Context context) {
|
||||||
|
|
||||||
TinyDB tinyDb = TinyDB.getInstance(context);
|
TinyDB tinyDb = TinyDB.getInstance(context);
|
||||||
return Credentials.basic("", tinyDb.getString(tinyDb.getString("loginUid") + "-token"));
|
return Credentials.basic("", tinyDb.getString(tinyDb.getString("loginUid") + "-token"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,11 @@ public class Constants {
|
|||||||
public static final String mainNotificationChannelId = "main_channel";
|
public static final String mainNotificationChannelId = "main_channel";
|
||||||
public static final String downloadNotificationChannelId = "dl_channel";
|
public static final String downloadNotificationChannelId = "dl_channel";
|
||||||
|
|
||||||
|
public static final long[] defaultVibrationPattern = new long[] { 1000, 1000 };
|
||||||
|
|
||||||
public static final String[] fallbackReactions = new String[]{"+1", "-1", "laugh", "hooray", "confused", "heart", "rocket", "eyes"};
|
public static final String[] fallbackReactions = new String[]{"+1", "-1", "laugh", "hooray", "confused", "heart", "rocket", "eyes"};
|
||||||
|
|
||||||
|
// work managers
|
||||||
|
public static final String notificationsWorkerId = "notifications_worker";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ public class Version {
|
|||||||
final Pattern pattern_number_dot_number = Pattern.compile("^\\d+(\\.(\\d)+)*");
|
final Pattern pattern_number_dot_number = Pattern.compile("^\\d+(\\.(\\d)+)*");
|
||||||
|
|
||||||
if(!valid(raw)) {
|
if(!valid(raw)) {
|
||||||
throw new IllegalArgumentException("Invalid version format");
|
throw new IllegalArgumentException("Invalid version format: " + raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(raw.charAt(0) == 'v' || raw.charAt(0) == 'V') {
|
if(raw.charAt(0) == 'v' || raw.charAt(0) == 'V') {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.mian.gitnex.helpers.views;
|
package org.mian.gitnex.helpers.views;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
@ -36,19 +37,16 @@ public class SyntaxHighlightedArea extends LinearLayout {
|
|||||||
private LinesView linesView;
|
private LinesView linesView;
|
||||||
|
|
||||||
public SyntaxHighlightedArea(@NonNull Context context) {
|
public SyntaxHighlightedArea(@NonNull Context context) {
|
||||||
|
|
||||||
super(context);
|
super(context);
|
||||||
setup();
|
setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SyntaxHighlightedArea(@NonNull Context context, @Nullable AttributeSet attrs) {
|
public SyntaxHighlightedArea(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||||
|
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
setup();
|
setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SyntaxHighlightedArea(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
public SyntaxHighlightedArea(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||||
|
|
||||||
super(context, attrs, defStyleAttr);
|
super(context, attrs, defStyleAttr);
|
||||||
setup();
|
setup();
|
||||||
}
|
}
|
||||||
@ -62,9 +60,10 @@ public class SyntaxHighlightedArea extends LinearLayout {
|
|||||||
sourceView = new TextView(getContext());
|
sourceView = new TextView(getContext());
|
||||||
|
|
||||||
sourceView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
sourceView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
sourceView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
|
|
||||||
sourceView.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/sourcecodeproregular.ttf"));
|
sourceView.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/sourcecodeproregular.ttf"));
|
||||||
|
sourceView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
|
||||||
sourceView.setTextColor(prism4jTheme.textColor());
|
sourceView.setTextColor(prism4jTheme.textColor());
|
||||||
|
sourceView.setTextIsSelectable(true);
|
||||||
|
|
||||||
int padding = AppUtil.getPixelsFromDensity(getContext(), 5);
|
int padding = AppUtil.getPixelsFromDensity(getContext(), 5);
|
||||||
sourceView.setPadding(padding, 0, padding, 0);
|
sourceView.setPadding(padding, 0, padding, 0);
|
||||||
@ -97,34 +96,57 @@ public class SyntaxHighlightedArea extends LinearLayout {
|
|||||||
public void setContent(@NonNull String source, @NonNull String extension) {
|
public void setContent(@NonNull String source, @NonNull String extension) {
|
||||||
|
|
||||||
if(source.length() > 0) {
|
if(source.length() > 0) {
|
||||||
linesView.setLineCount(AppUtil.getLineCount(source));
|
|
||||||
|
|
||||||
try {
|
Thread highlightingThread = new Thread(() -> {
|
||||||
|
|
||||||
MainGrammarLocator mainGrammarLocator = MainGrammarLocator.getInstance();
|
try {
|
||||||
Prism4j prism4j = new Prism4j(mainGrammarLocator);
|
|
||||||
|
|
||||||
CharSequence highlightedSource = Prism4jSyntaxHighlight.create(prism4j, prism4jTheme, MainGrammarLocator.DEFAULT_FALLBACK_LANGUAGE)
|
MainGrammarLocator mainGrammarLocator = MainGrammarLocator.getInstance();
|
||||||
.highlight(mainGrammarLocator.fromExtension(extension), source);
|
|
||||||
|
|
||||||
if(highlightedSource.charAt(highlightedSource.length() - 1) == '\n') {
|
CharSequence highlightedSource = Prism4jSyntaxHighlight
|
||||||
// Removes a line break which is probably added by Prism4j but not actually present in the source.
|
.create(new Prism4j(mainGrammarLocator), prism4jTheme, MainGrammarLocator.DEFAULT_FALLBACK_LANGUAGE)
|
||||||
// This line should be altered in case this gets fixed.
|
.highlight(mainGrammarLocator.fromExtension(extension), source);
|
||||||
sourceView.setText(highlightedSource.subSequence(0, highlightedSource.length() - 1));
|
|
||||||
}
|
getActivity().runOnUiThread(() -> {
|
||||||
else {
|
if(highlightedSource.charAt(highlightedSource.length() - 1) == '\n') {
|
||||||
sourceView.setText(highlightedSource);
|
// Removes a line break which is probably added by Prism4j but not actually present in the source.
|
||||||
|
// This line should be altered in case this gets fixed.
|
||||||
|
sourceView.setText(highlightedSource.subSequence(0, highlightedSource.length() - 1));
|
||||||
|
} else {
|
||||||
|
sourceView.setText(highlightedSource);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch(Throwable ignored) {
|
||||||
|
// Fall back to plaintext if something fails
|
||||||
|
getActivity().runOnUiThread(() -> sourceView.setText(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch(Throwable ignored) {
|
});
|
||||||
// Fall back to plaintext if something fails
|
|
||||||
sourceView.setText(source);
|
Thread lineCountingThread = new Thread(() -> {
|
||||||
}
|
|
||||||
|
long lineCount = AppUtil.getLineCount(source);
|
||||||
|
|
||||||
|
try {
|
||||||
|
highlightingThread.join();
|
||||||
|
} catch(InterruptedException ignored) {}
|
||||||
|
|
||||||
|
getActivity().runOnUiThread(() -> linesView.setLineCount(lineCount));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
highlightingThread.start();
|
||||||
|
lineCountingThread.start();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getContent() {
|
private Activity getActivity() {
|
||||||
|
return (Activity) getContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
return sourceView.getText().toString();
|
return sourceView.getText().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,27 +159,31 @@ public class SyntaxHighlightedArea extends LinearLayout {
|
|||||||
@ColorInt private int textColor;
|
@ColorInt private int textColor;
|
||||||
@ColorInt private int lineColor;
|
@ColorInt private int lineColor;
|
||||||
|
|
||||||
private int lineCount;
|
private long lineCount;
|
||||||
|
|
||||||
public LinesView(Context context) {
|
public LinesView(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLineCount(int lineCount) {
|
public void setLineCount(long lineCount) {
|
||||||
this.lineCount = lineCount;
|
this.lineCount = lineCount;
|
||||||
|
requestLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBackgroundColor(@ColorInt int backgroundColor) {
|
public void setBackgroundColor(@ColorInt int backgroundColor) {
|
||||||
this.backgroundColor = backgroundColor;
|
this.backgroundColor = backgroundColor;
|
||||||
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTextColor(@ColorInt int textColor) {
|
public void setTextColor(@ColorInt int textColor) {
|
||||||
this.textColor = textColor;
|
this.textColor = textColor;
|
||||||
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLineColor(@ColorInt int lineColor) {
|
public void setLineColor(@ColorInt int lineColor) {
|
||||||
this.lineColor = lineColor;
|
this.lineColor = lineColor;
|
||||||
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Paint getPaint() {
|
public Paint getPaint() {
|
||||||
|
@ -13,7 +13,6 @@ import androidx.work.WorkManager;
|
|||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Version;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,8 +21,6 @@ import java.util.concurrent.TimeUnit;
|
|||||||
|
|
||||||
public class Notifications {
|
public class Notifications {
|
||||||
|
|
||||||
private static int notificationsSupported = -1;
|
|
||||||
|
|
||||||
public static int uniqueNotificationId(Context context) {
|
public static int uniqueNotificationId(Context context) {
|
||||||
|
|
||||||
TinyDB tinyDB = TinyDB.getInstance(context);
|
TinyDB tinyDB = TinyDB.getInstance(context);
|
||||||
@ -51,7 +48,7 @@ public class Notifications {
|
|||||||
mainChannel.setDescription(context.getString(R.string.mainNotificationChannelDescription));
|
mainChannel.setDescription(context.getString(R.string.mainNotificationChannelDescription));
|
||||||
|
|
||||||
if(tinyDB.getBoolean("notificationsEnableVibration", true)) {
|
if(tinyDB.getBoolean("notificationsEnableVibration", true)) {
|
||||||
mainChannel.setVibrationPattern(new long[] { 1000, 1000 });
|
mainChannel.setVibrationPattern(Constants.defaultVibrationPattern);
|
||||||
mainChannel.enableVibration(true);
|
mainChannel.enableVibration(true);
|
||||||
} else {
|
} else {
|
||||||
mainChannel.enableVibration(false);
|
mainChannel.enableVibration(false);
|
||||||
@ -75,7 +72,7 @@ public class Notifications {
|
|||||||
|
|
||||||
public static void stopWorker(Context context) {
|
public static void stopWorker(Context context) {
|
||||||
|
|
||||||
WorkManager.getInstance(context).cancelAllWorkByTag(context.getPackageName());
|
WorkManager.getInstance(context).cancelAllWorkByTag(Constants.notificationsWorkerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void startWorker(Context context) {
|
public static void startWorker(Context context) {
|
||||||
@ -84,42 +81,25 @@ public class Notifications {
|
|||||||
|
|
||||||
if(tinyDB.getBoolean("notificationsEnabled", true)) {
|
if(tinyDB.getBoolean("notificationsEnabled", true)) {
|
||||||
|
|
||||||
if(notificationsSupported == -1) checkVersion(tinyDB);
|
Constraints.Builder constraints = new Constraints.Builder()
|
||||||
|
.setRequiredNetworkType(NetworkType.CONNECTED)
|
||||||
if(notificationsSupported == 1) {
|
.setRequiresBatteryNotLow(false)
|
||||||
|
.setRequiresStorageNotLow(false)
|
||||||
Constraints.Builder constraints = new Constraints.Builder()
|
.setRequiresCharging(false);
|
||||||
.setRequiredNetworkType(NetworkType.CONNECTED)
|
|
||||||
.setRequiresBatteryNotLow(false)
|
|
||||||
.setRequiresStorageNotLow(false)
|
|
||||||
.setRequiresCharging(false);
|
|
||||||
|
|
||||||
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
|
|
||||||
constraints.setRequiresDeviceIdle(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
int pollingDelayMinutes = Math.max(tinyDB.getInt("pollingDelayMinutes", Constants.defaultPollingDelay), 15);
|
|
||||||
|
|
||||||
PeriodicWorkRequest periodicWorkRequest = new PeriodicWorkRequest.Builder(NotificationsWorker.class, pollingDelayMinutes, TimeUnit.MINUTES)
|
|
||||||
.setConstraints(constraints.build())
|
|
||||||
.addTag(context.getPackageName())
|
|
||||||
.build();
|
|
||||||
|
|
||||||
WorkManager.getInstance(context).enqueueUniquePeriodicWork(context.getPackageName(), ExistingPeriodicWorkPolicy.KEEP, periodicWorkRequest);
|
|
||||||
|
|
||||||
|
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
constraints.setRequiresDeviceIdle(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pollingDelayMinutes = Math.max(tinyDB.getInt("pollingDelayMinutes", Constants.defaultPollingDelay), 15);
|
||||||
|
|
||||||
|
PeriodicWorkRequest periodicWorkRequest = new PeriodicWorkRequest.Builder(NotificationsWorker.class, pollingDelayMinutes, TimeUnit.MINUTES)
|
||||||
|
.setConstraints(constraints.build())
|
||||||
|
.addTag(Constants.notificationsWorkerId)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
WorkManager.getInstance(context).enqueueUniquePeriodicWork(Constants.notificationsWorkerId, ExistingPeriodicWorkPolicy.KEEP, periodicWorkRequest);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void checkVersion(TinyDB tinyDB) {
|
|
||||||
|
|
||||||
String currentVersion = tinyDB.getString("giteaVersion");
|
|
||||||
|
|
||||||
if(tinyDB.getBoolean("loggedInMode") && !currentVersion.isEmpty()) {
|
|
||||||
|
|
||||||
notificationsSupported = new Version(currentVersion).higherOrEqual("1.12.3") ? 1 : 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,18 @@ import org.gitnex.tea4j.models.NotificationThread;
|
|||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.MainActivity;
|
import org.mian.gitnex.activities.MainActivity;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.database.api.BaseApi;
|
||||||
|
import org.mian.gitnex.database.api.UserAccountsApi;
|
||||||
|
import org.mian.gitnex.database.models.UserAccount;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
|
|
||||||
@ -30,86 +36,101 @@ import retrofit2.Response;
|
|||||||
|
|
||||||
public class NotificationsWorker extends Worker {
|
public class NotificationsWorker extends Worker {
|
||||||
|
|
||||||
private static final int MAXIMUM_NOTIFICATIONS = 100;
|
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final TinyDB tinyDB;
|
private final TinyDB tinyDB;
|
||||||
|
private final Map<UserAccount, Map<String, String>> userAccounts;
|
||||||
|
|
||||||
public NotificationsWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
|
public NotificationsWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
|
||||||
|
|
||||||
super(context, workerParams);
|
super(context, workerParams);
|
||||||
|
|
||||||
|
UserAccountsApi userAccountsApi = BaseApi.getInstance(context, UserAccountsApi.class);
|
||||||
|
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.tinyDB = TinyDB.getInstance(context);
|
this.tinyDB = TinyDB.getInstance(context);
|
||||||
|
this.userAccounts = new HashMap<>(userAccountsApi.getCount());
|
||||||
|
|
||||||
|
for(UserAccount userAccount : userAccountsApi.usersAccounts()) {
|
||||||
|
|
||||||
|
// We do also accept empty values, since the server version was not saved properly in the beginning.
|
||||||
|
if(userAccount.getServerVersion() == null || userAccount.getServerVersion().isEmpty() ||
|
||||||
|
new Version(userAccount.getServerVersion()).higherOrEqual("1.12.3")) {
|
||||||
|
|
||||||
|
Map<String, String> userAccountParameters = new HashMap<>();
|
||||||
|
userAccountParameters.put("previousTimestamp", AppUtil.getTimestampFromDate(context, new Date()));
|
||||||
|
|
||||||
|
userAccounts.put(userAccount, userAccountParameters);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Result doWork() {
|
public Result doWork() {
|
||||||
|
pollingLoops();
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
int notificationLoops = tinyDB.getInt("pollingDelayMinutes", Constants.defaultPollingDelay) >= 15 ? 1 : Math.min(15 - tinyDB.getInt("pollingDelayMinutes"), 10);
|
/**
|
||||||
|
* Used to bypass the 15-minute limit of {@code WorkManager}.
|
||||||
|
*/
|
||||||
|
private void pollingLoops() {
|
||||||
|
int notificationLoops = tinyDB.getInt("pollingDelayMinutes", Constants.defaultPollingDelay) < 15 ?
|
||||||
|
Math.min(15 - tinyDB.getInt("pollingDelayMinutes"), 10) : 1;
|
||||||
|
|
||||||
for(int i = 0; i < notificationLoops; i++) {
|
for(int i = 0; i < notificationLoops; i++) {
|
||||||
|
|
||||||
long startPollingTime = System.currentTimeMillis();
|
long startPollingTime = System.currentTimeMillis();
|
||||||
|
|
||||||
try {
|
startPolling();
|
||||||
|
|
||||||
String previousRefreshTimestamp = tinyDB.getString("previousRefreshTimestamp", AppUtil.getTimestampFromDate(context, new Date()));
|
|
||||||
|
|
||||||
Call<List<NotificationThread>> call = RetrofitClient
|
|
||||||
.getApiInterface(context)
|
|
||||||
.getNotificationThreads(Authorization.get(context), false, new String[]{"unread"}, previousRefreshTimestamp,
|
|
||||||
null, 1, MAXIMUM_NOTIFICATIONS);
|
|
||||||
|
|
||||||
Response<List<NotificationThread>> response = call.execute();
|
|
||||||
|
|
||||||
if(response.code() == 200) {
|
|
||||||
|
|
||||||
assert response.body() != null;
|
|
||||||
|
|
||||||
List<NotificationThread> notificationThreads = response.body();
|
|
||||||
|
|
||||||
if(!notificationThreads.isEmpty())
|
|
||||||
sendNotification(notificationThreads);
|
|
||||||
|
|
||||||
tinyDB.putString("previousRefreshTimestamp", AppUtil.getTimestampFromDate(context, new Date()));
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch(Exception ignored) {}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(notificationLoops > 1 && i < (notificationLoops - 1)) {
|
if(notificationLoops > 1 && i < (notificationLoops - 1)) {
|
||||||
|
|
||||||
Thread.sleep(60000 - (System.currentTimeMillis() - startPollingTime));
|
Thread.sleep(60000 - (System.currentTimeMillis() - startPollingTime));
|
||||||
}
|
}
|
||||||
} catch (InterruptedException ignored) {}
|
} catch(InterruptedException ignored) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Result.success();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendNotification(List<NotificationThread> notificationThreads) {
|
private void startPolling() {
|
||||||
|
for(UserAccount userAccount : userAccounts.keySet()) {
|
||||||
|
Map<String, String> userAccountParameters = userAccounts.get(userAccount);
|
||||||
|
|
||||||
int summaryId = 0;
|
try {
|
||||||
PendingIntent pendingIntent = getPendingIntent();
|
Call<List<NotificationThread>> call = RetrofitClient
|
||||||
|
.getApiInterface(context, userAccount.getInstanceUrl())
|
||||||
|
.getNotificationThreads(Authorization.get(userAccount), false, new String[]{"unread"},
|
||||||
|
userAccountParameters.get("previousTimestamp"), null, 1, Integer.MAX_VALUE);
|
||||||
|
|
||||||
|
Response<List<NotificationThread>> response = call.execute();
|
||||||
|
|
||||||
|
if(response.code() == 200 && response.body() != null) {
|
||||||
|
List<NotificationThread> notificationThreads = response.body();
|
||||||
|
if(!notificationThreads.isEmpty()) {
|
||||||
|
sendNotifications(userAccount, notificationThreads);
|
||||||
|
}
|
||||||
|
userAccountParameters.put("previousTimestamp", AppUtil.getTimestampFromDate(context, new Date()));
|
||||||
|
}
|
||||||
|
} catch(Exception ignored) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendNotifications(@NonNull UserAccount userAccount, @NonNull List<NotificationThread> notificationThreads) {
|
||||||
|
|
||||||
|
PendingIntent pendingIntent = getPendingIntent(userAccount);
|
||||||
|
|
||||||
NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);
|
NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);
|
||||||
|
|
||||||
Notification summaryNotification = new NotificationCompat.Builder(context, context.getPackageName())
|
Notification summaryNotification = new NotificationCompat.Builder(context, Constants.mainNotificationChannelId)
|
||||||
.setContentTitle(context.getString(R.string.newMessages))
|
.setContentTitle(context.getString(R.string.newMessages, userAccount.getUserName()))
|
||||||
.setContentText(String.format(context.getString(R.string.youHaveGotNewNotifications), notificationThreads.size()))
|
.setContentText(String.format(context.getString(R.string.youHaveGotNewNotifications), notificationThreads.size()))
|
||||||
.setSmallIcon(R.drawable.gitnex_transparent)
|
.setSmallIcon(R.drawable.gitnex_transparent)
|
||||||
.setGroup(context.getPackageName())
|
.setGroup(userAccount.getUserName())
|
||||||
.setGroupSummary(true)
|
.setGroupSummary(true)
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setContentIntent(pendingIntent)
|
.setContentIntent(pendingIntent)
|
||||||
.setChannelId(Constants.mainNotificationChannelId)
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
notificationManagerCompat.notify(summaryId, summaryNotification);
|
notificationManagerCompat.notify(userAccount.getAccountId(), summaryNotification);
|
||||||
|
|
||||||
for(NotificationThread notificationThread : notificationThreads) {
|
for(NotificationThread notificationThread : notificationThreads) {
|
||||||
|
|
||||||
@ -119,7 +140,7 @@ public class NotificationsWorker extends Worker {
|
|||||||
|
|
||||||
NotificationCompat.Builder builder1 = getBaseNotificationBuilder()
|
NotificationCompat.Builder builder1 = getBaseNotificationBuilder()
|
||||||
.setContentTitle(notificationHeader)
|
.setContentTitle(notificationHeader)
|
||||||
.setGroup(context.getPackageName())
|
.setGroup(userAccount.getUserName())
|
||||||
.setContentIntent(pendingIntent);
|
.setContentIntent(pendingIntent);
|
||||||
|
|
||||||
notificationManagerCompat.notify(Notifications.uniqueNotificationId(context), builder1.build());
|
notificationManagerCompat.notify(Notifications.uniqueNotificationId(context), builder1.build());
|
||||||
@ -129,21 +150,19 @@ public class NotificationsWorker extends Worker {
|
|||||||
|
|
||||||
private NotificationCompat.Builder getBaseNotificationBuilder() {
|
private NotificationCompat.Builder getBaseNotificationBuilder() {
|
||||||
|
|
||||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, context.getPackageName())
|
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, Constants.mainNotificationChannelId)
|
||||||
.setSmallIcon(R.drawable.gitnex_transparent)
|
.setSmallIcon(R.drawable.gitnex_transparent)
|
||||||
.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
|
.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
|
||||||
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
|
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
|
||||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
||||||
.setChannelId(Constants.mainNotificationChannelId)
|
|
||||||
.setAutoCancel(true);
|
.setAutoCancel(true);
|
||||||
|
|
||||||
if(tinyDB.getBoolean("notificationsEnableLights", true)) {
|
if(tinyDB.getBoolean("notificationsEnableLights", true)) {
|
||||||
|
|
||||||
builder.setLights(tinyDB.getInt("notificationsLightColor", Color.GREEN), 1500, 1500);
|
builder.setLights(tinyDB.getInt("notificationsLightColor", Color.GREEN), 1500, 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tinyDB.getBoolean("notificationsEnableVibration", true)) {
|
if(tinyDB.getBoolean("notificationsEnableVibration", true)) {
|
||||||
builder.setVibrate(new long[]{ 1000, 1000 });
|
builder.setVibrate(Constants.defaultVibrationPattern);
|
||||||
} else {
|
} else {
|
||||||
builder.setVibrate(null);
|
builder.setVibrate(null);
|
||||||
}
|
}
|
||||||
@ -151,13 +170,16 @@ public class NotificationsWorker extends Worker {
|
|||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
private PendingIntent getPendingIntent() {
|
private PendingIntent getPendingIntent(@NonNull UserAccount userAccount) {
|
||||||
|
|
||||||
Intent intent = new Intent(context, MainActivity.class);
|
Intent intent = new Intent(context, MainActivity.class);
|
||||||
|
|
||||||
intent.putExtra("launchFragment", "notifications");
|
intent.putExtra("launchFragment", "notifications");
|
||||||
|
intent.putExtra("switchAccountId", userAccount.getAccountId());
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
|
||||||
return PendingIntent.getActivity(context, 0, intent, 0);
|
return PendingIntent.getActivity(context, userAccount.getAccountId(), intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_arrow_back" />
|
android:src="@drawable/ic_arrow_back" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@ -10,6 +11,7 @@
|
|||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:theme="@style/Widget.AppCompat.SearchView">
|
android:theme="@style/Widget.AppCompat.SearchView">
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
@ -22,10 +24,13 @@
|
|||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
android:layout_width="@dimen/close_button_size"
|
android:layout_width="@dimen/close_button_size"
|
||||||
android:layout_height="@dimen/close_button_size"
|
android:layout_height="@dimen/close_button_size"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginRight="15dp"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_arrow_back" />
|
android:src="@drawable/ic_arrow_back" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -33,9 +38,9 @@
|
|||||||
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:maxLines="1"
|
||||||
android:text="@string/repoSettingsTitle"
|
android:text="@string/repoSettingsTitle"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:maxLines="1"
|
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
@ -56,11 +61,14 @@
|
|||||||
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:text="@string/repoSettingsEditProperties"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:drawablePadding="32dp"
|
android:drawablePadding="32dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:text="@string/repoSettingsEditProperties"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="16dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_edit" />
|
app:drawableStartCompat="@drawable/ic_edit" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -72,21 +80,25 @@
|
|||||||
android:id="@+id/transferOwnerFrame"
|
android:id="@+id/transferOwnerFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/transferRepositoryOwnership"
|
android:id="@+id/transferRepositoryOwnership"
|
||||||
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:text="@string/repoSettingsTransferOwnership"
|
|
||||||
android:drawablePadding="32dp"
|
android:drawablePadding="32dp"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="@string/repoSettingsTransferOwnership"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:paddingTop="16dp"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_arrow_up" />
|
app:drawableStartCompat="@drawable/ic_arrow_up" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -94,12 +106,12 @@
|
|||||||
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="72dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
android:text="@string/repoSettingsTransferOwnershipHint"
|
android:text="@string/repoSettingsTransferOwnershipHint"
|
||||||
android:textColor="?attr/hintColor"
|
android:textColor="?attr/hintColor"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp" />
|
||||||
android:paddingBottom="16dp"
|
|
||||||
android:paddingStart="72dp"
|
|
||||||
android:paddingEnd="16dp" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -110,8 +122,11 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:paddingBottom="16dp">
|
android:paddingBottom="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -119,13 +134,13 @@
|
|||||||
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:text="@string/repoSettingsDelete"
|
|
||||||
android:drawablePadding="32dp"
|
android:drawablePadding="32dp"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="@string/repoSettingsDelete"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:paddingTop="16dp"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_delete" />
|
app:drawableStartCompat="@drawable/ic_delete" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -133,11 +148,11 @@
|
|||||||
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="72dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
android:text="@string/repoSettingsDeleteHint"
|
android:text="@string/repoSettingsDeleteHint"
|
||||||
android:textColor="?attr/hintColor"
|
android:textColor="?attr/hintColor"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp" />
|
||||||
android:paddingStart="72dp"
|
|
||||||
android:paddingEnd="16dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:theme="@style/Widget.AppCompat.SearchView">
|
android:theme="@style/Widget.AppCompat.SearchView">
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
@ -23,10 +24,13 @@
|
|||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
android:layout_width="@dimen/close_button_size"
|
android:layout_width="@dimen/close_button_size"
|
||||||
android:layout_height="@dimen/close_button_size"
|
android:layout_height="@dimen/close_button_size"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginRight="15dp"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -34,9 +38,9 @@
|
|||||||
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:maxLines="1"
|
||||||
android:text="@string/settingsAppearanceHeader"
|
android:text="@string/settingsAppearanceHeader"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:maxLines="1"
|
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
@ -47,29 +51,32 @@
|
|||||||
android:id="@+id/themeSelectionFrame"
|
android:id="@+id/themeSelectionFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/themeHeaderSelector"
|
android:id="@+id/themeHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/themeSelectionHeaderText"
|
android:text="@string/themeSelectionHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/themeSelected"
|
android:id="@+id/themeSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/themeSelectionSelectedText"
|
android:text="@string/themeSelectionSelectedText"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -77,29 +84,32 @@
|
|||||||
android:id="@+id/customFontFrame"
|
android:id="@+id/customFontFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/customFontHeaderSelector"
|
android:id="@+id/customFontHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsCustomFontHeaderText"
|
android:text="@string/settingsCustomFontHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/customFontSelected"
|
android:id="@+id/customFontSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsCustomFontDefault"
|
android:text="@string/settingsCustomFontDefault"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -107,29 +117,32 @@
|
|||||||
android:id="@+id/timeFrame"
|
android:id="@+id/timeFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvDateTimeHeaderSelector"
|
android:id="@+id/tvDateTimeHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsDateTimeHeaderText"
|
android:text="@string/settingsDateTimeHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvDateTimeSelected"
|
android:id="@+id/tvDateTimeSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsDateTimeHeaderDefault"
|
android:text="@string/settingsDateTimeHeaderDefault"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -137,30 +150,31 @@
|
|||||||
android:id="@+id/counterBadgeFrame"
|
android:id="@+id/counterBadgeFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvCounterBadgeHeader"
|
android:id="@+id/tvCounterBadgeHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsCounterBadges"
|
android:text="@string/settingsCounterBadges"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/switchCounterBadge"
|
android:id="@+id/switchCounterBadge"
|
||||||
android:layout_toEndOf="@+id/tvCounterBadgeHeader"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:switchMinWidth="56dp"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_toEndOf="@+id/tvCounterBadgeHeader"
|
||||||
|
android:gravity="end"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="24dp"
|
android:paddingEnd="24dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:switchMinWidth="56dp" />
|
||||||
android:gravity="end"
|
|
||||||
android:layout_gravity="end" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/layoutReportingView"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:background="?attr/primaryBackgroundColor">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:theme="@style/Widget.AppCompat.SearchView">
|
android:theme="@style/Widget.AppCompat.SearchView">
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
@ -24,10 +23,13 @@
|
|||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
android:layout_width="@dimen/close_button_size"
|
android:layout_width="@dimen/close_button_size"
|
||||||
android:layout_height="@dimen/close_button_size"
|
android:layout_height="@dimen/close_button_size"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginRight="15dp"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,9 +37,9 @@
|
|||||||
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:maxLines="1"
|
||||||
android:text="@string/draftsHeader"
|
android:text="@string/draftsHeader"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:maxLines="1"
|
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
@ -48,42 +50,41 @@
|
|||||||
android:id="@+id/enableDraftsCommentsDeletion"
|
android:id="@+id/enableDraftsCommentsDeletion"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/enableCommentsDeletionHeader"
|
android:id="@+id/enableCommentsDeletionHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsEnableCommentsDeletionText"
|
android:text="@string/settingsEnableCommentsDeletionText"
|
||||||
android:textColor="?attr/primaryTextColor" />
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/commentsDeletionSwitch"
|
android:id="@+id/commentsDeletionSwitch"
|
||||||
android:layout_toEndOf="@+id/enableCommentsDeletionHeader"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:switchMinWidth="56dp"
|
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_toEndOf="@+id/enableCommentsDeletionHeader"
|
||||||
|
android:gravity="end"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="25dp"
|
android:paddingEnd="25dp"
|
||||||
android:gravity="end"
|
android:switchMinWidth="56dp" />
|
||||||
android:layout_gravity="end"
|
|
||||||
android:layout_marginBottom="30dp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/enableCommentsDeletionHeader"
|
android:layout_below="@+id/enableCommentsDeletionHeader"
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="44dp"
|
android:layout_marginEnd="44dp"
|
||||||
android:text="@string/settingsEnableCommentsDeletionHintText"
|
android:text="@string/settingsEnableCommentsDeletionHintText"
|
||||||
android:textSize="12sp"
|
android:textColor="?attr/hintColor"
|
||||||
android:textColor="?attr/hintColor" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/layoutReportingView"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:background="?attr/primaryBackgroundColor">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:theme="@style/Widget.AppCompat.SearchView">
|
android:theme="@style/Widget.AppCompat.SearchView">
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
@ -24,10 +23,13 @@
|
|||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
android:layout_width="@dimen/close_button_size"
|
android:layout_width="@dimen/close_button_size"
|
||||||
android:layout_height="@dimen/close_button_size"
|
android:layout_height="@dimen/close_button_size"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginRight="15dp"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,9 +37,9 @@
|
|||||||
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:maxLines="1"
|
||||||
android:text="@string/settingsGeneralHeader"
|
android:text="@string/settingsGeneralHeader"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:maxLines="1"
|
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
@ -48,40 +50,41 @@
|
|||||||
android:id="@+id/setDefaultLinkHandler"
|
android:id="@+id/setDefaultLinkHandler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/generalDeepLinkDefaultScreen"
|
android:id="@+id/generalDeepLinkDefaultScreen"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/generalDeepLinkDefaultScreen"
|
android:text="@string/generalDeepLinkDefaultScreen"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="44dp"
|
android:layout_marginEnd="44dp"
|
||||||
android:text="@string/generalDeepLinkDefaultScreenHintText"
|
android:text="@string/generalDeepLinkDefaultScreenHintText"
|
||||||
android:textSize="12sp"
|
android:textColor="?attr/hintColor"
|
||||||
android:textColor="?attr/hintColor" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/generalDeepLinkSelected"
|
android:id="@+id/generalDeepLinkSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/generalDeepLinkSelectedText"
|
android:text="@string/generalDeepLinkSelectedText"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -89,29 +92,32 @@
|
|||||||
android:id="@+id/homeScreenFrame"
|
android:id="@+id/homeScreenFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/homeScreenHeaderSelector"
|
android:id="@+id/homeScreenHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsHomeScreenHeaderText"
|
android:text="@string/settingsHomeScreenHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/homeScreenSelected"
|
android:id="@+id/homeScreenSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsHomeScreenSelectedText"
|
android:text="@string/settingsHomeScreenSelectedText"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
android:id="@+id/layoutSettingsNotifications"
|
android:orientation="vertical">
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="?attr/primaryBackgroundColor">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:theme="@style/Widget.AppCompat.SearchView">
|
android:theme="@style/Widget.AppCompat.SearchView">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
@ -27,10 +26,13 @@
|
|||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
android:layout_width="@dimen/close_button_size"
|
android:layout_width="@dimen/close_button_size"
|
||||||
android:layout_height="@dimen/close_button_size"
|
android:layout_height="@dimen/close_button_size"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginRight="15dp"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -38,9 +40,9 @@
|
|||||||
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:maxLines="1"
|
||||||
android:text="@string/pageTitleNotifications"
|
android:text="@string/pageTitleNotifications"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:maxLines="1"
|
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
@ -51,8 +53,9 @@
|
|||||||
android:id="@+id/enableNotificationsFrame"
|
android:id="@+id/enableNotificationsFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/enableNotificationsHeader"
|
android:id="@+id/enableNotificationsHeader"
|
||||||
@ -66,15 +69,15 @@
|
|||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/enableNotificationsMode"
|
android:id="@+id/enableNotificationsMode"
|
||||||
android:layout_toEndOf="@+id/enableNotificationsHeader"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:switchMinWidth="56dp"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_toEndOf="@+id/enableNotificationsHeader"
|
||||||
|
android:gravity="end"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="25dp"
|
android:paddingEnd="25dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:switchMinWidth="56dp" />
|
||||||
android:gravity="end"
|
|
||||||
android:layout_gravity="end" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -82,29 +85,32 @@
|
|||||||
android:id="@+id/pollingDelayFrame"
|
android:id="@+id/pollingDelayFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/pollingDelayHeaderSelector"
|
android:id="@+id/pollingDelayHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:text="@string/notificationsPollingHeaderText"
|
android:text="@string/notificationsPollingHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor" />
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/pollingDelaySelected"
|
android:id="@+id/pollingDelaySelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:text="@string/pollingDelaySelectedText"
|
android:text="@string/pollingDelaySelectedText"
|
||||||
android:textColor="?attr/selectedTextColor" />
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -112,30 +118,31 @@
|
|||||||
android:id="@+id/enableLightsFrame"
|
android:id="@+id/enableLightsFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/enableLightsHeader"
|
android:id="@+id/enableLightsHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/enableLightsHeaderText"
|
android:text="@string/enableLightsHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor" />
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/enableLightsMode"
|
android:id="@+id/enableLightsMode"
|
||||||
android:layout_toEndOf="@+id/enableLightsHeader"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:switchMinWidth="56dp"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_toEndOf="@+id/enableLightsHeader"
|
||||||
|
android:gravity="end"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="25dp"
|
android:paddingEnd="25dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:switchMinWidth="56dp" />
|
||||||
android:gravity="end"
|
|
||||||
android:layout_gravity="end" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -143,24 +150,25 @@
|
|||||||
android:id="@+id/chooseColorFrame"
|
android:id="@+id/chooseColorFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/chooseColorHeader"
|
android:id="@+id/chooseColorHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/chooseColorSelectorHeader"
|
android:text="@string/chooseColorSelectorHeader"
|
||||||
android:textColor="?attr/primaryTextColor" />
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/chooseColorState"
|
android:id="@+id/chooseColorState"
|
||||||
android:layout_alignEnd="@id/chooseColorHeader"
|
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
|
android:layout_alignEnd="@id/chooseColorHeader"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginEnd="30dp"
|
android:layout_marginEnd="30dp"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
@ -173,30 +181,31 @@
|
|||||||
android:id="@+id/enableVibrationFrame"
|
android:id="@+id/enableVibrationFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/enableVibrationHeader"
|
android:id="@+id/enableVibrationHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/enableVibrationHeaderText"
|
android:text="@string/enableVibrationHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor" />
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/enableVibrationMode"
|
android:id="@+id/enableVibrationMode"
|
||||||
android:layout_toEndOf="@+id/enableVibrationHeader"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:switchMinWidth="56dp"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_toEndOf="@+id/enableVibrationHeader"
|
||||||
|
android:gravity="end"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="25dp"
|
android:paddingEnd="25dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:switchMinWidth="56dp" />
|
||||||
android:gravity="end"
|
|
||||||
android:layout_gravity="end" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/layoutReportingView"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:background="?attr/primaryBackgroundColor">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:theme="@style/Widget.AppCompat.SearchView">
|
android:theme="@style/Widget.AppCompat.SearchView">
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
@ -23,10 +22,13 @@
|
|||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
android:layout_width="@dimen/close_button_size"
|
android:layout_width="@dimen/close_button_size"
|
||||||
android:layout_height="@dimen/close_button_size"
|
android:layout_height="@dimen/close_button_size"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginRight="15dp"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -34,9 +36,9 @@
|
|||||||
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:maxLines="1"
|
||||||
android:text="@string/reportViewerHeader"
|
android:text="@string/reportViewerHeader"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:maxLines="1"
|
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
@ -47,31 +49,31 @@
|
|||||||
android:id="@+id/enableSendReports"
|
android:id="@+id/enableSendReports"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/enableReportsHeader"
|
android:id="@+id/enableReportsHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsEnableReportsText"
|
android:text="@string/settingsEnableReportsText"
|
||||||
android:textColor="?attr/primaryTextColor" />
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/crashReportsSwitch"
|
android:id="@+id/crashReportsSwitch"
|
||||||
android:layout_toEndOf="@+id/enableReportsHeader"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:switchMinWidth="56dp"
|
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_toEndOf="@+id/enableReportsHeader"
|
||||||
|
android:gravity="end"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="25dp"
|
android:paddingEnd="25dp"
|
||||||
android:gravity="end"
|
android:switchMinWidth="56dp" />
|
||||||
android:layout_gravity="end"
|
|
||||||
android:layout_marginBottom="30dp" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/layoutSettingsCerts"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:background="?attr/primaryBackgroundColor">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:theme="@style/Widget.AppCompat.SearchView">
|
android:theme="@style/Widget.AppCompat.SearchView">
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
@ -23,10 +22,13 @@
|
|||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
android:layout_width="@dimen/close_button_size"
|
android:layout_width="@dimen/close_button_size"
|
||||||
android:layout_height="@dimen/close_button_size"
|
android:layout_height="@dimen/close_button_size"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginRight="15dp"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -34,9 +36,9 @@
|
|||||||
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:maxLines="1"
|
||||||
android:text="@string/settingsSecurityHeader"
|
android:text="@string/settingsSecurityHeader"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:maxLines="1"
|
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
@ -47,30 +49,31 @@
|
|||||||
android:id="@+id/biometricFrame"
|
android:id="@+id/biometricFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/biometricHeader"
|
android:id="@+id/biometricHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsBiometricHeader"
|
android:text="@string/settingsBiometricHeader"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/switchBiometric"
|
android:id="@+id/switchBiometric"
|
||||||
android:layout_toEndOf="@+id/biometricHeader"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:switchMinWidth="56dp"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_toEndOf="@+id/biometricHeader"
|
||||||
|
android:gravity="end"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="24dp"
|
android:paddingEnd="24dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:switchMinWidth="56dp" />
|
||||||
android:gravity="end"
|
|
||||||
android:layout_gravity="end" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -78,19 +81,22 @@
|
|||||||
android:id="@+id/certsFrame"
|
android:id="@+id/certsFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvCertHeader"
|
android:id="@+id/tvCertHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsCertsSelectorHeader"
|
android:text="@string/settingsCertsSelectorHeader"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -98,29 +104,32 @@
|
|||||||
android:id="@+id/cacheSizeDataSelectionFrame"
|
android:id="@+id/cacheSizeDataSelectionFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cacheSizeDataHeaderSelector"
|
android:id="@+id/cacheSizeDataHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/cacheSizeDataSelectionHeaderText"
|
android:text="@string/cacheSizeDataSelectionHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cacheSizeDataSelected"
|
android:id="@+id/cacheSizeDataSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/cacheSizeDataSelectionSelectedText"
|
android:text="@string/cacheSizeDataSelectionSelectedText"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -128,29 +137,32 @@
|
|||||||
android:id="@+id/cacheSizeImagesSelectionFrame"
|
android:id="@+id/cacheSizeImagesSelectionFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cacheSizeImagesHeaderSelector"
|
android:id="@+id/cacheSizeImagesHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/cacheSizeImagesSelectionHeaderText"
|
android:text="@string/cacheSizeImagesSelectionHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cacheSizeImagesSelected"
|
android:id="@+id/cacheSizeImagesSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/cacheSizeImagesSelectionSelectedText"
|
android:text="@string/cacheSizeImagesSelectionSelectedText"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -158,29 +170,32 @@
|
|||||||
android:id="@+id/clearCacheSelectionFrame"
|
android:id="@+id/clearCacheSelectionFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/clearCacheHeaderSelector"
|
android:id="@+id/clearCacheHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/clearCacheSelectionHeaderText"
|
android:text="@string/clearCacheSelectionHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/clearCacheSelected"
|
android:id="@+id/clearCacheSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/clearCacheSelectionSelectedText"
|
android:text="@string/clearCacheSelectionSelectedText"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
android:theme="@style/Widget.AppCompat.SearchView">
|
android:theme="@style/Widget.AppCompat.SearchView">
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
@ -22,10 +23,13 @@
|
|||||||
android:id="@+id/close"
|
android:id="@+id/close"
|
||||||
android:layout_width="@dimen/close_button_size"
|
android:layout_width="@dimen/close_button_size"
|
||||||
android:layout_height="@dimen/close_button_size"
|
android:layout_height="@dimen/close_button_size"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginRight="15dp"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -33,9 +37,9 @@
|
|||||||
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:maxLines="1"
|
||||||
android:text="@string/settingsLanguageHeaderText"
|
android:text="@string/settingsLanguageHeaderText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:maxLines="1"
|
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
@ -46,41 +50,44 @@
|
|||||||
android:id="@+id/langFrame"
|
android:id="@+id/langFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvLanguageHeaderSelector"
|
android:id="@+id/tvLanguageHeaderSelector"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsLanguageSelectorHeader"
|
android:text="@string/settingsLanguageSelectorHeader"
|
||||||
android:textColor="?attr/primaryTextColor"/>
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvLanguageSelected"
|
android:id="@+id/tvLanguageSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/settingsLanguageSelectedHeaderDefault"
|
android:text="@string/settingsLanguageSelectedHeaderDefault"
|
||||||
android:textColor="?attr/selectedTextColor"/>
|
android:textColor="?attr/selectedTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/helpTranslate"
|
android:id="@+id/helpTranslate"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="44dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:autoLink="web"
|
android:autoLink="web"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:text="@string/settingsHelpTranslateText"
|
android:text="@string/settingsHelpTranslateText"
|
||||||
android:textColor="@color/lightBlue"/>
|
android:textColor="@color/lightBlue"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -15,19 +15,22 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/createNewUser"
|
android:id="@+id/createNewUser"
|
||||||
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:text="@string/adminCreateNewUser"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/adminCreateNewUser"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_person_add" />
|
app:drawableStartCompat="@drawable/ic_person_add" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -15,19 +15,22 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/deleteAllDrafts"
|
android:id="@+id/deleteAllDrafts"
|
||||||
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:text="@string/deleteAllDrafts"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/deleteAllDrafts"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_delete" />
|
app:drawableStartCompat="@drawable/ic_delete" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,9 +23,12 @@
|
|||||||
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:text="@string/editFile"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
|
android:text="@string/editFile"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:drawableStartCompat="@drawable/ic_edit" />
|
app:drawableStartCompat="@drawable/ic_edit" />
|
||||||
@ -35,9 +38,12 @@
|
|||||||
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:text="@string/deleteFile"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
|
android:text="@string/deleteFile"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:drawableStartCompat="@drawable/ic_delete" />
|
app:drawableStartCompat="@drawable/ic_delete" />
|
||||||
@ -47,11 +53,14 @@
|
|||||||
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:text="@string/downloadFile"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/downloadFile"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_download" />
|
app:drawableStartCompat="@drawable/ic_download" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -30,11 +30,14 @@
|
|||||||
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:text="@string/menuEditText"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/menuEditText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_edit" />
|
app:drawableStartCompat="@drawable/ic_edit" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -42,11 +45,14 @@
|
|||||||
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:text="@string/menuDeleteText"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/menuDeleteText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_delete" />
|
app:drawableStartCompat="@drawable/ic_delete" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -54,11 +60,14 @@
|
|||||||
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:text="@string/menuQuoteText"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/menuQuoteText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_comment" />
|
app:drawableStartCompat="@drawable/ic_comment" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -66,11 +75,14 @@
|
|||||||
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:text="@string/copyCommentText"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/copyCommentText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_copy" />
|
app:drawableStartCompat="@drawable/ic_copy" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -78,11 +90,14 @@
|
|||||||
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:text="@string/issueCommentShare"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/issueCommentShare"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_share" />
|
app:drawableStartCompat="@drawable/ic_share" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -90,11 +105,14 @@
|
|||||||
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:text="@string/genericCopyUrl"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/genericCopyUrl"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_link" />
|
app:drawableStartCompat="@drawable/ic_link" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
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:text="@string/isOpen"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/isOpen"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_issue" />
|
app:drawableStartCompat="@drawable/ic_issue" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,11 +38,14 @@
|
|||||||
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:text="@string/isClosed"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/isClosed"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_done" />
|
app:drawableStartCompat="@drawable/ic_done" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
android:id="@+id/bottomSheetHeader"
|
android:id="@+id/bottomSheetHeader"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/labelName"
|
|
||||||
android:paddingStart="18dp"
|
android:paddingStart="18dp"
|
||||||
android:paddingEnd="18dp"
|
android:paddingEnd="18dp"
|
||||||
android:paddingBottom="18dp"
|
android:paddingBottom="18dp"
|
||||||
|
android:text="@string/labelName"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
@ -41,11 +41,14 @@
|
|||||||
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:text="@string/labelMenuEdit"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/labelMenuEdit"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_edit" />
|
app:drawableStartCompat="@drawable/ic_edit" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -53,11 +56,14 @@
|
|||||||
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:text="@string/labelMenuDelete"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/labelMenuDelete"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_delete" />
|
app:drawableStartCompat="@drawable/ic_delete" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
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:text="@string/isOpen"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/isOpen"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_milestone" />
|
app:drawableStartCompat="@drawable/ic_milestone" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,11 +38,14 @@
|
|||||||
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:text="@string/isClosed"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/isClosed"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_done" />
|
app:drawableStartCompat="@drawable/ic_done" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
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:text="@string/closeMilestone"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/closeMilestone"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_close" />
|
app:drawableStartCompat="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,11 +38,14 @@
|
|||||||
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:text="@string/openMilestone"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/openMilestone"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_check" />
|
app:drawableStartCompat="@drawable/ic_check" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@ android:background="?attr/primaryBackgroundColor">
|
|||||||
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:text="@string/pinNotification"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/pinNotification"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_pin" />
|
app:drawableStartCompat="@drawable/ic_pin" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,11 +38,14 @@ android:background="?attr/primaryBackgroundColor">
|
|||||||
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:text="@string/markAsRead"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/markAsRead"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_unwatch" />
|
app:drawableStartCompat="@drawable/ic_unwatch" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -47,11 +53,14 @@ android:background="?attr/primaryBackgroundColor">
|
|||||||
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:text="@string/markAsUnread"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/markAsUnread"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_watchers" />
|
app:drawableStartCompat="@drawable/ic_watchers" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
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:text="@string/isUnread"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/isUnread"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_watchers" />
|
app:drawableStartCompat="@drawable/ic_watchers" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,11 +38,14 @@
|
|||||||
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:text="@string/isRead"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/isRead"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_unwatch" />
|
app:drawableStartCompat="@drawable/ic_unwatch" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
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:text="@string/createRepository"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/createRepository"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_repo" />
|
app:drawableStartCompat="@drawable/ic_repo" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,11 +38,14 @@
|
|||||||
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:text="@string/createLabel"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/createLabel"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_label" />
|
app:drawableStartCompat="@drawable/ic_label" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -47,11 +53,14 @@
|
|||||||
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:text="@string/orgCreateTeam"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/orgCreateTeam"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_people" />
|
app:drawableStartCompat="@drawable/ic_people" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -59,11 +68,14 @@
|
|||||||
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:text="@string/genericCopyUrl"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/genericCopyUrl"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_copy" />
|
app:drawableStartCompat="@drawable/ic_copy" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
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:text="@string/addNewMember"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/addNewMember"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_person_add" />
|
app:drawableStartCompat="@drawable/ic_person_add" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
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:text="@string/profileCreateNewEmailAddress"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/profileCreateNewEmailAddress"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_email" />
|
app:drawableStartCompat="@drawable/ic_email" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
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:text="@string/isOpen"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/isOpen"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_pull_request" />
|
app:drawableStartCompat="@drawable/ic_pull_request" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -35,11 +38,14 @@
|
|||||||
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:text="@string/isClosed"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/isClosed"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_done" />
|
app:drawableStartCompat="@drawable/ic_done" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -31,8 +31,10 @@
|
|||||||
android:layout_height="26dp"
|
android:layout_height="26dp"
|
||||||
android:layout_marginEnd="15dp"
|
android:layout_marginEnd="15dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_close" />
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -52,6 +54,8 @@
|
|||||||
android:layout_marginStart="15dp"
|
android:layout_marginStart="15dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
android:src="@drawable/ic_drafts" />
|
android:src="@drawable/ic_drafts" />
|
||||||
|
|
||||||
@ -63,6 +67,8 @@
|
|||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:alpha=".5"
|
android:alpha=".5"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:contentDescription="@string/close"
|
android:contentDescription="@string/close"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:src="@drawable/ic_send" />
|
android:src="@drawable/ic_send" />
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:text="@string/pageTitleNewFile"
|
android:text="@string/pageTitleNewFile"
|
||||||
@ -35,6 +38,9 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:text="@string/pageTitleCreateNewIssue"
|
android:text="@string/pageTitleCreateNewIssue"
|
||||||
@ -47,6 +53,9 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:text="@string/pageTitleNewPullRequest"
|
android:text="@string/pageTitleNewPullRequest"
|
||||||
@ -59,11 +68,14 @@
|
|||||||
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:text="@string/pageTitleCreateMilestone"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/pageTitleCreateMilestone"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_milestone" />
|
app:drawableStartCompat="@drawable/ic_milestone" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -71,11 +83,14 @@
|
|||||||
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:text="@string/createLabel"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/createLabel"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_label" />
|
app:drawableStartCompat="@drawable/ic_label" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -83,11 +98,14 @@
|
|||||||
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:text="@string/createRelease"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/createRelease"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_release" />
|
app:drawableStartCompat="@drawable/ic_release" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -103,11 +121,14 @@
|
|||||||
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:text="@string/addCollaboratorTitle"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/addCollaboratorTitle"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_person_add" />
|
app:drawableStartCompat="@drawable/ic_person_add" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -115,11 +136,14 @@
|
|||||||
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:text="@string/starRepository"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/starRepository"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_star_unfilled" />
|
app:drawableStartCompat="@drawable/ic_star_unfilled" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -127,11 +151,14 @@
|
|||||||
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:text="@string/unStarRepository"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/unStarRepository"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_star" />
|
app:drawableStartCompat="@drawable/ic_star" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -139,11 +166,14 @@
|
|||||||
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:text="@string/watchRepository"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/watchRepository"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_unwatch" />
|
app:drawableStartCompat="@drawable/ic_unwatch" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -151,11 +181,14 @@
|
|||||||
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:text="@string/unWatchRepository"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/unWatchRepository"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_watchers" />
|
app:drawableStartCompat="@drawable/ic_watchers" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -171,11 +204,14 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
android:text="@string/genericCopyUrl"
|
android:text="@string/genericCopyUrl"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_copy" />
|
app:drawableStartCompat="@drawable/ic_copy" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -183,11 +219,14 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
android:text="@string/shareRepository"
|
android:text="@string/shareRepository"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_share" />
|
app:drawableStartCompat="@drawable/ic_share" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -195,11 +234,14 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
android:text="@string/openWebRepo"
|
android:text="@string/openWebRepo"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_browser" />
|
app:drawableStartCompat="@drawable/ic_browser" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -216,11 +258,14 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
android:text="@string/navSettings"
|
android:text="@string/navSettings"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_settings" />
|
app:drawableStartCompat="@drawable/ic_settings" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@ -30,24 +31,31 @@
|
|||||||
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:text="@string/openFileDiffText"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/openFileDiffText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:padding="12dp"
|
app:drawableStartCompat="@drawable/ic_file"
|
||||||
app:drawableStartCompat="@drawable/ic_file" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/mergePullRequest"
|
android:id="@+id/mergePullRequest"
|
||||||
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:text="@string/mergePullRequestText"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/mergePullRequestText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_pull_request" />
|
app:drawableStartCompat="@drawable/ic_pull_request" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -55,11 +63,14 @@
|
|||||||
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:text="@string/editIssue"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/editIssue"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_edit" />
|
app:drawableStartCompat="@drawable/ic_edit" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -67,11 +78,14 @@
|
|||||||
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:text="@string/addRemoveAssignees"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/addRemoveAssignees"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_person_add" />
|
app:drawableStartCompat="@drawable/ic_person_add" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -79,11 +93,14 @@
|
|||||||
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:text="@string/singleIssueEditLabels"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/singleIssueEditLabels"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_label" />
|
app:drawableStartCompat="@drawable/ic_label" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -91,11 +108,14 @@
|
|||||||
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:text="@string/singleIssueSubscribe"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/singleIssueSubscribe"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_unwatch" />
|
app:drawableStartCompat="@drawable/ic_unwatch" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -103,13 +123,17 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
android:text="@string/singleIssueUnSubscribe"
|
android:text="@string/singleIssueUnSubscribe"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:padding="12dp"
|
app:drawableStartCompat="@drawable/ic_watchers"
|
||||||
app:drawableStartCompat="@drawable/ic_watchers" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -124,11 +148,14 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
android:text="@string/shareIssue"
|
android:text="@string/shareIssue"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_share" />
|
app:drawableStartCompat="@drawable/ic_share" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -136,11 +163,14 @@
|
|||||||
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:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
android:text="@string/copyIssueUrl"
|
android:text="@string/copyIssueUrl"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_copy" />
|
app:drawableStartCompat="@drawable/ic_copy" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -156,11 +186,14 @@
|
|||||||
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:text="@string/closeIssue"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/closeIssue"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="12dp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_issue_closed" />
|
app:drawableStartCompat="@drawable/ic_issue_closed" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -168,13 +201,17 @@
|
|||||||
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:text="@string/reOpenIssue"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/reOpenIssue"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:padding="12dp"
|
app:drawableStartCompat="@drawable/ic_reopen"
|
||||||
app:drawableStartCompat="@drawable/ic_reopen" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -94,17 +94,18 @@
|
|||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:theme="@style/AppTheme.AppBarOverlay">
|
android:theme="@style/AppTheme.AppBarOverlay"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/tabs"
|
android:id="@+id/tabs"
|
||||||
app:tabMode="scrollable"
|
|
||||||
app:tabTextAppearance="@style/customTabLayout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
app:tabTextColor="?attr/primaryTextColor"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/primaryBackgroundColor"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
app:tabIndicatorColor="?attr/pagerTabIndicatorColor"
|
app:tabIndicatorColor="?attr/pagerTabIndicatorColor"
|
||||||
android:layout_height="wrap_content">
|
app:tabMode="scrollable"
|
||||||
|
app:tabTextAppearance="@style/customTabLayout"
|
||||||
|
app:tabTextColor="?attr/primaryTextColor">
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem
|
<com.google.android.material.tabs.TabItem
|
||||||
android:id="@+id/profileTabFollowers"
|
android:id="@+id/profileTabFollowers"
|
||||||
|
@ -102,6 +102,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
@ -124,6 +127,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
@ -146,6 +152,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
@ -168,6 +177,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -14,15 +14,20 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/settingsMainFrame"
|
android:id="@+id/settingsMainFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_height="wrap_content">
|
android:paddingTop="10dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/generalFrame"
|
android:id="@+id/generalFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp">
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvGeneral"
|
android:id="@+id/tvGeneral"
|
||||||
@ -52,9 +57,13 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/appearanceFrame"
|
android:id="@+id/appearanceFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp">
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvAppearance"
|
android:id="@+id/tvAppearance"
|
||||||
@ -85,8 +94,12 @@
|
|||||||
android:id="@+id/draftsFrame"
|
android:id="@+id/draftsFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginTop="25dp">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/draftsHeader"
|
android:id="@+id/draftsHeader"
|
||||||
@ -117,8 +130,12 @@
|
|||||||
android:id="@+id/securityFrame"
|
android:id="@+id/securityFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginTop="25dp">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvSecurity"
|
android:id="@+id/tvSecurity"
|
||||||
@ -137,9 +154,9 @@
|
|||||||
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:text="@string/securityHintText"
|
|
||||||
android:paddingStart="60dp"
|
android:paddingStart="60dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
|
android:text="@string/securityHintText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
@ -149,8 +166,12 @@
|
|||||||
android:id="@+id/notificationsFrame"
|
android:id="@+id/notificationsFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -182,8 +203,12 @@
|
|||||||
android:id="@+id/languagesFrame"
|
android:id="@+id/languagesFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginTop="25dp">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvLanguages"
|
android:id="@+id/tvLanguages"
|
||||||
@ -202,9 +227,9 @@
|
|||||||
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:text="@string/languagesHintText"
|
|
||||||
android:paddingStart="60dp"
|
android:paddingStart="60dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
|
android:text="@string/languagesHintText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
@ -214,8 +239,12 @@
|
|||||||
android:id="@+id/reportsFrame"
|
android:id="@+id/reportsFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginTop="25dp">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/appReports"
|
android:id="@+id/appReports"
|
||||||
@ -234,9 +263,9 @@
|
|||||||
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:text="@string/reportsHintText"
|
|
||||||
android:paddingStart="60dp"
|
android:paddingStart="60dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
|
android:text="@string/reportsHintText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
@ -246,29 +275,33 @@
|
|||||||
android:id="@+id/rateAppFrame"
|
android:id="@+id/rateAppFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginTop="25dp">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/rateApp"
|
android:id="@+id/rateApp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawableStart="@drawable/ic_like"
|
|
||||||
android:drawablePadding="24dp"
|
android:drawablePadding="24dp"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
android:text="@string/navRate"
|
android:text="@string/navRate"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp"
|
||||||
|
app:drawableStartCompat="@drawable/ic_like" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/rateAppHintText"
|
android:id="@+id/rateAppHintText"
|
||||||
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:text="@string/rateAppHintText"
|
|
||||||
android:paddingStart="60dp"
|
android:paddingStart="60dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
|
android:text="@string/rateAppHintText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
@ -278,9 +311,12 @@
|
|||||||
android:id="@+id/aboutAppFrame"
|
android:id="@+id/aboutAppFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginTop="25dp"
|
android:paddingTop="10dp"
|
||||||
android:layout_marginBottom="20dp">
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/aboutApp"
|
android:id="@+id/aboutApp"
|
||||||
@ -299,9 +335,9 @@
|
|||||||
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:text="@string/aboutAppHintText"
|
|
||||||
android:paddingStart="60dp"
|
android:paddingStart="60dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
|
android:text="@string/aboutAppHintText"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
||||||
<string name="chooseColorSelectorHeader">Choose Color</string>
|
<string name="chooseColorSelectorHeader">Choose Color</string>
|
||||||
<string name="newMessages">New messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
||||||
<string name="chooseColorSelectorHeader">Choose Color</string>
|
<string name="chooseColorSelectorHeader">Choose Color</string>
|
||||||
<string name="newMessages">New messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Aktiviere Hell</string>
|
<string name="enableLightsHeaderText">Aktiviere Hell</string>
|
||||||
<string name="enableVibrationHeaderText">Vibration aktivieren</string>
|
<string name="enableVibrationHeaderText">Vibration aktivieren</string>
|
||||||
<string name="chooseColorSelectorHeader">Farbe auswählen</string>
|
<string name="chooseColorSelectorHeader">Farbe auswählen</string>
|
||||||
<string name="newMessages">Neue Nachrichten</string>
|
<string name="newMessages">Neue Nachrichten für %s</string>
|
||||||
<string name="youHaveGotNewNotifications">Du hast %d neue Nachrichten.</string>
|
<string name="youHaveGotNewNotifications">Du hast %d neue Nachrichten.</string>
|
||||||
<string name="mainNotificationChannelName">Benachrichtigungen</string>
|
<string name="mainNotificationChannelName">Benachrichtigungen</string>
|
||||||
<string name="mainNotificationChannelDescription">Das ist der Haupt-Nachrichten-Kanal von GitNex.</string>
|
<string name="mainNotificationChannelDescription">Das ist der Haupt-Nachrichten-Kanal von GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
||||||
<string name="chooseColorSelectorHeader">Choose Color</string>
|
<string name="chooseColorSelectorHeader">Choose Color</string>
|
||||||
<string name="newMessages">New messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -560,7 +560,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">فعالسازی لرزش</string>
|
<string name="enableVibrationHeaderText">فعالسازی لرزش</string>
|
||||||
<string name="chooseColorSelectorHeader">انتخاب رنگ</string>
|
<string name="chooseColorSelectorHeader">انتخاب رنگ</string>
|
||||||
<string name="newMessages">پیامهای جدید</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
||||||
<string name="chooseColorSelectorHeader">Choose Color</string>
|
<string name="chooseColorSelectorHeader">Choose Color</string>
|
||||||
<string name="newMessages">New messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Activer le témoin lumineux</string>
|
<string name="enableLightsHeaderText">Activer le témoin lumineux</string>
|
||||||
<string name="enableVibrationHeaderText">Activer le vibreur</string>
|
<string name="enableVibrationHeaderText">Activer le vibreur</string>
|
||||||
<string name="chooseColorSelectorHeader">Couleur</string>
|
<string name="chooseColorSelectorHeader">Couleur</string>
|
||||||
<string name="newMessages">Nouveaux messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">Vous avez %d nouvelles notifications.</string>
|
<string name="youHaveGotNewNotifications">Vous avez %d nouvelles notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">Le canal de notifications principal de GitNex.</string>
|
<string name="mainNotificationChannelDescription">Le canal de notifications principal de GitNex.</string>
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
<string name="malformedUrl">Impossibile connettersi all\'host. Controlla l\'URL o la porta per eventuali errori</string>
|
<string name="malformedUrl">Impossibile connettersi all\'host. Controlla l\'URL o la porta per eventuali errori</string>
|
||||||
<string name="protocolError">Non si consiglia di utilizzare il protocollo HTTP a meno che non si stia testando sulla rete locale</string>
|
<string name="protocolError">Non si consiglia di utilizzare il protocollo HTTP a meno che non si stia testando sulla rete locale</string>
|
||||||
<string name="malformedJson">Malformed JSON was received. Server response was not successful</string>
|
<string name="malformedJson">Malformed JSON was received. Server response was not successful</string>
|
||||||
<string name="emptyFieldURL">Istanza
|
<string name="emptyFieldURL">Istanza
|
||||||
URL è richiesto</string>
|
URL è richiesto</string>
|
||||||
<string name="emptyFieldUsername">Nome utente obbligatorio</string>
|
<string name="emptyFieldUsername">Nome utente obbligatorio</string>
|
||||||
<string name="emptyFieldPassword">Password obbligatoria</string>
|
<string name="emptyFieldPassword">Password obbligatoria</string>
|
||||||
@ -274,7 +274,7 @@ URL è richiesto</string>
|
|||||||
<string name="newTeamPermissionAdmin">I membri possono inviare i repository del team e aggiungere loro collaboratori</string>
|
<string name="newTeamPermissionAdmin">I membri possono inviare i repository del team e aggiungere loro collaboratori</string>
|
||||||
<string name="teamNameEmpty">Inserisci il nome del team</string>
|
<string name="teamNameEmpty">Inserisci il nome del team</string>
|
||||||
<string name="teamNameError">Il nome del team deve contenere solo caratteri alfanumerici, trattino (-), trattino basso (_) e punto (.)</string>
|
<string name="teamNameError">Il nome del team deve contenere solo caratteri alfanumerici, trattino (-), trattino basso (_) e punto (.)</string>
|
||||||
<string name="teamPermissionEmpty">Seleziona
|
<string name="teamPermissionEmpty">Seleziona
|
||||||
autorizzazione</string>
|
autorizzazione</string>
|
||||||
<string name="teamDescError">La descrizione del team contiene caratteri non validi</string>
|
<string name="teamDescError">La descrizione del team contiene caratteri non validi</string>
|
||||||
<string name="teamDescLimit">La descrizione del team ha più di 100 caratteri</string>
|
<string name="teamDescLimit">La descrizione del team ha più di 100 caratteri</string>
|
||||||
@ -559,7 +559,7 @@ autorizzazione</string>
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Abilita la vibrazione</string>
|
<string name="enableVibrationHeaderText">Abilita la vibrazione</string>
|
||||||
<string name="chooseColorSelectorHeader">Scegli il colore</string>
|
<string name="chooseColorSelectorHeader">Scegli il colore</string>
|
||||||
<string name="newMessages">Nuovi messaggi</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifiche</string>
|
<string name="mainNotificationChannelName">Notifiche</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
||||||
<string name="chooseColorSelectorHeader">Choose Color</string>
|
<string name="chooseColorSelectorHeader">Choose Color</string>
|
||||||
<string name="newMessages">New messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
||||||
<string name="chooseColorSelectorHeader">Choose Color</string>
|
<string name="chooseColorSelectorHeader">Choose Color</string>
|
||||||
<string name="newMessages">New messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
||||||
<string name="chooseColorSelectorHeader">Choose Color</string>
|
<string name="chooseColorSelectorHeader">Choose Color</string>
|
||||||
<string name="newMessages">New messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
@ -557,7 +557,7 @@
|
|||||||
<string name="enableLightsHeaderText">Enable Light</string>
|
<string name="enableLightsHeaderText">Enable Light</string>
|
||||||
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
<string name="enableVibrationHeaderText">Enable Vibration</string>
|
||||||
<string name="chooseColorSelectorHeader">Choose Color</string>
|
<string name="chooseColorSelectorHeader">Choose Color</string>
|
||||||
<string name="newMessages">New messages</string>
|
<string name="newMessages">New messages for %s</string>
|
||||||
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
<string name="youHaveGotNewNotifications">You\'ve got %d new notifications.</string>
|
||||||
<string name="mainNotificationChannelName">Notifications</string>
|
<string name="mainNotificationChannelName">Notifications</string>
|
||||||
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
<string name="mainNotificationChannelDescription">This is the main notification channel of GitNex.</string>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user