Add popup for new email, fix color highlighting and many more improvements (#1355)

Closes #1352

Temp fixes #1351

Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1355
Co-authored-by: M M Arif <mmarif@swatian.com>
Co-committed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
M M Arif 2024-04-25 07:42:51 +00:00 committed by M M Arif
parent 8a95185cb8
commit 36b45df849
41 changed files with 280 additions and 292 deletions

View File

@ -54,10 +54,6 @@
android:name=".activities.CreateNewUserActivity"
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"
android:windowSoftInputMode="adjustResize"/>
<activity
android:name=".activities.AccountSettingsEmailActivity"
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"
android:windowSoftInputMode="adjustResize"/>
<activity
android:name=".activities.AddCollaboratorToRepositoryActivity"
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>

View File

@ -1,134 +0,0 @@
package org.mian.gitnex.activities;
import android.os.Bundle;
import android.os.Handler;
import android.util.Patterns;
import androidx.annotation.NonNull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import org.gitnex.tea4j.v2.models.CreateEmailOption;
import org.gitnex.tea4j.v2.models.Email;
import org.mian.gitnex.R;
import org.mian.gitnex.clients.RetrofitClient;
import org.mian.gitnex.databinding.ActivityAccountSettingsEmailBinding;
import org.mian.gitnex.fragments.AccountSettingsEmailsFragment;
import org.mian.gitnex.helpers.AlertDialogs;
import org.mian.gitnex.helpers.SnackBar;
import retrofit2.Call;
import retrofit2.Callback;
/**
* @author M M Arif
*/
public class AccountSettingsEmailActivity extends BaseActivity {
private ActivityAccountSettingsEmailBinding activityAccountSettingsEmailBinding;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
activityAccountSettingsEmailBinding =
ActivityAccountSettingsEmailBinding.inflate(getLayoutInflater());
setContentView(activityAccountSettingsEmailBinding.getRoot());
activityAccountSettingsEmailBinding.topAppBar.setNavigationOnClickListener(v -> finish());
activityAccountSettingsEmailBinding.topAppBar.setOnMenuItemClickListener(
menuItem -> {
int id = menuItem.getItemId();
if (id == R.id.save) {
processAddNewEmail();
return true;
} else {
return super.onOptionsItemSelected(menuItem);
}
});
}
private void processAddNewEmail() {
String newUserEmail =
Objects.requireNonNull(activityAccountSettingsEmailBinding.userEmail.getText())
.toString()
.trim();
if (newUserEmail.equals("")) {
SnackBar.error(
ctx, findViewById(android.R.id.content), getString(R.string.emailErrorEmpty));
return;
} else if (!Patterns.EMAIL_ADDRESS.matcher(newUserEmail).matches()) {
SnackBar.error(
ctx, findViewById(android.R.id.content), getString(R.string.emailErrorInvalid));
return;
}
List<String> newEmailList = new ArrayList<>(Arrays.asList(newUserEmail.split(",")));
addNewEmail(newEmailList);
}
private void addNewEmail(List<String> newUserEmail) {
CreateEmailOption addEmailFunc = new CreateEmailOption();
addEmailFunc.setEmails(newUserEmail);
Call<List<Email>> call = RetrofitClient.getApiInterface(ctx).userAddEmail(addEmailFunc);
call.enqueue(
new Callback<>() {
@Override
public void onResponse(
@NonNull Call<List<Email>> call,
@NonNull retrofit2.Response<List<Email>> response) {
if (response.code() == 201) {
SnackBar.info(
ctx,
findViewById(android.R.id.content),
getString(R.string.emailAddedText));
AccountSettingsEmailsFragment.refreshEmails = true;
new Handler().postDelayed(() -> finish(), 3000);
} else if (response.code() == 401) {
AlertDialogs.authorizationTokenRevokedDialog(ctx);
} else if (response.code() == 403) {
SnackBar.error(
ctx,
findViewById(android.R.id.content),
getString(R.string.authorizeError));
} else if (response.code() == 404) {
SnackBar.error(
ctx,
findViewById(android.R.id.content),
getString(R.string.apiNotFound));
} else if (response.code() == 422) {
SnackBar.error(
ctx,
findViewById(android.R.id.content),
getString(R.string.emailErrorInUse));
} else {
SnackBar.error(
ctx,
findViewById(android.R.id.content),
getString(R.string.genericError));
}
}
@Override
public void onFailure(@NonNull Call<List<Email>> call, @NonNull Throwable t) {}
});
}
}

