Commit 2f329ed7 by npadhy

login in keyboard hiden

parent a465a9a0
......@@ -34,7 +34,7 @@ android {
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "0.0.5"
versionName "0.0.6"
multiDexEnabled true
}
buildTypes {
......
......@@ -52,7 +52,7 @@
android:name="com.vsoft.uoflservicenow.ui.LoginScreen"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan">
android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
......
......@@ -24,6 +24,7 @@ import com.vsoft.uoflservicenow.utils.Util;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* Created by kvemulavada on 8/30/2016.
......@@ -49,10 +50,9 @@ public class MyRequestActivity extends AppCompatActivity {
setSupportActionBar(mToolbar);
ActionBar actionBar = getSupportActionBar();
if(actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
if (actionBar != null) {
actionBar.setElevation(0);
actionBar.setTitle(R.string.my_reques_string);
actionBar.setTitle("");
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setDisplayShowTitleEnabled(true);
}
......@@ -68,6 +68,10 @@ public class MyRequestActivity extends AppCompatActivity {
}
}
@OnClick(R.id.nav_back)
public void backButtonClick() {
finish();
}
class FetchMyRequestData extends AsyncTask<String, Void, SyncStatus> {
private ProgressDialog progressDialog;
......
package com.vsoft.uoflservicenow.utils;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
/**
* Created by npadhy on 9/6/2016.
*/
public class KeyboardUtil
{
public static void hideKeyboard(Activity activity)
{
try
{
InputMethodManager inputManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
}
catch (Exception e)
{
// Ignore exceptions if any
Log.e("KeyBoardUtil", e.toString(), e);
}
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="34dp"
android:height="34dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#E41B23"
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:width="35dp"
android:height="45dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@android:color/holo_red_dark"
android:fillColor="#FF0000"
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"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#FFF"
android:gravity="center"
android:id="@+id/login_scroll"
android:orientation="vertical">
<ScrollView
android:id="@+id/login_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="insideOverlay"
android:animateLayoutChanges="true"
>
android:scrollbarStyle="insideOverlay"
android:animateLayoutChanges="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
>
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_login_banner"
/>
android:background="@drawable/ic_login_banner" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_login_layout_bg"
android:orientation="vertical"
>
android:orientation="vertical">
<EditText
android:id="@+id/login_screen_username_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/username_under_bg_box"
android:hint="Username"
android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="@dimen/login_screen_margin_right"
android:padding="@dimen/normal_margin"
android:inputType="text"
android:cursorVisible="true"
android:hint="Username"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:padding="10dp"
android:text="a0kuma18"
android:drawableLeft="@mipmap/ic_user_icon"
android:singleLine="true">
</EditText>
android:singleLine="true" />
<EditText
android:id="@+id/login_screen_password_edit_text"
android:layout_width="match_parent"
......@@ -62,30 +46,28 @@
android:hint="Password"
android:drawableLeft="@mipmap/ic_password_icon"
android:inputType="textPassword"
android:padding="@dimen/normal_margin"
android:padding="10dp"
android:text="v$0ftA$win"
android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="@dimen/login_screen_margin_right"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:singleLine="true" />
<TextView
android:id="@+id/login_screen_login_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/normal_margin"
android:paddingBottom="@dimen/normal_margin"
android:paddingTop="@dimen/normal_margin"
android:layout_gravity="left"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textColor="@android:color/white"
android:background="@drawable/login_bg"
android:layout_marginLeft="@dimen/login_screen_margin_left"
android:layout_marginRight="@dimen/login_screen_margin_right"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:textSize="@dimen/large_text_size"
android:text="@string/login_screen_login_string"
android:textAlignment="center"
android:textSize="@dimen/extra_normal_text_size"
/>
android:textAlignment="center" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
......@@ -5,27 +5,41 @@
android:layout_height="match_parent"
android:background="@color/screen_bg_color"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/tool_bar_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:background="@android:color/white"
android:minHeight="?attr/actionBarSize"
android:padding="0dp"
app:contentInsetEnd="0dp"
app:contentInsetLeft="0dp"
app:contentInsetRight="0dp"
app:contentInsetStart="0dp"/>
android:id="@+id/tool_bar_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:minHeight="?attr/actionBarSize"
app:titleTextColor="@color/tool_bar_title_color">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true">
<ImageView
android:id="@+id/nav_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:src="@drawable/ic_arrow_back_black_24dp"
android:layout_alignParentLeft="true"
/>
<TextView
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:text="@string/my_reques_string"
android:textColor="@color/tool_bar_title_color" />
</RelativeLayout>
</android.support.v7.widget.Toolbar>
<ListView
android:id="@+id/request_screen_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:layout_margin="10dp"
android:background="@android:color/white"
android:divider="#8e8e8e"
android:dividerHeight="0.5dp"
......
......@@ -11,10 +11,11 @@
<color name="home_screen_bg_color">@color/colorPrimary</color>
<color name="screen_bg_color">#c0cfd1</color>
<color name="screen_bg_color">#c2d1d3</color>
<color name="bg_border_color">#d6d6d6</color>
<color name="back_button_bg_color">#4f0307</color>
<color name="submit_button_bg_color">#e31b22</color>
<color name="divider_color">#c9c8cc</color>
<color name="tool_bar_title_color">#E41B23</color>
</resources>
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