redesign login layout

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/commit/bba14cae
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/bba14cae
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/bba14cae

Branch: refs/heads/master
Commit: bba14cae2cb72dd1d23295fb16aaca014f9ce63d
Parents: 6a86cee
Author: Sagar <[email protected]>
Authored: Fri Jul 29 23:54:56 2016 +0530
Committer: Sagar <[email protected]>
Committed: Fri Jul 29 23:54:56 2016 +0530

----------------------------------------------------------------------
 .../main/res/layout-xlarge/fragment_login.xml   | 142 -------------
 app/src/main/res/layout/fragment_login.xml      | 202 +++++++++----------
 2 files changed, 94 insertions(+), 250 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/bba14cae/app/src/main/res/layout-xlarge/fragment_login.xml
----------------------------------------------------------------------
diff --git a/app/src/main/res/layout-xlarge/fragment_login.xml 
b/app/src/main/res/layout-xlarge/fragment_login.xml
deleted file mode 100644
index fb2d564..0000000
--- a/app/src/main/res/layout-xlarge/fragment_login.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<!--
-Apache Taverna Mobile
-Copyright 2015 The Apache Software Foundation
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android";
-    xmlns:tools="http://schemas.android.com/tools"; 
android:layout_width="match_parent"
-    android:layout_height="match_parent" 
android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    tools:context=".LoginActivity$PlaceholderFragment">
-
-    <ImageView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/logo"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:src="@mipmap/ic_launcher"
-        android:elevation="5dp"
-        android:contentDescription="@string/brand" />
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/app_name"
-        android:id="@+id/textView3"
-        android:layout_below="@+id/logo"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="42dp"
-        android:typeface="normal"
-        android:textSize="25sp" />
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:layout_below="@+id/textView3"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true"
-
-        android:layout_marginEnd="150dp"
-        android:layout_marginRight="150dp"
-        android:layout_marginLeft="150dp"
-        android:layout_marginStart="150dp"
-        android:padding="20dp"
-        android:background="#fff"
-        android:id="@+id/loginlayout">
-
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="45dp"
-            android:text="@string/Logininfo"
-            android:id="@+id/textView4"
-            android:textStyle="normal|bold|italic"
-            android:textSize="20sp"
-            android:layout_gravity="center"
-            android:layout_marginTop="20dp"
-            android:background="#E1E1E1"
-            android:textAlignment="center"
-            android:typeface="normal"
-            android:elevation="10dp"
-            android:ellipsize="middle" />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="@string/loginusername"
-            android:id="@+id/textView5"
-            android:layout_marginTop="10dp" />
-
-        <EditText
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:id="@+id/editTextUsername"
-            android:drawableStart="@android:drawable/sym_action_email"
-            android:drawableLeft="@android:drawable/sym_action_email"/>
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="@string/loginpassword"
-            android:id="@+id/textView6"
-            android:layout_marginTop="10dp" />
-
-        <EditText
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:inputType="textPassword"
-            android:ems="10"
-            android:id="@+id/edittextPassword"
-            android:drawableStart="@android:drawable/ic_secure"
-            android:drawableLeft="@android:drawable/ic_secure"/>
-
-        <Button
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/loginbutton"
-            android:id="@+id/loginbutton"
-            android:layout_gravity="center_horizontal"
-            android:background="#1F9FEA"
-            android:layout_marginTop="10dp"
-            android:drawableLeft="@android:drawable/ic_menu_set_as"
-            android:elevation="5dp" />
-
-        <LinearLayout
-            android:orientation="horizontal"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:text="@string/brand"
-                android:id="@+id/textView7"
-                android:paddingTop="20dp"
-                android:textSize="20sp"
-                android:layout_gravity="center_horizontal"
-                android:gravity="center|center_horizontal" />
-
-        </LinearLayout>
-
-    </LinearLayout>
-</RelativeLayout>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/bba14cae/app/src/main/res/layout/fragment_login.xml
----------------------------------------------------------------------
diff --git a/app/src/main/res/layout/fragment_login.xml 
b/app/src/main/res/layout/fragment_login.xml
index 37ebb53..4345b1e 100644
--- a/app/src/main/res/layout/fragment_login.xml
+++ b/app/src/main/res/layout/fragment_login.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 Apache Taverna Mobile
 Copyright 2015 The Apache Software Foundation
@@ -18,133 +19,118 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 -->
 <ScrollView