View File

@ -67,6 +67,9 @@ public class CreateNoteActivity extends BaseActivity {
notes = notesApi.fetchNoteById(noteId);
binding.noteContent.setText(notes.getContent());
assert notes.getContent() != null;
binding.noteContent.setSelection(notes.getContent().length());
binding.markdownPreview.setVisibility(View.GONE);
binding.toolbarTitle.setText(R.string.editNote);

View File

@ -26,6 +26,7 @@ import com.google.android.material.navigation.NavigationView;
import java.util.ArrayList;
import java.util.List;
import org.gitnex.tea4j.v2.models.GeneralAPISettings;
import org.gitnex.tea4j.v2.models.GeneralAttachmentSettings;
import org.gitnex.tea4j.v2.models.NotificationCount;
import org.gitnex.tea4j.v2.models.ServerVersion;
import org.gitnex.tea4j.v2.models.User;
@ -548,6 +549,7 @@ public class MainActivity extends BaseActivity
giteaVersion();
serverPageLimitSettings();
updateGeneralAttachmentSettings();
}
},
1500);
@ -568,6 +570,8 @@ public class MainActivity extends BaseActivity
public void handleOnBackPressed() {
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
finish();
}
}
};
@ -792,6 +796,46 @@ public class MainActivity extends BaseActivity
return super.onOptionsItemSelected(item);
}
private void updateGeneralAttachmentSettings() {
Call<GeneralAttachmentSettings> generalAttachmentSettings =
RetrofitClient.getApiInterface(ctx).getGeneralAttachmentSettings();
generalAttachmentSettings.enqueue(
new Callback<>() {
@Override
public void onResponse(
@NonNull final Call<GeneralAttachmentSettings> generalAPISettings,
@NonNull retrofit2.Response<GeneralAttachmentSettings> response) {
if (response.code() == 200 && response.body() != null) {
int max_size = 2;
int max_files = 5;
if (response.body().getMaxSize() != null) {
max_size = Math.toIntExact(response.body().getMaxSize());
}
if (response.body().getMaxFiles() != null) {
max_files = Math.toIntExact(response.body().getMaxFiles());
}
BaseApi.getInstance(ctx, UserAccountsApi.class)
.updateGeneralAttachmentSettings(
max_size,
max_files,
tinyDB.getInt("currentActiveAccountId"));
}
}
@Override
public void onFailure(
@NonNull Call<GeneralAttachmentSettings> generalAPISettings,
@NonNull Throwable t) {}
});
}
private void serverPageLimitSettings() {
Call<GeneralAPISettings> generalAPISettings =

View File

@ -53,6 +53,14 @@ public class UserAccountsApi extends BaseApi {
maxResponseItems, defaultPagingNumber, accountId));
}
public void updateGeneralAttachmentSettings(
final int maxAttachmentsSize, final int maxNumberOfAttachments, final int accountId) {
executorService.execute(
() ->
userAccountsDao.updateGeneralAttachmentSettings(
maxAttachmentsSize, maxNumberOfAttachments, accountId));
}
public void updateToken(final int accountId, final String token) {
executorService.execute(() -> userAccountsDao.updateAccountToken(accountId, token));
}

View File

@ -47,6 +47,11 @@ public interface UserAccountsDao {
"UPDATE UserAccounts SET maxResponseItems = :maxResponseItems, defaultPagingNumber = :defaultPagingNumber WHERE accountId = :accountId")
void updateServerPagingLimit(int maxResponseItems, int defaultPagingNumber, int accountId);
@Query(
"UPDATE UserAccounts SET maxAttachmentsSize = :maxAttachmentsSize, maxNumberOfAttachments = :maxNumberOfAttachments WHERE accountId = :accountId")
void updateGeneralAttachmentSettings(
int maxAttachmentsSize, int maxNumberOfAttachments, int accountId);
@Query("UPDATE UserAccounts SET accountName = :accountName WHERE accountId = :accountId")
void updateAccountName(String accountName, int accountId);

View File

