Make login section bit Googlish

This commit is contained in:
Mr. Dragon
2018-01-23 00:30:37 +05:30
parent bf40b4bcff
commit 4fc0b79db2
8 changed files with 124 additions and 22 deletions

View File

@@ -36,7 +36,7 @@ public class UserProvidedAccountDialogBuilder extends CredentialsDialogBuilder {
@Override
public Dialog show() {
final Dialog ad = new Dialog(context);
final Dialog ad = new Dialog(context,android.R.style.Theme_Material_Light_Dialog_Presentation);
ad.setContentView(R.layout.credentials_dialog_layout);
ad.setTitle(context.getString(R.string.credentials_title));
ad.setCancelable(false);

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="4dp"
android:insetRight="4dp"
android:insetTop="8dp"
android:insetBottom="8dp">
<ripple android:color="@color/colorAccent">
<item>
<shape android:shape="rectangle"
android:tint="@color/button_bg_alt">
<corners android:radius="3dp" />
<solid android:color="@color/white" />
</shape>
</item>
</ripple>
</inset>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="4dp"
android:insetRight="4dp"
android:insetTop="8dp"
android:insetBottom="8dp">
<ripple android:color="@color/colorPrimary">
<item>
<shape
android:shape="rectangle">
<corners android:radius="3dp" />
<stroke android:width="3px" android:color="@color/button_bg_alt"/>
</shape>
</item>
</ripple>
</inset>

View File

@@ -0,0 +1,9 @@
<vector android:height="24dp" android:viewportHeight="512.0"
android:viewportWidth="512.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#167EE6" android:pathData="M492.7,211.5l-208.8,-0c-9.2,0 -16.7,7.5 -16.7,16.7v66.7c0,9.2 7.5,16.7 16.7,16.7h117.6c-12.9,33.4 -36.9,61.4 -67.6,79.2L384,477.6c80.4,-46.5 128,-128.2 128,-219.5c0,-13 -1,-22.3 -2.9,-32.8C507.7,217.3 500.8,211.5 492.7,211.5z"/>
<path android:fillColor="#12B347" android:pathData="M256,411.8c-57.6,0 -107.8,-31.4 -134.8,-78l-86.8,50C78.6,460.4 161.3,512 256,512c46.4,0 90.3,-12.5 128,-34.3v-0.1l-50.1,-86.8C310.9,404.1 284.4,411.8 256,411.8z"/>
<path android:fillColor="#0F993E" android:pathData="M384,477.7v-0.1l-50.1,-86.8c-22.9,13.3 -49.5,21 -77.9,21V512C302.4,512 346.3,499.5 384,477.7z"/>
<path android:fillColor="#FFD500" android:pathData="M100.2,256c0,-28.4 7.7,-54.9 21,-77.8l-86.8,-50C12.5,165.7 0,209.4 0,256s12.5,90.3 34.4,127.9l86.8,-50C107.9,310.9 100.2,284.4 100.2,256z"/>
<path android:fillColor="#FF4B26" android:pathData="M256,100.2c37.5,0 72,13.3 98.9,35.5c6.6,5.5 16.3,5.1 22.4,-1l47.3,-47.3c6.9,-6.9 6.4,-18.2 -1,-24.6C378.5,23.7 319.8,0 256,0C161.3,0 78.6,51.6 34.4,128.1l86.8,50C148.2,131.6 198.4,100.2 256,100.2z"/>
<path android:fillColor="#D93F21" android:pathData="M354.9,135.7c6.6,5.5 16.3,5.1 22.4,-1l47.3,-47.3c6.9,-6.9 6.4,-18.2 -1,-24.6C378.5,23.7 319.8,0 256,0v100.2C293.5,100.2 328,113.5 354.9,135.7z"/>
</vector>

View File

@@ -3,38 +3,60 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<RelativeLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp" >
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="25dp"
android:padding="25dp" >
<ImageView
android:id="@+id/google_logo"
android:layout_width="@dimen/icon_size_med"
android:layout_height="@dimen/icon_size_med"
android:src="@drawable/ic_google" />
<TextView
android:id="@+id/signtext"
android:layout_below="@id/google_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/credentials_logo_txt"
android:textSize="18sp"/>
<TextView
android:id="@+id/textview"
android:layout_below="@id/signtext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/credentials_message"
android:padding="6dp" />
android:layout_marginTop="25dp"
android:text="@string/credentials_message"/>
<AutoCompleteTextView
android:id="@+id/email"
android:layout_below="@id/textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:autofillHints="emailAddress"
android:completionThreshold="1"
android:hint="@string/credentials_hint_email"
android:id="@+id/email" />
android:hint="@string/credentials_hint_email" />
<RelativeLayout
android:id="@+id/password_layout"
android:layout_below="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
android:layout_height="wrap_content">
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:autofillHints="password"
android:hint="@string/credentials_hint_password"
android:id="@+id/password" />
android:inputType="textPassword"
android:fontFamily="normal" />
<ImageView
android:id="@+id/toggle_password_visibility"
@@ -44,34 +66,70 @@
android:layout_centerVertical="true"
android:layout_alignRight="@+id/password"
android:layout_alignEnd="@+id/password"
android:src="@drawable/ic_visibility_on" />
android:src="@drawable/ic_visibility_on"
android:tint="@color/darkgray"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/password_layout_ext"
android:layout_below="@id/password_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:orientation="horizontal"
android:weightSum="2"
android:layout_margin="5dp">
<TextView
android:id="@+id/incorrect_pass"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Incorrect password"
android:textColor="#f00"
android:visibility="gone"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:text="Forgot password ?"
android:textColor="@color/colorPrimary"/>
</LinearLayout>
<LinearLayout
android:layout_below="@+id/password_layout_ext"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
<android.support.v7.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@android:string/cancel"
android:id="@+id/button_exit"
android:textColor="@color/white"/>
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:background="@drawable/button_bg_outine_alt"
android:textColor="@color/button_bg_alt" />
<Button
<android.support.v7.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@android:string/ok"
android:id="@+id/button_ok"
android:textColor="@color/white"/>
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:background="@drawable/button_bg_alt"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/loading"

View File

@@ -6,6 +6,7 @@
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="button_bg">#1565C0</color>
<color name="button_bg_alt">#009688</color>
<color name="round_bg">#1565C0</color>
<color name="changelog_txt">#1565C0</color>
<color name="changelog_bg">#E3F2FD</color>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="icon_size">64dp</dimen>
<dimen name="icon_size_med">48dp</dimen>
<dimen name="icon_size_small">24dp</dimen>
</resources>

View File

@@ -53,7 +53,7 @@
<string name="dialog_message_two_factor">It appears you have enabled 2-Step Verification for your account.\n\nPlease, create a dedicated app password for Yalp Store and use it to log in to the Yalp Store.\n\nTap \"Create password\" to be redirected to password creation page.</string>
<string name="dialog_title_logout">Log out?</string>
<string name="dialog_message_logout">Are you sure you want to log out?</string>
<string name="dialog_account_type_provided_by_user">With my own Google account</string>
<string name="dialog_account_type_provided_by_user">With your own Google account</string>
<string name="dialog_account_type_predefined">With a fake Yalp Store account</string>
<string name="dialog_account_type_title">How would you like to log in to Google Play Store?</string>
<string name="dialog_title_logging_in">Logging in</string>
@@ -124,10 +124,11 @@
<string name="details_saved_in_downloads">Saved in your Downloads folder</string>
<string name="details_could_not_copy_apk">Could not copy apk</string>
<string name="details_system_app_info">System info</string>
<string name="credentials_hint_email">e-mail here</string>
<string name="credentials_hint_password">password here</string>
<string name="credentials_hint_email">Email or phone</string>
<string name="credentials_hint_password">Enter your password</string>
<string name="credentials_title">Google account access</string>
<string name="credentials_message">Google account email and password are required for this app to function.\n\nKeep in mind that using this app violates Play Store ToS. It would probably be safer to use a throwaway Google account which has logged in to Play Store at least once and has accepted Play Store ToS.</string>
<string name="credentials_logo_txt">Sign in</string>
<string name="credentials_message">Use your Google account.\n\nKeep in mind that using this app violates Play Store T&amp;C. \nIt would probably be safer to use a throwaway Google account which has logged in to Play Store at least once and has accepted Play Store T&amp;C.</string>
<string name="activity_title_updates_only">Updates</string>
<string name="activity_title_updates_and_other_apps">Your apps</string>
<string name="activity_title_search">"Searching: \"%1$s\""</string>