mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-19 13:08:59 -04:00
Improve Accounts & Login
This commit is contained in:
@@ -71,7 +71,6 @@ dependencies {
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
|
||||
implementation 'com.google.android.material:material:1.0.0-rc02'
|
||||
implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'
|
||||
implementation 'com.github.florent37:shapeofview:1.3.0'
|
||||
|
||||
//RXJava2
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
|
||||
@@ -22,8 +22,11 @@
|
||||
package com.dragons.aurora.activities;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.dragons.aurora.R;
|
||||
import com.dragons.aurora.Util;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@@ -34,6 +37,10 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(Util.getThemeFromPref(this));
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
else
|
||||
getWindow().setStatusBarColor(getResources().getColor(R.color.semi_transparent));
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,36 +21,47 @@
|
||||
|
||||
package com.dragons.aurora.activities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.dragons.aurora.Aurora;
|
||||
import com.dragons.aurora.ContextUtil;
|
||||
import com.dragons.aurora.R;
|
||||
import com.dragons.aurora.Util;
|
||||
import com.dragons.aurora.helpers.Accountant;
|
||||
import com.dragons.aurora.helpers.Prefs;
|
||||
import com.dragons.aurora.task.AppProvidedCredentialsTask;
|
||||
import com.dragons.aurora.task.UserProvidedCredentialsTask;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class LoginActivity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.btn_ok_anm)
|
||||
Button login_anonymous;
|
||||
@BindView(R.id.checkboxSave)
|
||||
CheckBox checkBox;
|
||||
@BindView(R.id.button_okg)
|
||||
Button login_google;
|
||||
@BindView(R.id.email_google)
|
||||
TextInputEditText editEmail;
|
||||
@BindView(R.id.password_google)
|
||||
TextInputEditText editPassword;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_login);
|
||||
ButterKnife.bind(this);
|
||||
getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||
@@ -66,41 +77,37 @@ public class LoginActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void init() {
|
||||
Button login_anonymous = findViewById(R.id.btn_ok_anm);
|
||||
CheckBox checkBox = findViewById(R.id.checkboxSave);
|
||||
EditText editPassword = findViewById(R.id.passwordg);
|
||||
Button login_google = findViewById(R.id.button_okg);
|
||||
AutoCompleteTextView editEmail = findViewById(R.id.emailg);
|
||||
|
||||
login_anonymous.setOnClickListener(v -> {
|
||||
new AppProvidedCredentialsTask(this).logInWithPredefinedAccount();
|
||||
watchLoggedIn();
|
||||
});
|
||||
|
||||
login_google.setOnClickListener(view -> {
|
||||
Context c = view.getContext();
|
||||
login_google.setOnClickListener(v -> {
|
||||
String email = editEmail.getText().toString();
|
||||
String password = editPassword.getText().toString();
|
||||
|
||||
if (TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) {
|
||||
ContextUtil.toast(c.getApplicationContext(), R.string.error_credentials_empty);
|
||||
ContextUtil.toast(v.getContext(), R.string.error_credentials_empty);
|
||||
return;
|
||||
}
|
||||
|
||||
if (checkBox.isChecked()) {
|
||||
PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean("SEC_ACCOUNT", true).apply();
|
||||
PreferenceManager.getDefaultSharedPreferences(this).edit().putString("GOOGLE_EMAIL", email).apply();
|
||||
PreferenceManager.getDefaultSharedPreferences(this).edit().putString("GOOGLE_PASSWORD", password).apply();
|
||||
Prefs.putBoolean(this, Aurora.SEC_ACCOUNT, true);
|
||||
Prefs.putString(this, Aurora.GOOGLE_EMAIL, email);
|
||||
Prefs.putString(this, Aurora.GOOGLE_PASSWORD, password);
|
||||
}
|
||||
|
||||
new UserProvidedCredentialsTask(this).getUserCredentialsTask().execute(email, password);
|
||||
watchLoggedIn();
|
||||
});
|
||||
ImageView toggle_password = findViewById(R.id.toggle_password_visibility);
|
||||
|
||||
/*ImageView toggle_password = findViewById(R.id.toggle_password_visibility);
|
||||
toggle_password.setOnClickListener(v -> {
|
||||
boolean passwordVisible = !TextUtils.isEmpty((String) v.getTag());
|
||||
v.setTag(passwordVisible ? null : "tag");
|
||||
((ImageView) v).setImageResource(passwordVisible ? R.drawable.ic_visibility_on : R.drawable.ic_visibility_off);
|
||||
editPassword.setInputType(passwordVisible ? InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD : InputType.TYPE_CLASS_TEXT);
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
private void watchLoggedIn() {
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.dragons.aurora.dialogs;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
|
||||
import com.dragons.aurora.ContextUtil;
|
||||
import com.dragons.aurora.R;
|
||||
import com.dragons.aurora.Util;
|
||||
import com.dragons.aurora.helpers.Accountant;
|
||||
import com.dragons.aurora.task.UserProvidedCredentialsTask;
|
||||
import com.dragons.custom.AuroraDialog;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatDialogFragment;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class LoginDialog extends AppCompatDialogFragment {
|
||||
|
||||
@BindView(R.id.email_google)
|
||||
TextInputEditText email_google;
|
||||
@BindView(R.id.password_google)
|
||||
TextInputEditText password_google;
|
||||
@BindView(R.id.checkboxSave)
|
||||
CheckBox checkbox;
|
||||
@BindView(R.id.button_login)
|
||||
Button button_login;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.dialog_credentials, container, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
return new AuroraDialog(getContext(), Util.isDark(getContext())
|
||||
? R.style.Theme_Aurora_Dialog_Dark
|
||||
: R.style.Theme_Aurora_Dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
ButterKnife.bind(this, view);
|
||||
button_login.setOnClickListener(v -> init());
|
||||
}
|
||||
|
||||
private void init() {
|
||||
UserProvidedCredentialsTask mCredentialsTask = new UserProvidedCredentialsTask(getContext());
|
||||
if (TextUtils.isEmpty(email_google.getText()) || TextUtils.isEmpty(password_google.getText())) {
|
||||
ContextUtil.toast(getContext(), R.string.error_credentials_empty);
|
||||
} else {
|
||||
String email = email_google.getText().toString();
|
||||
String password = password_google.getText().toString();
|
||||
|
||||
if (checkbox.isChecked()) {
|
||||
mCredentialsTask.setGooglePrefs(email, password);
|
||||
}
|
||||
|
||||
Accountant.completeCheckout(getContext());
|
||||
mCredentialsTask.getUserCredentialsTask().execute(email, password);
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,31 +22,36 @@
|
||||
package com.dragons.aurora.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.dragons.aurora.Aurora;
|
||||
import com.dragons.aurora.PlayStoreApiAuthenticator;
|
||||
import com.dragons.aurora.R;
|
||||
import com.dragons.aurora.activities.LoginActivity;
|
||||
import com.dragons.aurora.dialogs.LoginDialog;
|
||||
import com.dragons.aurora.helpers.Accountant;
|
||||
import com.dragons.aurora.helpers.Prefs;
|
||||
import com.dragons.aurora.task.UserProvidedCredentialsTask;
|
||||
import com.github.florent37.shapeofview.shapes.CircleView;
|
||||
import com.percolate.caffeine.ViewUtils;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
import com.google.android.material.chip.Chip;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
import static com.dragons.aurora.Util.hide;
|
||||
import static com.dragons.aurora.Util.isConnected;
|
||||
@@ -55,6 +60,33 @@ import static com.dragons.aurora.Util.show;
|
||||
|
||||
public class AccountsFragment extends BaseFragment {
|
||||
|
||||
private static final String urlTOS = "https://www.google.com/mobile/android/market-tos.html";
|
||||
|
||||
@BindView(R.id.chip_tos)
|
||||
Chip chipTOS;
|
||||
@BindView(R.id.chip_add)
|
||||
Chip chipAdd;
|
||||
@BindView(R.id.btn_logout)
|
||||
Button logout_dummy;
|
||||
@BindView(R.id.btn_logoutG)
|
||||
Button logout_google;
|
||||
@BindView(R.id.btn_refresh)
|
||||
Button refresh_dummy;
|
||||
@BindView(R.id.btn_switch)
|
||||
Button switch_dummy;
|
||||
@BindView(R.id.btn_switchG)
|
||||
Button switch_google;
|
||||
@BindView(R.id.btn_remove)
|
||||
Button remove_google;
|
||||
@BindView(R.id.avatar_dummy)
|
||||
ImageView avatar_dummy;
|
||||
@BindView(R.id.avatar_google)
|
||||
ImageView avatar_google;
|
||||
@BindView(R.id.dummyCard)
|
||||
MaterialCardView layout_dummy;
|
||||
@BindView(R.id.googleCard)
|
||||
MaterialCardView layout_google;
|
||||
|
||||
private boolean isSecAvailable;
|
||||
private String myEmail;
|
||||
private View view;
|
||||
@@ -63,17 +95,15 @@ public class AccountsFragment extends BaseFragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
view = inflater.inflate(R.layout.fragment_accounts, container, false);
|
||||
ButterKnife.bind(this, view);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
ImageView toolbar_back = view.findViewById(R.id.toolbar_back);
|
||||
toolbar_back.setOnClickListener(click -> getActivity().onBackPressed());
|
||||
|
||||
myEmail = PreferenceFragment.getString(getActivity(), Aurora.PREFERENCE_EMAIL);
|
||||
isSecAvailable = PreferenceFragment.getBoolean(getActivity(), "SEC_ACCOUNT");
|
||||
myEmail = Prefs.getString(getActivity(), Aurora.PREFERENCE_EMAIL);
|
||||
isSecAvailable = Prefs.getBoolean(getActivity(), Aurora.SEC_ACCOUNT);
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -90,19 +120,24 @@ public class AccountsFragment extends BaseFragment {
|
||||
drawDummy();
|
||||
else
|
||||
getContext().startActivity(new Intent(getContext(), LoginActivity.class));
|
||||
|
||||
chipTOS.setChipStrokeWidth(2);
|
||||
chipAdd.setChipStrokeWidth(2);
|
||||
chipTOS.setOnClickListener(v -> getContext().startActivity(new Intent(Intent.ACTION_VIEW,
|
||||
Uri.parse(urlTOS))));
|
||||
chipAdd.setOnClickListener(v -> showGoogleDialog());
|
||||
}
|
||||
|
||||
private void drawDummy() {
|
||||
show(view, R.id.dummyIndicator);
|
||||
setAvatar(R.drawable.ic_dummy_avatar);
|
||||
avatar_dummy.setImageResource(R.drawable.ic_dummy_avatar);
|
||||
setText(view, R.id.account_name, R.string.acc_dummy_name);
|
||||
setText(view, R.id.account_email, myEmail);
|
||||
setText(view, R.id.account_gsf, R.string.device_gsfID, PreferenceFragment.getString(getActivity(),
|
||||
setText(view, R.id.account_gsf, R.string.device_gsfID, Prefs.getString(getActivity(),
|
||||
Aurora.PREFERENCE_GSF_ID));
|
||||
if (isSecAvailable)
|
||||
drawEmptyGoogle();
|
||||
else
|
||||
drawEmpty();
|
||||
show(view, R.id.chip_add);
|
||||
|
||||
drawDummyButtons();
|
||||
}
|
||||
@@ -110,20 +145,18 @@ public class AccountsFragment extends BaseFragment {
|
||||
private void drawGoogle() {
|
||||
drawEmptyDummy();
|
||||
|
||||
hide(view, R.id.emptyCard);
|
||||
hide(view, R.id.chip_add);
|
||||
show(view, R.id.googleCard);
|
||||
show(view, R.id.googleIndicator);
|
||||
|
||||
setText(view, R.id.account_nameG, PreferenceFragment.getString(getActivity(), "GOOGLE_NAME"));
|
||||
setText(view, R.id.account_nameG, Prefs.getString(getActivity(), Aurora.GOOGLE_NAME));
|
||||
setText(view, R.id.account_emailG, myEmail);
|
||||
setText(view, R.id.account_gsf, R.string.device_gsfID, PreferenceFragment.getString(getActivity(),
|
||||
setText(view, R.id.account_gsf, R.string.device_gsfID, Prefs.getString(getActivity(),
|
||||
Aurora.PREFERENCE_GSF_ID));
|
||||
|
||||
Button switchGoogle = ViewUtils.findViewById(view, R.id.btn_switchG);
|
||||
switchGoogle.setOnClickListener(view -> Accountant.switchGoogle(getContext()));
|
||||
switch_google.setOnClickListener(view -> showGoogleDialog());
|
||||
|
||||
if (isConnected(getActivity()))
|
||||
loadAvatar(PreferenceFragment.getString(getActivity(), "GOOGLE_URL"));
|
||||
loadAvatar(Prefs.getString(getActivity(), Aurora.GOOGLE_URL));
|
||||
|
||||
drawGoogleButtons();
|
||||
}
|
||||
@@ -132,64 +165,55 @@ public class AccountsFragment extends BaseFragment {
|
||||
show(view, R.id.dummy_tapToSwitch);
|
||||
setText(view, R.id.account_name, R.string.acc_dummy_name);
|
||||
setText(view, R.id.account_email, R.string.account_dummy_email);
|
||||
LinearLayout dummyCard = ViewUtils.findViewById(view, R.id.dummyLayout);
|
||||
dummyCard.setOnClickListener(v -> Accountant.loginWithDummy(getContext()));
|
||||
layout_dummy.setOnClickListener(v -> Accountant.loginWithDummy(getContext()));
|
||||
}
|
||||
|
||||
private void drawEmptyGoogle() {
|
||||
LinearLayout googleCard = ViewUtils.findViewById(view, R.id.googleLayout);
|
||||
TextView removeAccount = ViewUtils.findViewById(view, R.id.btn_remove);
|
||||
show(view, R.id.googleCard);
|
||||
show(view, R.id.btn_remove);
|
||||
show(view, R.id.google_tapToSwitch);
|
||||
setText(view, R.id.account_nameG, PreferenceFragment.getString(getActivity(), "GOOGLE_NAME"));
|
||||
setText(view, R.id.account_emailG, PreferenceFragment.getString(getActivity(), "GOOGLE_EMAIL"));
|
||||
googleCard.setOnClickListener(click -> new UserProvidedCredentialsTask(getContext()).withSavedGoogle());
|
||||
removeAccount.setOnClickListener(click -> {
|
||||
|
||||
setText(view, R.id.account_nameG, Prefs.getString(getActivity(), Aurora.GOOGLE_NAME));
|
||||
setText(view, R.id.account_emailG, Prefs.getString(getActivity(), Aurora.GOOGLE_EMAIL));
|
||||
|
||||
layout_google.setOnClickListener(click -> new UserProvidedCredentialsTask(getContext()).withSavedGoogle());
|
||||
remove_google.setOnClickListener(click -> {
|
||||
new UserProvidedCredentialsTask(getContext()).removeGooglePrefs();
|
||||
hide(view, R.id.googleCard);
|
||||
show(view, R.id.emptyCard);
|
||||
show(view, R.id.chip_add);
|
||||
});
|
||||
}
|
||||
|
||||
private void drawEmpty() {
|
||||
show(view, R.id.emptyCard);
|
||||
CircleView add_account = view.findViewById(R.id.add_account);
|
||||
add_account.setOnClickListener(v -> Accountant.switchGoogle(getContext()));
|
||||
private void showGoogleDialog() {
|
||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||
Fragment prev = getFragmentManager().findFragmentByTag("dialog");
|
||||
if (prev != null) {
|
||||
ft.remove(prev);
|
||||
}
|
||||
ft.addToBackStack(null);
|
||||
LoginDialog loginDialog = new LoginDialog();
|
||||
loginDialog.show(ft, "dialog");
|
||||
}
|
||||
|
||||
private void drawDummyButtons() {
|
||||
Button logout = ViewUtils.findViewById(view, R.id.btn_logout);
|
||||
Button switchDummy = ViewUtils.findViewById(view, R.id.btn_switch);
|
||||
Button refreshToken = ViewUtils.findViewById(view, R.id.btn_refresh);
|
||||
|
||||
private void drawDummyButtons() {
|
||||
if (Accountant.isDummy(getContext())) {
|
||||
show(view, R.id.btn_logout);
|
||||
show(view, R.id.btn_switch);
|
||||
show(view, R.id.btn_refresh);
|
||||
}
|
||||
|
||||
logout.setOnClickListener(view -> showLogOutDialog());
|
||||
switchDummy.setOnClickListener(view -> Accountant.switchDummy(getContext()));
|
||||
refreshToken.setOnClickListener(view -> Accountant.refreshMyToken(getContext()));
|
||||
logout_dummy.setOnClickListener(view -> showLogOutDialog());
|
||||
switch_dummy.setOnClickListener(view -> Accountant.switchDummy(getContext()));
|
||||
refresh_dummy.setOnClickListener(view -> Accountant.refreshMyToken(getContext()));
|
||||
}
|
||||
|
||||
private void drawGoogleButtons() {
|
||||
Button logout = ViewUtils.findViewById(view, R.id.btn_logoutG);
|
||||
Button switchDummy = ViewUtils.findViewById(view, R.id.btn_switchG);
|
||||
|
||||
if (Accountant.isGoogle(getContext())) {
|
||||
show(view, R.id.btn_logoutG);
|
||||
show(view, R.id.btn_switchG);
|
||||
}
|
||||
|
||||
logout.setOnClickListener(view -> showLogOutDialog());
|
||||
switchDummy.setOnClickListener(view -> Accountant.switchGoogle(getContext()));
|
||||
}
|
||||
|
||||
private void setAvatar(int avatar) {
|
||||
ImageView avatar_view = view.findViewById(R.id.accounts_Avatar);
|
||||
avatar_view.setImageResource(avatar);
|
||||
logout_google.setOnClickListener(view -> showLogOutDialog());
|
||||
switch_google.setOnClickListener(view -> showGoogleDialog());
|
||||
}
|
||||
|
||||
private void loadAvatar(String Url) {
|
||||
@@ -197,10 +221,10 @@ public class AccountsFragment extends BaseFragment {
|
||||
.with(getContext())
|
||||
.load(Url)
|
||||
.apply(new RequestOptions()
|
||||
.placeholder(ContextCompat.getDrawable(getContext(), R.drawable.ic_dummy_avatar))
|
||||
.placeholder(ContextCompat.getDrawable(getContext(), R.drawable.ic_user_placeholder))
|
||||
.circleCrop()
|
||||
.diskCacheStrategy(DiskCacheStrategy.DATA))
|
||||
.into(((ImageView) view.findViewById(R.id.accounts_AvatarG)));
|
||||
.into(avatar_google);
|
||||
}
|
||||
|
||||
private void showLogOutDialog() {
|
||||
|
||||
@@ -70,10 +70,6 @@ public class Accountant {
|
||||
task.execute();
|
||||
}
|
||||
|
||||
public static void switchGoogle(Context context) {
|
||||
new UserProvidedCredentialsTask(context).logInWithGoogleAccount();
|
||||
}
|
||||
|
||||
public static void loginWithDummy(Context context) {
|
||||
if (isLoggedIn(context))
|
||||
completeCheckout(context);
|
||||
|
||||
@@ -21,38 +21,25 @@
|
||||
|
||||
package com.dragons.aurora.task;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.android.volley.Request;
|
||||
import com.android.volley.RequestQueue;
|
||||
import com.android.volley.toolbox.JsonObjectRequest;
|
||||
import com.android.volley.toolbox.Volley;
|
||||
import com.dragons.aurora.Aurora;
|
||||
import com.dragons.aurora.ContextUtil;
|
||||
import com.dragons.aurora.CredentialsEmptyException;
|
||||
import com.dragons.aurora.PlayStoreApiAuthenticator;
|
||||
import com.dragons.aurora.R;
|
||||
import com.dragons.aurora.activities.AccountsActivity;
|
||||
import com.dragons.aurora.fragment.PreferenceFragment;
|
||||
import com.dragons.aurora.helpers.Accountant;
|
||||
import com.dragons.aurora.helpers.Prefs;
|
||||
import com.dragons.aurora.playstoreapiv2.AuthException;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import timber.log.Timber;
|
||||
@@ -73,21 +60,7 @@ public class UserProvidedCredentialsTask extends CheckCredentialsTask {
|
||||
return task;
|
||||
}
|
||||
|
||||
private AutoCompleteTextView getEmailInput(Dialog ad) {
|
||||
AutoCompleteTextView editEmail = (AutoCompleteTextView) ad.findViewById(R.id.email);
|
||||
editEmail.setAdapter(new ArrayAdapter<>(context, android.R.layout.simple_dropdown_item_1line, getUsedEmails()));
|
||||
String previousEmail = "";
|
||||
editEmail.setText(PreferenceManager.getDefaultSharedPreferences(context).getString(Aurora.PREFERENCE_EMAIL, previousEmail));
|
||||
return editEmail;
|
||||
}
|
||||
|
||||
private List<String> getUsedEmails() {
|
||||
List<String> emails = new ArrayList<>(Prefs.getStringSet(context, Aurora.USED_EMAILS_SET));
|
||||
Collections.sort(emails);
|
||||
return emails;
|
||||
}
|
||||
|
||||
private void setGooglePrefs(String email, String password) {
|
||||
public void setGooglePrefs(String email, String password) {
|
||||
Prefs.putBoolean(context, Aurora.SEC_ACCOUNT, true);
|
||||
Prefs.putString(context, Aurora.GOOGLE_EMAIL, email);
|
||||
Prefs.putString(context, Aurora.GOOGLE_PASSWORD, password);
|
||||
@@ -105,46 +78,6 @@ public class UserProvidedCredentialsTask extends CheckCredentialsTask {
|
||||
getUserCredentialsTask().execute(email, password);
|
||||
}
|
||||
|
||||
public void logInWithGoogleAccount() {
|
||||
Dialog ad = new Dialog(context);
|
||||
ad.setContentView(R.layout.dialog_credentials);
|
||||
ad.setTitle(context.getString(R.string.credentials_title));
|
||||
ad.setCancelable(false);
|
||||
|
||||
AutoCompleteTextView editEmail = getEmailInput(ad);
|
||||
EditText editPassword = ad.findViewById(R.id.password);
|
||||
final CheckBox checkBox = ad.findViewById(R.id.checkboxSave);
|
||||
|
||||
editEmail.setText("");
|
||||
|
||||
ad.findViewById(R.id.button_exit).setOnClickListener(v -> ad.dismiss());
|
||||
ad.findViewById(R.id.button_ok).setOnClickListener(view -> {
|
||||
Context c = view.getContext();
|
||||
String email = editEmail.getText().toString();
|
||||
String password = editPassword.getText().toString();
|
||||
if (TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) {
|
||||
ContextUtil.toast(c.getApplicationContext(), R.string.error_credentials_empty);
|
||||
return;
|
||||
}
|
||||
ad.dismiss();
|
||||
|
||||
if (checkBox.isChecked()) {
|
||||
setGooglePrefs(email, password);
|
||||
}
|
||||
Accountant.completeCheckout(context);
|
||||
getUserCredentialsTask().execute(email, password);
|
||||
});
|
||||
|
||||
ad.findViewById(R.id.toggle_password_visibility).setOnClickListener(v -> {
|
||||
boolean passwordVisible = !TextUtils.isEmpty((String) v.getTag());
|
||||
v.setTag(passwordVisible ? null : "tag");
|
||||
((ImageView) v).setImageResource(passwordVisible ? R.drawable.ic_visibility_on : R.drawable.ic_visibility_off);
|
||||
editPassword.setInputType(passwordVisible ? InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD : InputType.TYPE_CLASS_TEXT);
|
||||
});
|
||||
|
||||
ad.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(String[] params) {
|
||||
if (params.length < 2
|
||||
@@ -207,7 +140,7 @@ public class UserProvidedCredentialsTask extends CheckCredentialsTask {
|
||||
Username = mJsonObject.getJSONObject("gphoto$nickname").getString("$t");
|
||||
ImgURL = mJsonObject.getJSONObject("gphoto$thumbnail").getString("$t");
|
||||
} catch (JSONException e) {
|
||||
Timber.e(e.getMessage());
|
||||
Timber.e(e);
|
||||
}
|
||||
}
|
||||
Prefs.putString(context, Aurora.GOOGLE_NAME, Username);
|
||||
|
||||
9
app/src/main/res/drawable/ic_add_alt.xml
Normal file
9
app/src/main/res/drawable/ic_add_alt.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M17,13H13V17H11V13H7V11H11V7H13V11H17M12,2A10,10 0,0 0,2 12A10,10 0,0 0,12 22A10,10 0,0 0,22 12A10,10 0,0 0,12 2Z" />
|
||||
</vector>
|
||||
@@ -1,309 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Aurora Store
|
||||
~ Copyright (C) 2018 Rahul Kumar Patel <whyorean@gmail.com>
|
||||
~
|
||||
~ Yalp Store
|
||||
~ Copyright (C) 2018 Sergey Yeriomin <yeriomin@gmail.com>
|
||||
~
|
||||
~ Aurora Store (a fork of Yalp Store )is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ Aurora Store is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="4">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/top_artwork"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.DiagonalView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:shape_diagonal_angle="5"
|
||||
app:shape_diagonal_direction="left"
|
||||
app:shape_diagonal_position="right">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/header_grad2" />
|
||||
</com.github.florent37.shapeofview.shapes.DiagonalView>
|
||||
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.DiagonalView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha=".8"
|
||||
app:shape_diagonal_angle="10"
|
||||
app:shape_diagonal_direction="right"
|
||||
app:shape_diagonal_position="right">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/header_grad1" />
|
||||
</com.github.florent37.shapeofview.shapes.DiagonalView>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/topView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcome"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:padding="10dp"
|
||||
android:text="@string/action_welcome_msg"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selectAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/welcome"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:text="@string/action_select"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:fillViewport="true">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/google_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView4"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_margin="10dp"
|
||||
app:srcCompat="@drawable/ic_google" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/imageView4"
|
||||
android:layout_alignBottom="@+id/imageView4"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toEndOf="@+id/imageView4"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:singleLine="true"
|
||||
android:text="@string/acc_google"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/emailg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_below="@+id/imageView4"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:autofillHints="emailAddress"
|
||||
android:background="@drawable/outline_bg"
|
||||
android:completionThreshold="1"
|
||||
android:hint="@string/credentials_hint_email"
|
||||
android:inputType="textEmailAddress"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textAlignment="viewStart" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/password_layoutg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/emailg">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/passwordg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_margin="10dp"
|
||||
android:autofillHints="password"
|
||||
android:background="@drawable/outline_bg"
|
||||
android:fontFamily="normal"
|
||||
android:hint="@string/credentials_hint_password"
|
||||
android:inputType="textPassword"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textAlignment="viewStart" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toggle_password_visibility"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignEnd="@+id/passwordg"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:alpha=".6"
|
||||
android:src="@drawable/ic_visibility_on"
|
||||
android:tint="?android:attr/colorForeground" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/password_layout_extg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/password_layoutg"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkboxSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:button="@null"
|
||||
android:drawableEnd="?android:attr/listChoiceIndicatorMultiple"
|
||||
android:text="@string/acc_save"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_okg"
|
||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/action_login" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/or_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/google_card"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:text="@string/action_or"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/or_txt"
|
||||
android:layout_margin="10dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anonymous_holder"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_margin="10dp"
|
||||
app:srcCompat="@drawable/ic_dummy_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/anonymous_holder"
|
||||
android:layout_alignBottom="@+id/anonymous_holder"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toEndOf="@+id/anonymous_holder"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:singleLine="true"
|
||||
android:text="@string/acc_dummy"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/anonymous_holder"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="none"
|
||||
android:padding="5dp"
|
||||
android:text="@string/acc_dummy_summary"
|
||||
android:textAlignment="viewStart"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_ok_anm"
|
||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView5"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="@string/action_ok" />
|
||||
</RelativeLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,391 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Aurora Store
|
||||
~ Copyright (C) 2018 Rahul Kumar Patel <whyorean@gmail.com>
|
||||
~
|
||||
~ Yalp Store
|
||||
~ Copyright (C) 2018 Sergey Yeriomin <yeriomin@gmail.com>
|
||||
~
|
||||
~ Aurora Store (a fork of Yalp Store )is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ Aurora Store is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/top_artwork"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.DiagonalView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:shape_diagonal_angle="5"
|
||||
app:shape_diagonal_direction="left"
|
||||
app:shape_diagonal_position="right">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/header_grad2" />
|
||||
</com.github.florent37.shapeofview.shapes.DiagonalView>
|
||||
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.DiagonalView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha=".8"
|
||||
app:shape_diagonal_angle="10"
|
||||
app:shape_diagonal_direction="right"
|
||||
app:shape_diagonal_position="right">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/header_grad1" />
|
||||
</com.github.florent37.shapeofview.shapes.DiagonalView>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/topView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toolbar_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_arrow_left" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:maxLines="2"
|
||||
android:padding="5dp"
|
||||
android:text="@string/action_acc_txt"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_gsf"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/welcome"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/dummyCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dummyLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/accounts_Avatar"
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="76dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="@dimen/margin_img"
|
||||
app:srcCompat="@drawable/ic_user_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dummyIndicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="@dimen/margin_img"
|
||||
android:src="@drawable/ic_checked"
|
||||
android:tint="@color/colorGreen"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dummy_tapToSwitch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:text="@string/action_acc_switch"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_refresh"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_switch"
|
||||
android:text="@string/action_refresh"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_switch"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_logout"
|
||||
android:text="@string/action_switch_dummy"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_logout"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="@string/action_logout"
|
||||
android:textColor="@color/colorRed"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/emptyCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.CircleView
|
||||
android:id="@+id/add_account"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
app:shape_circle_borderColor="@color/colorRed"
|
||||
app:shape_circle_borderWidth="1dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/add_secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@android:color/transparent"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
app:srcCompat="@drawable/ic_add" />
|
||||
</com.github.florent37.shapeofview.shapes.CircleView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/add_account"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:text="@string/action_acc_add"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/googleCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/googleLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/accounts_AvatarG"
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="76dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="@dimen/margin_img"
|
||||
app:srcCompat="@drawable/ic_user_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/googleIndicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="@dimen/margin_img"
|
||||
android:src="@drawable/ic_checked"
|
||||
android:tint="@color/colorGreen"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_nameG"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_emailG"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/google_tapToSwitch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:text="@string/action_acc_switch"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_switchG"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_logoutG"
|
||||
android:text="@string/action_switch_google"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_logoutG"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_remove"
|
||||
android:text="@string/action_logout"
|
||||
android:textColor="@color/colorRed"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_remove"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="@string/action_remove"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -19,90 +19,55 @@
|
||||
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/colorBackground">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/top_artwork"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.DiagonalView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
app:shape_diagonal_angle="5"
|
||||
app:shape_diagonal_direction="left"
|
||||
app:shape_diagonal_position="bottom">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/header_grad2" />
|
||||
</com.github.florent37.shapeofview.shapes.DiagonalView>
|
||||
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.DiagonalView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:alpha=".8"
|
||||
app:shape_diagonal_angle="10"
|
||||
app:shape_diagonal_direction="right"
|
||||
app:shape_diagonal_position="bottom">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/header_grad1" />
|
||||
</com.github.florent37.shapeofview.shapes.DiagonalView>
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorAccent"
|
||||
app:elevation="0dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/topView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
android:layout_height="200dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcome"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/accounts_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:padding="10dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/action_welcome_msg"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22sp" />
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selectAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/welcome"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:layout_below="@id/accounts_title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/action_select"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="14sp" />
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/top_artwork"
|
||||
android:fillViewport="true">
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
@@ -121,83 +86,64 @@
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView4"
|
||||
android:id="@+id/google_icon"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_margin="10dp"
|
||||
app:srcCompat="@drawable/ic_google" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:id="@+id/google_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/imageView4"
|
||||
android:layout_alignBottom="@+id/imageView4"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toEndOf="@+id/imageView4"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:singleLine="true"
|
||||
android:layout_alignBottom="@+id/google_icon"
|
||||
android:layout_toEndOf="@+id/google_icon"
|
||||
android:text="@string/acc_google"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp" />
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Title"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/emailg"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/email_google_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_below="@+id/imageView4"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:autofillHints="emailAddress"
|
||||
android:background="@drawable/outline_bg"
|
||||
android:completionThreshold="1"
|
||||
android:hint="@string/credentials_hint_email"
|
||||
android:inputType="textEmailAddress"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textAlignment="viewStart" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/password_layoutg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/emailg">
|
||||
android:layout_below="@id/google_title"
|
||||
android:layout_marginTop="10dp"
|
||||
android:hint="@string/credentials_hint_email"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/passwordg"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/email_google"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_margin="10dp"
|
||||
android:autofillHints="password"
|
||||
android:background="@drawable/outline_bg"
|
||||
android:fontFamily="normal"
|
||||
android:hint="@string/credentials_hint_password"
|
||||
android:inputType="textPassword"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textAlignment="viewStart" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toggle_password_visibility"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignEnd="@+id/passwordg"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:alpha=".6"
|
||||
android:src="@drawable/ic_visibility_on"
|
||||
android:tint="?android:attr/colorForeground" />
|
||||
</RelativeLayout>
|
||||
android:inputType="textAutoComplete"
|
||||
android:singleLine="true" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/password_google_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/email_google_layout"
|
||||
android:hint="@string/credentials_hint_password"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/password_google"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/password_layout_extg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/password_layoutg"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_below="@id/password_google_layout"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
@@ -215,10 +161,9 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_okg"
|
||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/action_login" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -259,44 +204,35 @@
|
||||
app:srcCompat="@drawable/ic_dummy_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:id="@+id/dummy_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/anonymous_holder"
|
||||
android:layout_alignBottom="@+id/anonymous_holder"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toEndOf="@+id/anonymous_holder"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:singleLine="true"
|
||||
android:text="@string/acc_dummy"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp" />
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Title"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:id="@+id/dummy_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/anonymous_holder"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="none"
|
||||
android:padding="5dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/acc_dummy_summary"
|
||||
android:textAlignment="viewStart"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_ok_anm"
|
||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView5"
|
||||
android:layout_below="@+id/dummy_desc"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="@string/action_ok" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -305,4 +241,4 @@
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -19,105 +19,81 @@
|
||||
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
style="@style/Widget.Aurora.Dialog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="400dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/google_logo"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="@dimen/icon_size_med"
|
||||
android:layout_margin="5dp"
|
||||
android:src="@drawable/ic_google" />
|
||||
android:id="@+id/google_icon"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_margin="10dp"
|
||||
app:srcCompat="@drawable/ic_google" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/google_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/google_logo"
|
||||
android:layout_alignBottom="@+id/google_logo"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_toEndOf="@+id/google_logo"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:gravity="center"
|
||||
android:text="@string/credentials_logo_txt"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp" />
|
||||
android:layout_alignBottom="@+id/google_icon"
|
||||
android:layout_toEndOf="@+id/google_icon"
|
||||
android:text="@string/acc_google"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.DialogTitle"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/button_exit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="-5dp"
|
||||
android:scaleX=".8"
|
||||
android:scaleY=".8"
|
||||
android:src="@drawable/ic_cancel" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/email"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/email_google_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/google_title"
|
||||
android:layout_marginTop="10dp"
|
||||
android:autofillHints="emailAddress"
|
||||
android:background="@drawable/outline_bg"
|
||||
android:completionThreshold="1"
|
||||
android:hint="@string/credentials_hint_email"
|
||||
android:inputType="textEmailAddress"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp" />
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/password_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/email"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/email_google"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:autofillHints="password"
|
||||
android:background="@drawable/outline_bg"
|
||||
android:fontFamily="normal"
|
||||
android:hint="@string/credentials_hint_password"
|
||||
android:inputType="textPassword"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textAlignment="viewStart" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toggle_password_visibility"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignEnd="@+id/password"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:alpha=".6"
|
||||
android:src="@drawable/ic_visibility_on"
|
||||
android:tint="?android:attr/colorForeground" />
|
||||
</RelativeLayout>
|
||||
android:inputType="textAutoComplete"
|
||||
android:singleLine="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/login_buttons"
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/password_google_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/password_layout"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@+id/email_google_layout"
|
||||
android:hint="@string/credentials_hint_password"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/password_google"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/password_layout_extg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/password_google_layout"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="8">
|
||||
android:weightSum="2">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkboxSave"
|
||||
@@ -126,17 +102,18 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:drawableEnd="?android:attr/listChoiceIndicatorMultiple"
|
||||
android:text="@string/acc_save"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_ok"
|
||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||
android:id="@+id/button_login"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_login" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</merge>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -19,178 +19,127 @@
|
||||
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="3">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/top_artwork"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.DiagonalView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:shape_diagonal_angle="5"
|
||||
app:shape_diagonal_direction="left"
|
||||
app:shape_diagonal_position="bottom">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/header_grad2" />
|
||||
</com.github.florent37.shapeofview.shapes.DiagonalView>
|
||||
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.DiagonalView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha=".8"
|
||||
app:shape_diagonal_angle="10"
|
||||
app:shape_diagonal_direction="right"
|
||||
app:shape_diagonal_position="bottom">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/header_grad1" />
|
||||
</com.github.florent37.shapeofview.shapes.DiagonalView>
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorAccent"
|
||||
app:elevation="0dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/topView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toolbar_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_arrow_left" />
|
||||
android:layout_height="200dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcome"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/accounts_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:padding="5dp"
|
||||
android:text="@string/action_acc_txt"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22sp" />
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_gsf"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/welcome"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="14sp" />
|
||||
android:layout_below="@id/accounts_title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/dummyCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="2dp">
|
||||
app:cardElevation="2dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dummyLayout"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/accounts_Avatar"
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="76dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="@dimen/margin_img"
|
||||
app:srcCompat="@drawable/ic_user_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dummyIndicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="@dimen/margin_img"
|
||||
android:src="@drawable/ic_checked"
|
||||
android:tint="@color/colorGreen"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/avatar_dummy"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_margin="10dp"
|
||||
app:srcCompat="@drawable/ic_dummy_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp" />
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_toEndOf="@id/avatar_dummy"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp" />
|
||||
android:layout_below="@+id/account_name"
|
||||
android:layout_toEndOf="@id/avatar_dummy"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dummy_tapToSwitch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@id/account_email"
|
||||
android:layout_toEndOf="@id/avatar_dummy"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/action_acc_switch"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/avatar_dummy"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/acc_dummy_summary" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal">
|
||||
android:gravity="end">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_refresh"
|
||||
@@ -199,6 +148,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_switch"
|
||||
android:text="@string/action_refresh"
|
||||
android:textColor="?colorAccent"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
@@ -208,6 +158,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_logout"
|
||||
android:text="@string/action_switch_dummy"
|
||||
android:textColor="?colorAccent"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
@@ -221,152 +172,96 @@
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/emptyCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.github.florent37.shapeofview.shapes.CircleView
|
||||
android:id="@+id/add_account"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
app:shape_circle_borderColor="@color/colorRed"
|
||||
app:shape_circle_borderWidth="1dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/add_secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@android:color/transparent"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
app:srcCompat="@drawable/ic_add" />
|
||||
</com.github.florent37.shapeofview.shapes.CircleView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/add_account"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:text="@string/action_acc_add"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/googleCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/dummyCard"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="2dp">
|
||||
app:cardElevation="2dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/googleLayout"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/accounts_AvatarG"
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="76dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="@dimen/margin_img"
|
||||
app:srcCompat="@drawable/ic_user_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/googleIndicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="@dimen/margin_img"
|
||||
android:src="@drawable/ic_checked"
|
||||
android:tint="@color/colorGreen"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/avatar_google"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_margin="10dp"
|
||||
app:srcCompat="@drawable/ic_user_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_nameG"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/google_sans_bold"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp" />
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_toEndOf="@id/avatar_google"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_emailG"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp" />
|
||||
android:layout_below="@id/account_nameG"
|
||||
android:layout_toEndOf="@id/avatar_google"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/google_tapToSwitch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@id/account_emailG"
|
||||
android:layout_toEndOf="@id/avatar_google"
|
||||
android:fontFamily="@font/google_sans"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/action_acc_switch"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/avatar_google"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/acc_google_summary" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal">
|
||||
android:gravity="end">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_switchG"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_logoutG"
|
||||
android:text="@string/action_switch_google"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_logoutG"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_remove"
|
||||
android:text="@string/action_logout"
|
||||
android:textColor="@color/colorRed"
|
||||
android:text="@string/action_switch_google"
|
||||
android:textColor="?colorAccent"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
@@ -374,16 +269,75 @@
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_toStartOf="@+id/btn_logoutG"
|
||||
android:text="@string/action_remove"
|
||||
android:textColor="@color/colorRed"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_logoutG"
|
||||
style="@style/Widget.Aurora.BorderlessButton.Compact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="@string/action_logout"
|
||||
android:textColor="@color/colorRed"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/googleCard"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
app:chipSpacing="@dimen/margin_small"
|
||||
app:singleLine="true">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_tos"
|
||||
style="@style/Widget.MaterialComponents.Chip.Action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/acc_google_tos"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:chipBackgroundColor="?android:panelBackground"
|
||||
app:chipIcon="@drawable/ic_add_alt"
|
||||
app:chipIconTint="@color/colorAccent"
|
||||
app:chipStrokeColor="?android:strokeColor" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip_add"
|
||||
style="@style/Widget.MaterialComponents.Chip.Action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/chip_tos"
|
||||
android:text="@string/action_acc_add"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:visibility="gone"
|
||||
app:chipBackgroundColor="?android:panelBackground"
|
||||
app:chipIcon="@drawable/ic_add_alt"
|
||||
app:chipIconTint="@color/colorAccent"
|
||||
app:chipStrokeColor="?android:strokeColor" />
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -55,7 +55,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/prefs_icon"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_dummy_avatar" />
|
||||
|
||||
<ImageView
|
||||
@@ -64,6 +63,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="5dp"
|
||||
android:alpha=".80"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_settings"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="black">#000000</color>
|
||||
<color name="transparent">#0000</color>
|
||||
<color name="semi_transparent">#33000000</color>
|
||||
<color name="semi_transparent">#11000000</color>
|
||||
<color name="gray">#BDBDBD</color>
|
||||
<color name="darkGray">#616161</color>
|
||||
<color name="lightGray">#EEEEEE</color>
|
||||
|
||||
@@ -33,8 +33,10 @@
|
||||
<dimen name="preference_title_height">40dp</dimen>
|
||||
<dimen name="bottomnav_margin">50dp</dimen>
|
||||
<dimen name="padding_borderless_button">16dp</dimen>
|
||||
|
||||
<item name="text_line_spacing" format="float" type="dimen">1.2</item>
|
||||
<item name="card_stroke" format="float" type="dimen">1.0</item>
|
||||
<item name="chip_stroke" format="float" type="dimen">2.0</item>
|
||||
|
||||
<dimen name="margin_normal">16dp</dimen>
|
||||
<dimen name="margin_small">8dp</dimen>
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
<string name="acc_dummy_summary">Login with anonymous credentials provided by Aurora Store, you would not be able to access your app purchases with dummy accounts.</string>
|
||||
<string name="acc_dummy_name">Anonymous</string>
|
||||
<string name="acc_google">Login with Google</string>
|
||||
<string name="acc_google_summary">Aurora Store violates Google Play Terms of Services 3.3, so your google account may be disabled, however no such report of accounts being disabled are reported so far, use at your own risk.</string>
|
||||
<string name="acc_google_tos">Read Google\'s Terms"</string>
|
||||
<string name="acc_save">Save Account</string>
|
||||
<string name="action_about">About</string>
|
||||
<string name="action_accounts">Accounts</string>
|
||||
@@ -93,8 +95,8 @@
|
||||
<string name="category_topGrossing">Top Grossing</string>
|
||||
<string name="category_trending">Trending</string>
|
||||
<string name="content_flagged">Objection submitted.</string>
|
||||
<string name="credentials_hint_email">Email or phone</string>
|
||||
<string name="credentials_hint_password">Enter your password</string>
|
||||
<string name="credentials_hint_email">Username</string>
|
||||
<string name="credentials_hint_password">Password</string>
|
||||
<string name="credentials_logo_txt">Sign in</string>
|
||||
<string name="credentials_title">Google account access</string>
|
||||
<string name="delete">Delete</string>
|
||||
|
||||
@@ -193,8 +193,6 @@
|
||||
<item name="android:fadingEdge">horizontal</item>
|
||||
<item name="android:letterSpacing">0.025</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:requiresFadingEdge">horizontal</item>
|
||||
<item name="android:fadingEdgeLength">40dp</item>
|
||||
<item name="android:ellipsize">none</item>
|
||||
<item name="android:paddingLeft">24dp</item>
|
||||
<item name="android:paddingRight">24dp</item>
|
||||
@@ -210,8 +208,6 @@
|
||||
<item name="android:background">@drawable/raised_button_background</item>
|
||||
<item name="android:letterSpacing">0.025</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:requiresFadingEdge">horizontal</item>
|
||||
<item name="android:fadingEdgeLength">50dp</item>
|
||||
<item name="android:ellipsize">none</item>
|
||||
<item name="android:paddingLeft">24dp</item>
|
||||
<item name="android:paddingRight">24dp</item>
|
||||
@@ -236,4 +232,9 @@
|
||||
<item name="chipEndPadding">10dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Aurora.FilterAction" parent="Widget.MaterialComponents.Chip.Action">
|
||||
<item name="android:textAppearance">@style/TextAppearance.Aurora.ChipText</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user