@ -29,7 +29,7 @@ import org.mian.gitnex.database.models.UserAccount;
Notes.class,
AppSettings.class
},
version = 8,
version = 9,
exportSchema = false)
public abstract class GitnexDatabase extends RoomDatabase {
@ -97,6 +97,18 @@ public abstract class GitnexDatabase extends RoomDatabase {
"CREATE TABLE IF NOT EXISTS 'appSettings' ('settingId' INTEGER NOT NULL, 'settingKey' TEXT, 'settingValue' TEXT, 'settingDefault' TEXT, PRIMARY KEY('settingId'))");
}
};
private static final Migration MIGRATION_8_9 =
new Migration(8, 9) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase database) {
database.execSQL(
"ALTER TABLE 'userAccounts' ADD COLUMN 'maxAttachmentsSize' INTEGER NOT NULL DEFAULT 2");
database.execSQL(
"ALTER TABLE 'userAccounts' ADD COLUMN 'maxNumberOfAttachments' INTEGER NOT NULL DEFAULT 5");
}
};
private static volatile GitnexDatabase gitnexDatabase;
public static GitnexDatabase getDatabaseInstance(Context context) {
@ -116,7 +128,8 @@ public abstract class GitnexDatabase extends RoomDatabase {
MIGRATION_4_5,
MIGRATION_5_6,
MIGRATION_6_7,
MIGRATION_7_8)
MIGRATION_7_8,
MIGRATION_8_9)
.build();
}
}

View File

