Improved the layout of the login screen.

This commit is contained in:
Paul Hawke 2017-09-30 14:39:26 -05:00
parent d37936f7fe
commit 529f5415c3
7 changed files with 490 additions and 79 deletions

View file

@ -12,9 +12,12 @@ dependencies {
compile 'ch.acra:acra:4.7.0' compile 'ch.acra:acra:4.7.0'
compile 'org.mediawiki:api:1.3' compile 'org.mediawiki:api:1.3'
compile 'commons-codec:commons-codec:1.10' compile 'commons-codec:commons-codec:1.10'
compile "com.android.support:support-v4:${project.supportLibVersion}" compile "com.android.support:support-v4:${project.supportLibVersion}"
compile "com.android.support:appcompat-v7:${project.supportLibVersion}" compile "com.android.support:appcompat-v7:${project.supportLibVersion}"
compile "com.android.support:design:${project.supportLibVersion}" compile "com.android.support:design:${project.supportLibVersion}"
compile "com.android.support:cardview-v7:${project.supportLibVersion}"
compile 'com.google.code.gson:gson:2.8.0' compile 'com.google.code.gson:gson:2.8.0'
compile "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION" compile "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
compile 'com.github.pedrovgs:renderers:3.3.3' compile 'com.github.pedrovgs:renderers:3.3.3'

View file

@ -0,0 +1,169 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="320sp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:cardCornerRadius="4dp"
app:cardElevation="4dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/action_bar_blue"
android:gravity="center"
android:paddingBottom="32dp"
android:paddingTop="32dp"
android:text="Login to your account"
android:textColor="@android:color/white"
android:textSize="24sp" />
<android.support.design.widget.TextInputLayout
android:id="@+id/username_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp">
<android.support.design.widget.TextInputEditText
android:id="@+id/loginUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/username"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions">
<requestFocus />
</android.support.design.widget.TextInputEditText>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/password_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/username_container"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
app:passwordToggleEnabled="false">
<android.support.design.widget.TextInputEditText
android:id="@+id/loginPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
android:imeOptions="flagNoExtractUi"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/two_factor_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/password_container"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:visibility="gone"
app:passwordToggleEnabled="false"
tools:visibility="visible">
<android.support.design.widget.TextInputEditText
android:id="@+id/loginTwoFactor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/_2fa_code"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions"
android:visibility="gone"
tools:visibility="visible" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/two_factor_container"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp">
<Button
android:id="@+id/signupButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1"
android:text="@string/signup" />
<Button
android:id="@+id/loginButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:enabled="false"
android:text="@string/login" />
</LinearLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_gravity="center_horizontal"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="32dp"
app:cardElevation="6dp">
<android.support.v7.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
app:srcCompat="@drawable/commons_logo_large" />
</android.support.v7.widget.CardView>
</FrameLayout>
</ScrollView>

View file

@ -0,0 +1,169 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="320sp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:cardCornerRadius="4dp"
app:cardElevation="4dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/action_bar_blue"
android:gravity="center"
android:paddingBottom="32dp"
android:paddingTop="32dp"
android:text="Login to your account"
android:textColor="@android:color/white"
android:textSize="24sp" />
<android.support.design.widget.TextInputLayout
android:id="@+id/username_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp">
<android.support.design.widget.TextInputEditText
android:id="@+id/loginUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/username"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions">
<requestFocus />
</android.support.design.widget.TextInputEditText>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/password_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/username_container"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
app:passwordToggleEnabled="false">
<android.support.design.widget.TextInputEditText
android:id="@+id/loginPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
android:imeOptions="flagNoExtractUi"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/two_factor_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/password_container"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:visibility="gone"
app:passwordToggleEnabled="false"
tools:visibility="visible">
<android.support.design.widget.TextInputEditText
android:id="@+id/loginTwoFactor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/_2fa_code"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions"
android:visibility="gone"
tools:visibility="visible" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/two_factor_container"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp">
<Button
android:id="@+id/signupButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1"
android:text="@string/signup" />
<Button
android:id="@+id/loginButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:enabled="false"
android:text="@string/login" />
</LinearLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_gravity="center_horizontal"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="32dp"
app:cardElevation="6dp">
<android.support.v7.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
app:srcCompat="@drawable/commons_logo_large" />
</android.support.v7.widget.CardView>
</FrameLayout>
</ScrollView>

View file

@ -1,100 +1,169 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView 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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
>
<LinearLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_margin="16dp" android:layout_height="wrap_content"
android:gravity="center" android:layout_marginTop="16dp"
android:orientation="vertical" android:layout_marginBottom="16dp"
> android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp">
<TextView <android.support.v7.widget.CardView
android:id="@+id/loginSubtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="48dp"
android:drawablePadding="8dp"
android:drawableTop="@drawable/commons_logo_large"
android:gravity="center_horizontal"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
> android:layout_marginTop="32dp"
app:cardCornerRadius="4dp"
app:cardElevation="4dp">
<android.support.design.widget.TextInputEditText <RelativeLayout
android:id="@+id/loginUsername"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/username" android:gravity="center"
android:imeOptions="flagNoExtractUi" android:orientation="vertical">
android:inputType="textNoSuggestions"
>
<requestFocus/> <TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/action_bar_blue"
android:gravity="center"
android:paddingBottom="32dp"
android:paddingTop="32dp"
android:text="Login to your account"
android:textColor="@android:color/white"
android:textSize="24sp" />
</android.support.design.widget.TextInputEditText> <android.support.design.widget.TextInputLayout
android:id="@+id/username_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp">
</android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputEditText
android:id="@+id/loginUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/username"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions">
<android.support.design.widget.TextInputLayout <requestFocus />
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="false"
>
<android.support.design.widget.TextInputEditText </android.support.design.widget.TextInputEditText>
android:id="@+id/loginPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
android:imeOptions="flagNoExtractUi"
android:inputType="textPassword"
/>
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout <android.support.design.widget.TextInputLayout
android:layout_width="match_parent" android:id="@+id/password_container"
android:layout_height="wrap_content" android:layout_width="match_parent"
app:passwordToggleEnabled="false" android:layout_height="wrap_content"
> android:layout_below="@id/username_container"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
app:passwordToggleEnabled="false">
<android.support.design.widget.TextInputEditText <android.support.design.widget.TextInputEditText
android:id="@+id/loginTwoFactor" android:id="@+id/loginPassword"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/_2fa_code" android:hint="@string/password"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions" android:inputType="textPassword" />
android:visibility="gone"
/>
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
<Button <android.support.design.widget.TextInputLayout
android:id="@+id/loginButton" android:id="@+id/two_factor_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:enabled="false" android:layout_below="@id/password_container"
android:text="@string/login" android:layout_marginBottom="16dp"
/> android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:visibility="gone"
app:passwordToggleEnabled="false"
tools:visibility="visible">
<Button <android.support.design.widget.TextInputEditText
android:id="@+id/signupButton" android:id="@+id/loginTwoFactor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/_2fa_code"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions"
android:visibility="gone"
tools:visibility="visible" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/two_factor_container"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp">
<Button
android:id="@+id/signupButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1"
android:text="@string/signup" />
<Button
android:id="@+id/loginButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:enabled="false"
android:text="@string/login" />
</LinearLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:text="@string/signup" app:cardBackgroundColor="@android:color/white"
/> app:cardCornerRadius="32dp"
app:cardElevation="6dp">
<android.support.v7.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
app:srcCompat="@drawable/commons_logo_large" />
</android.support.v7.widget.CardView>
</FrameLayout>
</LinearLayout>
</ScrollView> </ScrollView>

View file

@ -54,7 +54,7 @@
<string name="gps_disabled">आपके डिवाइस में जीपीएस अक्षम है। क्या आप इसे सक्षम करना चाहेंगे?</string> <string name="gps_disabled">आपके डिवाइस में जीपीएस अक्षम है। क्या आप इसे सक्षम करना चाहेंगे?</string>
<string name="enable_gps">जीपीएस सक्षम करें</string> <string name="enable_gps">जीपीएस सक्षम करें</string>
<string name="contributions_subtitle_zero">अभी तक कोई अपलोड नहीं</string> <string name="contributions_subtitle_zero">अभी तक कोई अपलोड नहीं</string>
<string name="contributions_subtitle">{{PLURAL | शून्य = @ स्ट्रिंग / योगदान_उपशीर्षक_शुन्य | एक =% d अपलोड |% d अपलोड्स}}</string> <string name="contributions_subtitle" formatted="false">{{PLURAL | शून्य = @ स्ट्रिंग / योगदान_उपशीर्षक_शुन्य | एक =% d अपलोड |% d अपलोड्स}}</string>
<plurals name="starting_multiple_uploads"> <plurals name="starting_multiple_uploads">
<item quantity="one">%d अपलोड शुरू</item> <item quantity="one">%d अपलोड शुरू</item>
<item quantity="other">%d अपलोड शुरू</item> <item quantity="other">%d अपलोड शुरू</item>

View file

@ -16,5 +16,6 @@ allprojects {
repositories { repositories {
jcenter() jcenter()
maven { url "https://jitpack.io" } maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
} }
} }

View file

@ -1,13 +1,13 @@
gradleVersion = 2.3.3 gradleVersion = 2.3.3
supportLibVersion = 25.3.1 supportLibVersion = 26.1.0
compileSdkVersion = android-25 compileSdkVersion = android-26
buildToolsVersion = 26.0.1 buildToolsVersion = 26.0.1
minSdkVersion = 15 minSdkVersion = 15
targetSdkVersion = 25 targetSdkVersion = 26
android.useDeprecatedNdk=true android.useDeprecatedNdk=true
# Library dependencies # Library dependencies