replace LoginDialog with material-components based LoginModalBottomSheet
This commit is contained in:
		@ -1,30 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    android:id="@+id/linLayout_login"
 | 
			
		||||
    android:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="match_parent"
 | 
			
		||||
    android:orientation="vertical"
 | 
			
		||||
    android:paddingStart="24dp"
 | 
			
		||||
    android:paddingEnd="24dp">
 | 
			
		||||
 | 
			
		||||
    <EditText
 | 
			
		||||
        android:id="@+id/edit_text_login"
 | 
			
		||||
        android:layout_width="match_parent"
 | 
			
		||||
        android:layout_height="wrap_content"
 | 
			
		||||
        android:layout_margin="7dp"
 | 
			
		||||
        android:ems="10"
 | 
			
		||||
        android:hint="@string/login"
 | 
			
		||||
        android:importantForAutofill="no"
 | 
			
		||||
        android:inputType="textEmailAddress" />
 | 
			
		||||
 | 
			
		||||
    <EditText
 | 
			
		||||
        android:id="@+id/edit_text_password"
 | 
			
		||||
        android:layout_width="match_parent"
 | 
			
		||||
        android:layout_height="wrap_content"
 | 
			
		||||
        android:layout_margin="7dp"
 | 
			
		||||
        android:ems="10"
 | 
			
		||||
        android:hint="@string/password"
 | 
			
		||||
        android:importantForAutofill="no"
 | 
			
		||||
        android:inputType="textPassword" />
 | 
			
		||||
 | 
			
		||||
</LinearLayout>
 | 
			
		||||
@ -24,7 +24,7 @@
 | 
			
		||||
                android:layout_height="72dp"
 | 
			
		||||
                android:contentDescription="@string/component_poster_desc"
 | 
			
		||||
                app:shapeAppearance="@style/ShapeAppearance.Teapod.RoundedPoster"
 | 
			
		||||
                app:srcCompat="@color/md_disabled_text_dark_theme" />
 | 
			
		||||
                app:srcCompat="@color/imagePlacholder" />
 | 
			
		||||
 | 
			
		||||
            <ImageView
 | 
			
		||||
                android:id="@+id/image_episode_play"
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@
 | 
			
		||||
            android:layout_height="108dp"
 | 
			
		||||
            android:contentDescription="@string/component_poster_desc"
 | 
			
		||||
            app:shapeAppearance="@style/ShapeAppearance.Teapod.RoundedPoster"
 | 
			
		||||
            app:srcCompat="@color/md_disabled_text_dark_theme" />
 | 
			
		||||
            app:srcCompat="@color/imagePlacholder" />
 | 
			
		||||
 | 
			
		||||
        <ImageView
 | 
			
		||||
            android:id="@+id/image_episode_play"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										77
									
								
								app/src/main/res/layout/modal_bottom_sheet_login.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								app/src/main/res/layout/modal_bottom_sheet_login.xml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,77 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
			
		||||
    android:id="@+id/standard_bottom_sheet"
 | 
			
		||||
    android:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="match_parent"
 | 
			
		||||
    android:background="?themeSecondary"
 | 
			
		||||
    android:orientation="vertical"
 | 
			
		||||
    android:paddingTop="24dp"
 | 
			
		||||
    android:paddingStart="24dp"
 | 
			
		||||
    android:paddingEnd="24dp"
 | 
			
		||||
    app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
 | 
			
		||||
 | 
			
		||||
        <TextView
 | 
			
		||||
            android:id="@+id/text_title"
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:paddingBottom="7dp"
 | 
			
		||||
            android:text="@string/login"
 | 
			
		||||
            android:textSize="20sp"
 | 
			
		||||
            android:textStyle="bold" />
 | 
			
		||||
 | 
			
		||||
        <TextView
 | 
			
		||||
            android:id="@+id/text_supporting_desc"
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:paddingBottom="5dp"
 | 
			
		||||
            android:text="@string/login_desc" />
 | 
			
		||||
 | 
			
		||||
        <EditText
 | 
			
		||||
            android:id="@+id/edit_text_login"
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:layout_margin="7dp"
 | 
			
		||||
            android:ems="10"
 | 
			
		||||
            android:hint="@string/login"
 | 
			
		||||
            android:importantForAutofill="no"
 | 
			
		||||
            android:inputType="textEmailAddress"
 | 
			
		||||
            android:minHeight="48dp" />
 | 
			
		||||
 | 
			
		||||
        <EditText
 | 
			
		||||
            android:id="@+id/edit_text_password"
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:layout_margin="7dp"
 | 
			
		||||
            android:ems="10"
 | 
			
		||||
            android:hint="@string/password"
 | 
			
		||||
            android:importantForAutofill="no"
 | 
			
		||||
            android:inputType="textPassword"
 | 
			
		||||
            android:minHeight="48dp" />
 | 
			
		||||
 | 
			
		||||
        <LinearLayout
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:gravity="end"
 | 
			
		||||
            android:orientation="horizontal">
 | 
			
		||||
 | 
			
		||||
                <Button
 | 
			
		||||
                    android:id="@+id/negative_button"
 | 
			
		||||
                    style="@android:style/Widget.Material.Button.Borderless.Small"
 | 
			
		||||
                    android:layout_width="wrap_content"
 | 
			
		||||
                    android:layout_height="wrap_content"
 | 
			
		||||
                    android:layout_marginEnd="24dp"
 | 
			
		||||
                    android:text="@string/cancel"
 | 
			
		||||
                    android:textColor="?colorPrimary" />
 | 
			
		||||
 | 
			
		||||
                <Button
 | 
			
		||||
                    android:id="@+id/positive_button"
 | 
			
		||||
                    style="@android:style/Widget.Material.Button.Borderless.Small"
 | 
			
		||||
                    android:layout_width="wrap_content"
 | 
			
		||||
                    android:layout_height="wrap_content"
 | 
			
		||||
                    android:layout_marginEnd="24dp"
 | 
			
		||||
                    android:text="@string/save"
 | 
			
		||||
                    android:textColor="?colorPrimary" />
 | 
			
		||||
        </LinearLayout>
 | 
			
		||||
 | 
			
		||||