@ -22,6 +22,8 @@ public class UserAccount implements Serializable {
private boolean isLoggedIn;
private int maxResponseItems;
private int defaultPagingNumber;
private int maxAttachmentsSize;
private int maxNumberOfAttachments;
public int getAccountId() {
return accountId;
@ -94,4 +96,20 @@ public class UserAccount implements Serializable {
public void setDefaultPagingNumber(int defaultPagingNumber) {
this.defaultPagingNumber = defaultPagingNumber;
}
public int getMaxAttachmentsSize() {
return maxAttachmentsSize;
}
public void setMaxAttachmentsSize(int maxAttachmentsSize) {
this.maxAttachmentsSize = maxAttachmentsSize;
}
public int getMaxNumberOfAttachments() {
return maxNumberOfAttachments;
}
public void setMaxNumberOfAttachments(int maxNumberOfAttachments) {
this.maxNumberOfAttachments = maxNumberOfAttachments;
}
}

View File

@ -1,7 +1,7 @@
package org.mian.gitnex.fragments;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@ -9,14 +9,28 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import org.mian.gitnex.activities.AccountSettingsEmailActivity;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import org.gitnex.tea4j.v2.models.CreateEmailOption;
import org.gitnex.tea4j.v2.models.Email;
import org.mian.gitnex.R;
import org.mian.gitnex.adapters.AccountSettingsEmailsAdapter;
import org.mian.gitnex.clients.RetrofitClient;
import org.mian.gitnex.databinding.CustomAccountSettingsAddNewEmailBinding;
import org.mian.gitnex.databinding.FragmentAccountSettingsEmailsBinding;
import org.mian.gitnex.helpers.AlertDialogs;
import org.mian.gitnex.helpers.Toasty;
import org.mian.gitnex.viewmodels.AccountSettingsEmailsViewModel;
import retrofit2.Call;
import retrofit2.Callback;
/**
* @author M M Arif
@ -25,7 +39,11 @@ public class AccountSettingsEmailsFragment extends Fragment {
public static boolean refreshEmails = false;
private AccountSettingsEmailsViewModel accountSettingsEmailsViewModel;
private CustomAccountSettingsAddNewEmailBinding customAccountSettingsAddNewEmailBinding;
private AccountSettingsEmailsAdapter adapter;
private Context context;
private MaterialAlertDialogBuilder materialAlertDialogBuilder;
private AlertDialog dialogSaveEmail;
public AccountSettingsEmailsFragment() {}
@ -40,6 +58,13 @@ public class AccountSettingsEmailsFragment extends Fragment {
accountSettingsEmailsViewModel =
new ViewModelProvider(this).get(AccountSettingsEmailsViewModel.class);
context = getContext();
assert context != null;
materialAlertDialogBuilder =
new MaterialAlertDialogBuilder(
context, R.style.ThemeOverlay_Material3_Dialog_Alert);
final SwipeRefreshLayout swipeRefresh = fragmentAccountSettingsEmailsBinding.pullToRefresh;
fragmentAccountSettingsEmailsBinding.recyclerView.setHasFixedSize(true);
@ -60,11 +85,79 @@ public class AccountSettingsEmailsFragment extends Fragment {
fetchDataAsync();
fragmentAccountSettingsEmailsBinding.addNewEmailAddress.setOnClickListener(
v1 -> startActivity(new Intent(getContext(), AccountSettingsEmailActivity.class)));
editProperties -> showAddEmailDialog());
return fragmentAccountSettingsEmailsBinding.getRoot();
}
private void showAddEmailDialog() {
customAccountSettingsAddNewEmailBinding =
CustomAccountSettingsAddNewEmailBinding.inflate(LayoutInflater.from(context));
View view = customAccountSettingsAddNewEmailBinding.getRoot();
materialAlertDialogBuilder.setView(view);
customAccountSettingsAddNewEmailBinding.save.setOnClickListener(
saveKey -> {
if (Objects.requireNonNull(
customAccountSettingsAddNewEmailBinding.userEmail.getText())
.toString()
.isEmpty()) {
Toasty.error(context, getString(R.string.emailErrorEmpty));
} else {
addNewEmail(
String.valueOf(
customAccountSettingsAddNewEmailBinding.userEmail
.getText()));
}
});
dialogSaveEmail = materialAlertDialogBuilder.show();
}
private void addNewEmail(String email) {
List<String> newEmailList = new ArrayList<>(Arrays.asList(email.split(",")));
CreateEmailOption addEmailFunc = new CreateEmailOption();
addEmailFunc.setEmails(newEmailList);
Call<List<Email>> call = RetrofitClient.getApiInterface(context).userAddEmail(addEmailFunc);
call.enqueue(
new Callback<>() {
@Override
public void onResponse(
@NonNull Call<List<Email>> call,
@NonNull retrofit2.Response<List<Email>> response) {
if (response.code() == 201) {
dialogSaveEmail.dismiss();
accountSettingsEmailsViewModel.loadEmailsList(context);
Toasty.success(context, getString(R.string.emailAddedText));
} else if (response.code() == 401) {
AlertDialogs.authorizationTokenRevokedDialog(context);
} else if (response.code() == 403) {
Toasty.error(context, getString(R.string.authorizeError));
} else if (response.code() == 422) {
Toasty.error(context, getString(R.string.emailErrorInUse));
} else {
Toasty.error(context, getString(R.string.genericError));
}
}
@Override
public void onFailure(@NonNull Call<List<Email>> call, @NonNull Throwable t) {}
});
}
@SuppressLint("NotifyDataSetChanged")
private void fetchDataAsync() {

View File

@ -149,6 +149,7 @@ public class MyIssuesFragment extends Fragment {
MenuItem searchItem = menu.findItem(R.id.action_search);
androidx.appcompat.widget.SearchView searchView =
(androidx.appcompat.widget.SearchView) searchItem.getActionView();
assert searchView != null;
searchView.setImeOptions(EditorInfo.IME_ACTION_DONE);
searchView.setOnQueryTextListener(

View File

@ -16,6 +16,7 @@ import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import com.amulyakhare.textdrawable.TextDrawable;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
@ -101,6 +102,14 @@ public class RepoInfoFragment extends Fragment {
binding.fileContentsFrameHeader.setOnClickListener(v1 -> toggleExpandView());
binding.repoMetaFrameHeader.setOnClickListener(v12 -> toggleExpandViewMeta());
if (repository.isStarred()) {
binding.repoMetaStars.setIcon(
ContextCompat.getDrawable(requireContext(), R.drawable.ic_star));
} else {
binding.repoMetaStars.setIcon(
ContextCompat.getDrawable(requireContext(), R.drawable.ic_star_unfilled));
}
binding.repoMetaStars.setOnClickListener(
metaStars ->
ctx.startActivity(repository.getIntent(ctx, RepoStargazersActivity.class)));
@ -177,7 +186,7 @@ public class RepoInfoFragment extends Fragment {
switch (response.code()) {
case 200:
assert response.body() != null;
if (response.body().size() > 0) {
if (!response.body().isEmpty()) {
ArrayList<SeekbarItem> seekbarItemList = new ArrayList<>();

View File

@ -22,6 +22,7 @@ import org.mian.gitnex.adapters.SSHKeysAdapter;
import org.mian.gitnex.clients.RetrofitClient;
import org.mian.gitnex.databinding.CustomAccountSettingsAddSshKeyBinding;
import org.mian.gitnex.databinding.FragmentAccountSettingsSshKeysBinding;
import org.mian.gitnex.helpers.AlertDialogs;
import org.mian.gitnex.helpers.Toasty;
import org.mian.gitnex.viewmodels.AccountSettingsSSHKeysViewModel;
import retrofit2.Call;
@ -137,6 +138,12 @@ public class SSHKeysFragment extends Fragment {
dialogSaveKey.dismiss();
accountSettingsSSHKeysViewModel.loadKeysList(context);
Toasty.success(context, getString(R.string.sshKeySuccess));
} else if (response.code() == 401) {
AlertDialogs.authorizationTokenRevokedDialog(context);
} else if (response.code() == 403) {
Toasty.error(context, getString(R.string.authorizeError));
} else if (response.code() == 422) {
Toasty.error(context, getString(R.string.sshKeyError));

View File

@ -310,15 +310,15 @@ public class DetailFragment extends Fragment {
response.body().getFullName());
}
if (!response.body().getDescription().isEmpty()) {
customEditProfileBinding.fullname.setText(
customEditProfileBinding.description.setText(
response.body().getDescription());
}
if (!response.body().getLocation().isEmpty()) {
customEditProfileBinding.fullname.setText(
customEditProfileBinding.location.setText(
response.body().getLocation());
}
if (!response.body().getWebsite().isEmpty()) {
customEditProfileBinding.fullname.setText(
customEditProfileBinding.website.setText(
response.body().getWebsite());
}
customEditProfileBinding.hideEmail.setChecked(

View File

@ -38,8 +38,7 @@ public class IssueCommentsViewModel extends ViewModel {
Call<List<TimelineComment>> call =
RetrofitClient.getApiInterface(ctx)
.issueGetCommentsAndTimeline(
owner, repo, (long) index, null, 1, resultLimit, null);
.issueGetCommentsAndTimeline(owner, repo, (long) index, null, 1, 50, null);
call.enqueue(
new Callback<>() {
@ -83,7 +82,7 @@ public class IssueCommentsViewModel extends ViewModel {
Call<List<TimelineComment>> call =
RetrofitClient.getApiInterface(ctx)
.issueGetCommentsAndTimeline(
owner, repo, (long) index, null, page, resultLimit, null);
owner, repo, (long) index, null, page, 50, null);
call.enqueue(
new Callback<>() {

View File

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBackgroundColor"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.CollapsingToolbarLayout
style="?attr/collapsingToolbarLayoutLargeStyle"
android:layout_width="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
app:contentScrim="?attr/primaryBackgroundColor"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/topAppBar"
android:layout_width="match_parent"
android:elevation="0dp"
android:layout_height="?attr/actionBarSize"
app:title="@string/pageTitleAddEmail"
app:layout_collapseMode="pin"
app:menu="@menu/save"
app:navigationIcon="@drawable/ic_close" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/dimen16dp">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/userEmailLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/accountEmailTitle"
android:textColorHint="?attr/hintColor"
app:boxStrokeErrorColor="@color/darkRed"
app:endIconMode="clear_text"
app:endIconTint="?attr/iconsColor"
app:hintTextColor="?attr/hintColor">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/userEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -83,7 +83,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:singleLine="true"
android:imeOptions="actionSend"

View File

@ -94,7 +94,6 @@
android:imeOptions="actionNext"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -122,7 +121,6 @@
android:imeOptions="actionNext"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />

View File

@ -84,7 +84,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:singleLine="true"
android:inputType="text"

View File

@ -69,7 +69,6 @@
android:imeOptions="actionNext"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -96,7 +95,6 @@
android:inputType="textMultiLine"
android:scrollbars="vertical"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen14sp"/>
@ -165,7 +163,6 @@
android:inputType="textMultiLine|textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>

View File

@ -79,7 +79,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -106,7 +105,6 @@
android:inputType="textCapSentences|textMultiLine"
android:scrollbars="vertical"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -140,7 +138,6 @@
android:layout_height="wrap_content"
android:focusable="false"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -186,7 +183,6 @@
android:layout_height="wrap_content"
android:focusable="false"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -211,7 +207,6 @@
android:layout_height="wrap_content"
android:focusable="false"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />

View File

@ -64,7 +64,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>

View File

@ -67,7 +67,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -97,7 +96,6 @@
android:inputType="textCapSentences|textMultiLine"
android:scrollbars="vertical"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -135,7 +133,6 @@
android:focusable="false"
android:maxLines="1"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>

View File

@ -67,7 +67,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -93,7 +92,6 @@
android:imeOptions="actionNext"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -119,7 +117,6 @@
android:imeOptions="actionNext"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -144,7 +141,6 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>

View File

@ -67,7 +67,6 @@
android:background="?attr/primaryBackgroundColor"
android:textColor="?attr/inputTextColor"
android:hint="@string/newNoteContentHint"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"
android:autofillHints="@string/newNoteContentHint" />

View File

@ -67,7 +67,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -97,7 +96,6 @@
android:inputType="textCapSentences|textMultiLine"
android:scrollbars="vertical"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>

View File

@ -79,7 +79,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -106,7 +105,6 @@
android:inputType="textCapSentences|textMultiLine"
android:scrollbars="vertical"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -209,7 +207,6 @@
android:layout_height="wrap_content"
android:focusable="false"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -235,7 +232,6 @@
android:focusable="false"
android:maxLines="1"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>

View File

@ -68,7 +68,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -95,7 +94,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -122,7 +120,6 @@
android:inputType="textCapSentences|textMultiLine"
android:scrollbars="vertical"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>

View File

@ -88,7 +88,6 @@
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -113,7 +112,6 @@
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:text="@string/main"
android:textSize="@dimen/dimen16sp" />
@ -166,7 +164,6 @@
android:gravity="top|start"
android:inputType="textCapSentences|textMultiLine"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />

View File

@ -67,7 +67,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -96,7 +95,6 @@
android:imeOptions="actionNext"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -120,7 +118,6 @@
android:focusable="false"
android:maxLines="1"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -153,7 +150,6 @@
android:focusable="false"
android:maxLines="1"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />

View File

@ -67,7 +67,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -94,7 +93,6 @@
android:inputType="textCapSentences|textMultiLine"
android:scrollbars="vertical"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -155,7 +153,6 @@
android:focusable="false"
android:maxLines="1"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>

View File

@ -132,7 +132,6 @@
android:inputType="textUri"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -159,7 +158,6 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -187,7 +185,6 @@
android:inputType="textPassword"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -218,7 +215,6 @@
android:inputType="number"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -245,7 +241,6 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />

View File

@ -70,7 +70,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
@ -96,7 +95,6 @@
android:gravity="top|start"
android:inputType="textCapSentences"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />

View File

@ -137,7 +137,6 @@
android:inputType="textCapSentences"
android:singleLine="true"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp"/>
@ -161,7 +160,6 @@
android:minHeight="@dimen/dimen480dp"
android:singleLine="false"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen14sp"/>

View File

@ -98,7 +98,6 @@
android:padding="10dp"
android:scrollbars="vertical"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/primaryTextColor"
android:textColorHint="?attr/primaryBackgroundColor"
android:textSize="16sp"/>

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/dimen8dp">
<androidx.core.widget.NestedScrollView
android:id="@+id/mainView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dimen16dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/userEmailLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/accountEmailTitle"
android:textColorHint="?attr/hintColor"
app:boxStrokeErrorColor="@color/darkRed"
app:endIconMode="clear_text"
app:endIconTint="?attr/iconsColor"
app:hintTextColor="?attr/hintColor">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/userEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHint="?attr/hintColor"
android:textSize="@dimen/dimen16sp" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/save"
android:layout_width="match_parent"
android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen16dp"
android:text="@string/saveButton"
android:textColor="?attr/materialCardBackgroundColor"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

View File

@ -38,7 +38,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp" />
@ -64,7 +63,6 @@
android:minHeight="@dimen/dimen180dp"
android:singleLine="false"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp" />

View File

@ -38,7 +38,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp" />
@ -64,7 +63,6 @@
android:minHeight="@dimen/dimen80dp"
android:singleLine="false"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp" />
@ -86,7 +84,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp" />
@ -108,7 +105,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp" />

View File

@ -42,7 +42,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp"/>

View File

@ -47,7 +47,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp"/>
@ -70,7 +69,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp"/>
@ -93,7 +91,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp"/>

View File

@ -58,7 +58,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp"/>
@ -81,7 +80,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp"/>

View File

@ -160,7 +160,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/repoMetaStars"
style="?attr/materialButtonToggleGroupStyle"
android:layout_width="wrap_content"
@ -170,7 +170,7 @@
app:icon="@drawable/ic_star_unfilled"
android:text="@string/repoStars" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/repoMetaPullRequests"
style="?attr/materialButtonToggleGroupStyle"
android:layout_width="wrap_content"
@ -180,7 +180,7 @@
app:icon="@drawable/ic_pull_request"
android:text="@string/repoStars" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/repoMetaForks"
style="?attr/materialButtonToggleGroupStyle"
android:layout_width="wrap_content"
@ -190,7 +190,7 @@
app:icon="@drawable/ic_fork"
android:text="@string/repoStars" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/repoMetaWatchers"
style="?attr/materialButtonToggleGroupStyle"
android:layout_width="wrap_content"