loginscreen make as scrollable

parent f44312e4
...@@ -31,7 +31,7 @@ android { ...@@ -31,7 +31,7 @@ android {
defaultConfig { defaultConfig {
applicationId "com.vsoft.uoflservicenow" applicationId "com.vsoft.uoflservicenow"
minSdkVersion 9 minSdkVersion 15
targetSdkVersion 24 targetSdkVersion 24
versionCode 1 versionCode 1
versionName "0.0.4" versionName "0.0.4"
......
...@@ -97,15 +97,8 @@ public class LoginScreen extends Activity { ...@@ -97,15 +97,8 @@ public class LoginScreen extends Activity {
userName.setError(getResources().getString (R.string.user_error)); userName.setError(getResources().getString (R.string.user_error));
return; return;
}else if(TextUtils.isEmpty(passwordStrng)) {
password.setError(getResources().getString (R.string.pasw_error));
return;
} }
else if(TextUtils.isEmpty(userNameStrng)||TextUtils.isEmpty(passwordStrng)) { else if(!TextUtils.isEmpty(userNameStrng) && !TextUtils.isEmpty(passwordStrng)){
userName.setError(getResources().getString (R.string.user_error));
password.setError(getResources().getString (R.string.pasw_error));
return;
}else if(!TextUtils.isEmpty(userNameStrng) && !TextUtils.isEmpty(passwordStrng)){
new LoginDetailsSendToServer().execute(userName.getText().toString().trim(), password.getText().toString().trim()); new LoginDetailsSendToServer().execute(userName.getText().toString().trim(), password.getText().toString().trim());
} }
......
...@@ -53,7 +53,6 @@ public class MyRequestActivity extends AppCompatActivity { ...@@ -53,7 +53,6 @@ public class MyRequestActivity extends AppCompatActivity {
actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setElevation(0); actionBar.setElevation(0);
actionBar.setTitle(R.string.my_reques_string); actionBar.setTitle(R.string.my_reques_string);
actionBar.setTitle(R.string.my_reques_string);
actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowHomeEnabled(false);
actionBar.setDisplayShowTitleEnabled(true); actionBar.setDisplayShowTitleEnabled(true);
} }
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@android:color/holo_red_dark"
android:pathData="M15.41,7.41L14,6l-6,6 6,6 1.41,-1.41L10.83,12z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:background="#FFF" android:background="#FFF"
android:gravity="center" android:gravity="center"
android:id="@+id/login_scroll"
android:orientation="vertical"> android:orientation="vertical">
<ScrollView <ScrollView
android:id="@+id/login_scroll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scrollbarStyle="insideOverlay" android:scrollbarStyle="insideOverlay"
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:background="@drawable/ic_login_layout_bg" android:background="@drawable/ic_login_layout_bg"
android:orientation="vertical" android:orientation="vertical"
...@@ -44,12 +45,15 @@ ...@@ -44,12 +45,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/username_under_bg_box" android:background="@drawable/username_under_bg_box"
android:hint="Username" android:hint="Username"
android:layout_marginLeft="20dp" android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="20dp" android:layout_marginRight="@dimen/login_screen_margin_right"
android:padding="10dp" android:padding="@dimen/normal_margin"
android:inputType="text"
android:cursorVisible="true"
android:text=""
android:drawableLeft="@mipmap/ic_user_icon" android:drawableLeft="@mipmap/ic_user_icon"
android:singleLine="true">
android:singleLine="true" /> </EditText>
<EditText <EditText
android:id="@+id/login_screen_password_edit_text" android:id="@+id/login_screen_password_edit_text"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -57,30 +61,31 @@ ...@@ -57,30 +61,31 @@
android:background="@drawable/username_under_bg_box" android:background="@drawable/username_under_bg_box"
android:hint="Password" android:hint="Password"
android:drawableLeft="@mipmap/ic_password_icon" android:drawableLeft="@mipmap/ic_password_icon"
android:inputType="textPassword" android:inputType="textPassword"
android:padding="10dp" android:padding="@dimen/normal_margin"
android:layout_marginLeft="20dp" android:text=""
android:layout_marginRight="20dp" android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="@dimen/login_screen_margin_right"
android:singleLine="true" /> android:singleLine="true" />
<TextView <TextView
android:id="@+id/login_screen_login_text_view" android:id="@+id/login_screen_login_text_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="wrap_content"
android:layout_gravity="left" android:layout_marginTop="@dimen/normal_margin"
android:layout_marginTop="10dp" android:paddingBottom="@dimen/normal_margin"
android:layout_marginBottom="10dp" android:paddingTop="@dimen/normal_margin"
android:padding="10dp" android:textColor="@android:color/white"
android:background="@drawable/login_bg" android:background="@drawable/login_bg"
android:layout_marginLeft="20dp" android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="20dp" android:layout_marginRight="@dimen/login_screen_margin_right"
android:text="@string/login_screen_login_string" android:text="@string/login_screen_login_string"
android:textAlignment="center" android:textAlignment="center"
android:textSize="@dimen/extra_normal_text_size"
/> />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</LinearLayout> </ScrollView>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ic_login_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="@dimen/login_screen_layout_margin_bottom"
android:layout_marginLeft="@dimen/login_screen_layout_margin_left"
android:layout_marginRight="@dimen/login_screen_layout_margin_right"
android:layout_marginTop="@dimen/login_screen_layout_margin_top"
android:orientation="vertical">
<EditText
android:id="@+id/login_screen_username_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="@dimen/login_screen_margin_right"
android:background="@drawable/username_under_bg_box"
android:drawableLeft="@mipmap/ic_user_icon"
android:hint="@string/login_screen_user_name_string"
android:lines="1"
android:singleLine="true"
android:text="a0kuma18"
android:textCursorDrawable="@null" />
<EditText
android:id="@+id/login_screen_password_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="@dimen/login_screen_margin_right"
android:background="@drawable/username_under_bg_box"
android:drawableLeft="@mipmap/ic_password_icon"
android:hint="@string/login_screen_password_string"
android:inputType="textPassword"
android:lines="1"
android:singleLine="true"
android:text="v$0ftA$win"
android:textCursorDrawable="@null" />
<TextView
android:id="@+id/login_screen_login_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="@dimen/login_screen_margin_right"
android:layout_marginTop="@dimen/login_screen_login_bottom"
android:background="@drawable/login_bg"
android:paddingBottom="@dimen/normal_margin"
android:paddingTop="@dimen/normal_margin"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="@dimen/extra_normal_text_size" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout 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"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/screen_bg_color"> android:background="@color/screen_bg_color"
android:orientation="vertical">
<android.support.v7.widget.Toolbar <android.support.v7.widget.Toolbar
android:id="@+id/tool_bar_view" android:id="@+id/tool_bar_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="0dp" android:layout_margin="0dp"
android:background="@android:color/white" android:background="@android:color/white"
android:minHeight="?attr/actionBarSize" android:minHeight="?attr/actionBarSize"
android:padding="0dp" android:padding="0dp"
app:contentInsetEnd="0dp" app:contentInsetEnd="0dp"
app:contentInsetLeft="0dp" app:contentInsetLeft="0dp"
app:contentInsetRight="0dp" app:contentInsetRight="0dp"
app:contentInsetStart="0dp"/> app:contentInsetStart="0dp"/>
<ListView <ListView
android:id="@+id/request_screen_list_view" android:id="@+id/request_screen_list_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@android:color/white"
android:layout_margin="8dp" android:layout_margin="8dp"
android:padding="10dp" android:background="@android:color/white"
android:divider="#8e8e8e" android:divider="#8e8e8e"
android:dividerHeight="0.5dp" android:dividerHeight="0.5dp"
android:scrollbars="none"/> android:padding="10dp"
android:scrollbars="none" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
<dimen name="list_item_height">100dp</dimen> <dimen name="list_item_height">100dp</dimen>
<!--Login Screen--> <!--Login Screen-->
<dimen name="login_screen_margin_left">20dp</dimen> <dimen name="login_screen_margin_left">30dp</dimen>
<dimen name="login_screen_margin_right">20dp</dimen> <dimen name="login_screen_margin_right">30dp</dimen>
<dimen name="login_screen_login_bottom">15dp</dimen> <dimen name="login_screen_login_bottom">15dp</dimen>
<dimen name="login_screen_layout_margin_left">20dp</dimen> <dimen name="login_screen_layout_margin_left">20dp</dimen>
<dimen name="login_screen_layout_margin_right">20dp</dimen> <dimen name="login_screen_layout_margin_right">20dp</dimen>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment