mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 04:39:04 +00:00
auth ui updates
Simpler kb icon, placeholder username/password text ui updates, google icon, action chip ui updates
This commit is contained in:
parent
f2ff0318d4
commit
643444cebb
5 changed files with 35 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ import android.app.Activity
|
|||
import android.app.AlertDialog
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.method.PasswordTransformationMethod
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.view.isVisible
|
||||
|
|
@ -13,6 +14,7 @@ import com.habitrpg.android.habitica.databinding.ActivityLoginBinding
|
|||
import com.habitrpg.wearos.habitica.ui.viewmodels.LoginViewModel
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
|
||||
@AndroidEntryPoint
|
||||
class LoginActivity: BaseActivity<ActivityLoginBinding, LoginViewModel>() {
|
||||
enum class State {
|
||||
|
|
@ -78,6 +80,8 @@ class LoginActivity: BaseActivity<ActivityLoginBinding, LoginViewModel>() {
|
|||
binding.googleLoginButton.setOnClickListener { loginGoogle() }
|
||||
binding.registerButton.setOnClickListener { openRegisterOnPhone() }
|
||||
|
||||
binding.passwordEditText.transformationMethod = PasswordTransformationMethod()
|
||||
|
||||
currentState = State.INITIAL
|
||||
}
|
||||
|
||||
|
|
|
|||
18
wearos/src/main/res/drawable/google_icon.xml
Normal file
18
wearos/src/main/res/drawable/google_icon.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<path
|
||||
android:pathData="M43.611,20.083H42V20H24v8h11.303c-1.649,4.657 -6.08,8 -11.303,8c-6.627,0 -12,-5.373 -12,-12s5.373,-12 12,-12c3.059,0 5.842,1.154 7.961,3.039l5.657,-5.657C34.046,6.053 29.268,4 24,4C12.955,4 4,12.955 4,24s8.955,20 20,20s20,-8.955 20,-20C44,22.659 43.862,21.35 43.611,20.083z"
|
||||
android:fillColor="#fbc02d"/>
|
||||
<path
|
||||
android:pathData="M6.306,14.691l6.571,4.819C14.655,15.108 18.961,12 24,12c3.059,0 5.842,1.154 7.961,3.039l5.657,-5.657C34.046,6.053 29.268,4 24,4C16.318,4 9.656,8.337 6.306,14.691z"
|
||||
android:fillColor="#e53935"/>
|
||||
<path
|
||||
android:pathData="M24,44c5.166,0 9.86,-1.977 13.409,-5.192l-6.19,-5.238C29.211,35.091 26.715,36 24,36c-5.202,0 -9.619,-3.317 -11.283,-7.946l-6.522,5.025C9.505,39.556 16.227,44 24,44z"
|
||||
android:fillColor="#4caf50"/>
|
||||
<path
|
||||
android:pathData="M43.611,20.083L43.595,20L42,20H24v8h11.303c-0.792,2.237 -2.231,4.166 -4.087,5.571c0.001,-0.001 0.002,-0.001 0.003,-0.002l6.19,5.238C36.971,39.205 44,34 44,24C44,22.659 43.862,21.35 43.611,20.083z"
|
||||
android:fillColor="#1565c0"/>
|
||||
</vector>
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M20,5L4,5c-1.1,0 -1.99,0.9 -1.99,2L2,17c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,7c0,-1.1 -0.9,-2 -2,-2zM11,8h2v2h-2L11,8zM11,11h2v2h-2v-2zM8,8h2v2L8,10L8,8zM8,11h2v2L8,13v-2zM7,13L5,13v-2h2v2zM7,10L5,10L5,8h2v2zM16,17L8,17v-2h8v2zM16,13h-2v-2h2v2zM16,10h-2L14,8h2v2zM19,13h-2v-2h2v2zM19,10h-2L17,8h2v2z"/>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="19dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="19">
|
||||
<path
|
||||
android:pathData="M3.025,18.1C2.175,18.1 1.4583,17.8083 0.875,17.225C0.2917,16.6417 0,15.925 0,15.075V3.025C0,2.175 0.2917,1.4583 0.875,0.875C1.4583,0.2917 2.175,0 3.025,0H20.025C20.875,0 21.5917,0.2917 22.175,0.875C22.7583,1.4583 23.05,2.175 23.05,3.025V15.075C23.05,15.925 22.7583,16.6417 22.175,17.225C21.5917,17.8083 20.875,18.1 20.025,18.1H3.025ZM8.4,6.725H10.675V4.45H8.4V6.725ZM4.45,6.725H6.725V4.45H4.45V6.725ZM7.375,13.675H15.675V12.225H7.375V13.675ZM12.375,6.725H14.65V4.45H12.375V6.725ZM8.4,10.65H10.675V8.375H8.4V10.65ZM4.45,10.65H6.725V8.375H4.45V10.65ZM12.375,10.65H14.65V8.375H12.375V10.65ZM16.325,6.725H18.6V4.45H16.325V6.725ZM16.325,10.65H18.6V8.375H16.325V10.65Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
android:id="@+id/google_login_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/google_icon"
|
||||
android:text="@string/login_btn_google"
|
||||
android:layout_marginBottom="@dimen/spacing_small"
|
||||
style="@style/ChipButton"/>
|
||||
|
|
@ -77,6 +78,7 @@
|
|||
android:id="@+id/username_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:textColorHint="@color/gray_200"
|
||||
android:inputType="textEmailAddress"
|
||||
android:hint="@string/email_username"
|
||||
android:paddingHorizontal="16dp"
|
||||
|
|
@ -87,8 +89,8 @@
|
|||
<EditText
|
||||
android:id="@+id/password_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:textColorHint="@color/gray_200"
|
||||
android:layout_height="52dp"
|
||||
android:inputType="textPassword"
|
||||
android:hint="@string/password"
|
||||
android:background="@drawable/row_background_outline"
|
||||
android:paddingHorizontal="16dp"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
<item name="android:paddingHorizontal">@dimen/row_padding_horizontal</item>
|
||||
<item name="android:paddingVertical">@dimen/row_padding_vertical</item>
|
||||
<item name="android:background">@drawable/row_background</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="fontFamily">sans-serif-medium</item>
|
||||
<item name="android:gravity">start|center_vertical</item>
|
||||
<item name="android:minHeight">52dp</item>
|
||||
|
|
|
|||
Loading…
Reference in a new issue