Replace more input fields, Update version
This commit is contained in:
parent
b0fe65f76b
commit
9b1a750642
@ -11,8 +11,8 @@ android {
|
|||||||
applicationId "com.cringe_studios.code_guard"
|
applicationId "com.cringe_studios.code_guard"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode 1
|
versionCode 2
|
||||||
versionName "1.0.0"
|
versionName "1.0.0_alpha1"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
@ -107,16 +107,12 @@ public class EditOTPFragment extends NamedFragment {
|
|||||||
OTPType newType = OTPType.values()[position];
|
OTPType newType = OTPType.values()[position];
|
||||||
switch(newType) {
|
switch(newType) {
|
||||||
case HOTP:
|
case HOTP:
|
||||||
binding.textPeriod.setVisibility(View.GONE);
|
binding.layoutPeriod.setVisibility(View.GONE);
|
||||||
binding.inputPeriod.setVisibility(View.GONE);
|
binding.layoutCounter.setVisibility(View.VISIBLE);
|
||||||
binding.textCounter.setVisibility(View.VISIBLE);
|
|
||||||
binding.inputCounter.setVisibility(View.VISIBLE);
|
|
||||||
break;
|
break;
|
||||||
case TOTP:
|
case TOTP:
|
||||||
binding.textCounter.setVisibility(View.GONE);
|
binding.layoutPeriod.setVisibility(View.VISIBLE);
|
||||||
binding.inputCounter.setVisibility(View.GONE);
|
binding.layoutCounter.setVisibility(View.GONE);
|
||||||
binding.textPeriod.setVisibility(View.VISIBLE);
|
|
||||||
binding.inputPeriod.setVisibility(View.VISIBLE);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,6 +100,8 @@ public class OTPListAdapter extends RecyclerView.Adapter<OTPListItem> {
|
|||||||
|
|
||||||
holder.getBinding().getRoot().setOnClickListener(view -> {
|
holder.getBinding().getRoot().setOnClickListener(view -> {
|
||||||
if(!editing) {
|
if(!editing) {
|
||||||
|
if(!SettingsUtil.isHideCodes(context)) return;
|
||||||
|
|
||||||
if(!holder.isCodeShown()) {
|
if(!holder.isCodeShown()) {
|
||||||
showCode(holder);
|
showCode(holder);
|
||||||
}else {
|
}else {
|
||||||
|
@ -1,20 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/create_group_name"
|
android:id="@+id/create_group_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:inputType="text"
|
android:hint="@string/name"
|
||||||
android:text="@string/name"
|
android:inputType="text" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</LinearLayout>
|
@ -33,50 +33,51 @@
|
|||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingBottom="10dp" />
|
android:paddingBottom="10dp" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp">
|
||||||
android:text="@string/otp_add_name" />
|
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_name"
|
android:id="@+id/input_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:inputType="text"
|
|
||||||
android:hint="@string/otp_add_name"
|
android:hint="@string/otp_add_name"
|
||||||
android:autofillHints="" />
|
android:inputType="text" />
|
||||||
|
|
||||||
<TextView
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp">
|
||||||
android:text="@string/otp_add_issuer" />
|
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_issuer"
|
android:id="@+id/input_issuer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:inputType="text"
|
|
||||||
android:hint="@string/otp_add_issuer"
|
android:hint="@string/otp_add_issuer"
|
||||||
android:autofillHints="" />
|
android:inputType="text" />
|
||||||
|
|
||||||
<TextView
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
app:passwordToggleEnabled="true"
|
||||||
android:text="@string/otp_add_secret" />
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_secret"
|
android:id="@+id/input_secret"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:inputType="text"
|
|
||||||
android:hint="@string/otp_add_secret"
|
android:hint="@string/otp_add_secret"
|
||||||
android:autofillHints="" />
|
android:inputType="textPassword" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -110,37 +111,37 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/otp_add_checksum" />
|
android:text="@string/otp_add_checksum" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/text_period"
|
android:id="@+id/layout_period"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp">
|
||||||
android:text="@string/otp_add_period" />
|
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_period"
|
android:id="@+id/input_period"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:inputType="number"
|
|
||||||
android:hint="@string/otp_add_period"
|
android:hint="@string/otp_add_period"
|
||||||
android:autofillHints="" />
|
android:inputType="number" />
|
||||||
|
|
||||||
<TextView
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/text_counter"
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/layout_counter"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp">
|
||||||
android:text="@string/otp_add_counter" />
|
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_counter"
|
android:id="@+id/input_counter"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:inputType="number"
|
|
||||||
android:hint="@string/otp_add_counter"
|
android:hint="@string/otp_add_counter"
|
||||||
android:autofillHints="" />
|
android:inputType="number" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -7,12 +7,19 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/pick_icon_search"
|
android:id="@+id/pick_icon_search"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:autofillHints=""
|
android:ems="10"
|
||||||
android:hint="@string/search" />
|
android:hint="@string/search"
|
||||||
|
android:inputType="text" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<ExpandableListView
|
<ExpandableListView
|
||||||
android:id="@+id/pick_icon_list"
|
android:id="@+id/pick_icon_list"
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
<item name="buttonBackground">@drawable/button_themed</item>
|
<item name="buttonBackground">@drawable/button_themed</item>
|
||||||
|
|
||||||
<item name="actionMenuTextAppearance">@style/ActionMenuTextAppearance</item>
|
<item name="actionMenuTextAppearance">@style/ActionMenuTextAppearance</item>
|
||||||
|
|
||||||
|
<item name="textInputStyle">@style/TextInputStyle</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.CringeAuthenticator" parent="Base.Theme.CringeAuthenticator" />
|
<style name="Theme.CringeAuthenticator" parent="Base.Theme.CringeAuthenticator" />
|
||||||
@ -59,4 +61,11 @@
|
|||||||
<style name="ActionMenuTextAppearance" parent="TextAppearance.AppCompat.Widget.ActionBar.Menu">
|
<style name="ActionMenuTextAppearance" parent="TextAppearance.AppCompat.Widget.ActionBar.Menu">
|
||||||
<item name="android:textAllCaps">false</item>
|
<item name="android:textAllCaps">false</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="TextInputStyle" parent="Widget.Material3.TextInputLayout.OutlinedBox">
|
||||||
|
<item name="boxCornerRadiusTopStart">25dp</item>
|
||||||
|
<item name="boxCornerRadiusTopEnd">25dp</item>
|
||||||
|
<item name="boxCornerRadiusBottomStart">25dp</item>
|
||||||
|
<item name="boxCornerRadiusBottomEnd">25dp</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user