</LinearLayout>
 | 
			
		||||
@ -5,6 +5,7 @@
 | 
			
		||||
    <color name="colorPrimaryLight">#99dc45</color>
 | 
			
		||||
    <color name="colorPrimaryDark">#317a00</color>
 | 
			
		||||
    <color name="colorAccent">#607d8b</color>
 | 
			
		||||
    <color name="imagePlacholder">#c2c2c2</color>
 | 
			
		||||
 | 
			
		||||
    <!-- light theme colors -->
 | 
			
		||||
    <color name="themePrimaryLight">#ffffff</color>
 | 
			
		||||
 | 
			
		||||
@ -18,11 +18,6 @@
 | 
			
		||||
        <item name="shapeTextBackground">@color/textBackgroundLight</item>
 | 
			
		||||
        <item name="iconColor">@color/iconColorLight</item>
 | 
			
		||||
        <item name="buttonBackground">@color/buttonBackgroundLight</item>
 | 
			
		||||
        <item name="md_background_color">@color/themeSecondaryLight</item>
 | 
			
		||||
        <item name="md_color_content">@color/textSecondaryLight</item>
 | 
			
		||||
 | 
			
		||||
        <!-- without this, the unchecked single choice buttons while be white -->
 | 
			
		||||
        <item name="md_color_widget_unchecked">@color/textSecondaryLight</item>
 | 
			
		||||
    </style>
 | 
			
		||||
 | 
			
		||||
    <style name="AppTheme.Dark" parent="AppTheme">
 | 
			
		||||
@ -37,11 +32,6 @@
 | 
			
		||||
        <item name="iconColor">@color/iconColorDark</item>
 | 
			
		||||
        <item name="buttonBackground">@color/buttonBackgroundDark</item>
 | 
			
		||||
 | 
			
		||||
        <item name="md_background_color">@color/themeSecondaryDark</item>
 | 
			
		||||
        <item name="md_color_content">@color/textSecondaryDark</item>
 | 
			
		||||
        <!-- without this, the unchecked single choice buttons while be black -->
 | 
			
		||||
        <item name="md_color_widget_unchecked">@color/textSecondaryDark</item>
 | 
			
		||||
 | 
			
		||||
        <item name="materialAlertDialogTheme">@style/ThemeOverlay.App.MaterialAlertDialog.Dark</item>
 | 
			
		||||
        <!-- change on click indicator color for manually set components -->
 | 
			
		||||
        <item name="colorControlHighlight">@color/controlHighlightDark</item>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user