-        xmlns:android="http://schemas.android.com/apk/res/android";
-        xmlns:tools="http://schemas.android.com/tools";
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android";
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    tools:context=".LoginActivity$PlaceholderFragment">
-
-    <ImageView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/logo"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:src="@mipmap/ic_launcher"
-        android:elevation="5dp"
-        android:contentDescription="@string/brand" />
-
-    <TextView
-        android:layout_width="wrap_content"
+    android:layout_height="match_parent">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:text="@string/app_name"
-        android:id="@+id/textView3"
-        android:layout_below="@+id/logo"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="42dp"
-        android:typeface="normal"
-        android:textSize="25sp" />
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:layout_below="@+id/textView3"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true"
-        android:padding="20dp"
-        android:background="#fff"
-        android:id="@+id/loginlayout">
+        android:paddingBottom="@dimen/activity_vertical_margin"
+        android:paddingLeft="@dimen/activity_horizontal_margin"
+        android:paddingRight="@dimen/activity_horizontal_margin"
+        android:paddingTop="@dimen/activity_vertical_margin">
 
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="45dp"
-            android:text="@string/Logininfo"
-            android:id="@+id/textView4"
-            android:textStyle="normal|bold|italic"
-            android:textSize="20sp"
-            android:layout_gravity="center"
-            android:layout_marginTop="20dp"
-            android:background="#E1E1E1"
-            android:textAlignment="center"
-            android:typeface="normal"
-            android:elevation="10dp"
-            android:ellipsize="middle" />
+        <ImageView
+            android:id="@+id/logo"
+            android:layout_width="60dp"
+            android:layout_height="60dp"
+            android:layout_alignParentTop="true"
+            android:layout_centerHorizontal="true"
+            android:contentDescription="@string/brand"
+            android:src="@mipmap/ic_launcher"/>
 
         <TextView
+            android:id="@+id/tvAppName"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="@string/loginusername"
-            android:id="@+id/textView5"
-            android:layout_marginTop="10dp" />
+            android:layout_below="@+id/logo"
+            android:layout_centerHorizontal="true"
+            android:layout_marginTop="42dp"
+            android:text="@string/app_name"
+            android:textSize="25sp"/>
 
-        <EditText
+        <LinearLayout
+            android:id="@+id/loginlayout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:id="@+id/editTextUsername"
-            android:drawableStart="@android:drawable/sym_action_email"
-            android:drawableLeft="@android:drawable/sym_action_email"/>
+            android:layout_below="@+id/tvAppName"
+            android:layout_centerInParent="true"
+            android:layout_marginTop="20dp"
+            android:background="@android:color/white"
+            android:orientation="vertical"
+            android:padding="20dp">
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="@string/loginpassword"
-            android:id="@+id/textView6"
-            android:layout_marginTop="10dp" />
+            <TextView
+                android:id="@+id/tvLoginInfo"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:background="#E1E1E1"
+                android:padding="10dp"
+                android:text="@string/LoginInfo"
+                android:textSize="20sp"
+                android:textStyle="normal|bold"
+                />
 
-        <EditText
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:inputType="textPassword"
-            android:ems="10"
-            android:id="@+id/edittextPassword"
-            android:drawableStart="@android:drawable/ic_secure"
-            android:drawableLeft="@android:drawable/ic_secure"/>
+            <android.support.design.widget.TextInputLayout
+                android:id="@+id/input_layout_email"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="20dp">
 
-        <CheckBox
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/keeplogin"
-            android:id="@+id/rememberCheckbox" />
+                <EditText
+                    android:id="@+id/etEmail"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="@string/hint_email"
+                    android:singleLine="true"/>
 
-        <Button
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/loginbutton"
-            android:id="@+id/loginbutton"
-            android:layout_gravity="center_horizontal"
-            android:background="#1F9FEA"
-            android:layout_marginTop="10dp"
-            android:drawableLeft="@android:drawable/ic_menu_set_as"
-            android:elevation="5dp" />
+            </android.support.design.widget.TextInputLayout>
+
+            <android.support.design.widget.TextInputLayout
+                android:id="@+id/input_layout_password"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="20dp">
+
+                <EditText
+                    android:id="@+id/etPassword"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="@string/hint_password"
+                    android:inputType="textPassword"
+                    android:singleLine="true"/>
+
+            </android.support.design.widget.TextInputLayout>
+
+            <CheckBox
+                android:id="@+id/cbRemember"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/keepLogin"/>
+
+            <Button
+                android:id="@+id/bLogin"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_horizontal"
+                android:background="@color/colorPrimary"
+                android:contentDescription="@string/bLoginDescription"
+                android:text="@string/bLogin"
+                android:textSize="18sp"/>
 
-        <LinearLayout
-            android:orientation="horizontal"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
 
             <TextView
                 android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:text="@string/brand"
-                android:id="@+id/textView7"
-                android:paddingTop="20dp"
-                android:textSize="20dp"
+                android:layout_height="wrap_content"
+                android:layout_gravity="bottom"
                 android:gravity="center|center_horizontal"
-                android:layout_gravity="center_horizontal" />
+                android:paddingTop="20dp"
+                android:text="@string/brand"
+                android:textAppearance="?android:attr/textAppearanceSmall"/>
 
-        </LinearLayout>
 
-    </LinearLayout>
-</RelativeLayout>
+        </LinearLayout>
+    </RelativeLayout>
 </ScrollView>
\ No newline at end of file

Reply via email to