Click here to Skip to main content
15,887,442 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
<?xml version="1.0" encoding="utf-8"?><!--<ScrollView -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:background="@drawable/loginbg">


<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#80FFFFFF">


>


<LinearLayout
android:id="@+id/linearheader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"

android:layout_centerHorizontal="true"

android:orientation="vertical">

<ImageView
android:id="@+id/appicon"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="110dp"
android:src="@drawable/applogo" />


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearamainbody"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearheader"

android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:orientation="vertical"

>


<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_name"


android:layout_width="match_parent"
android:layout_height="wrap_content">

<EditText
android:id="@+id/input_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/username"
android:singleLine="true" />


<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_passwrd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleDrawable="@drawable/eyetoggle"
app:passwordToggleEnabled="true"
app:passwordToggleTint="@color/black">

<EditText
android:id="@+id/input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
android:inputType="textPassword" />



<button
android:id="@+id/btn_login"
="" android:layout_width="150dp" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_margintop="30dp" android:text="@string/Login">

<TextView
android:id="@+id/txt_forgotpass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="15dp"
android:clickable="true"
android:text="@string/forgotpassword" />









What I have tried:

Tried everything it only works when i add more content logically it should work when keyboard is on.
Posted
Updated 29-Jul-18 21:16pm
Comments
Richard MacCutchan 26-Jul-18 9:29am    
What does "not working" mean, and what does "it should work when keyboard is on." mean?

Please edit your question and add some proper detail, including the code that actually sets data into the view.

1 solution

Use this instead

XML
<pre><?xml version="1.0" encoding="utf-8"?><!--<ScrollView -->
<RelativeLayout android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#80FFFFFF"
    xmlns:android="http://schemas.android.com/apk/res/android">
>


    <ScrollView 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:background="#eee">



        <LinearLayout
            android:id="@+id/linearheader"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"

            android:layout_centerHorizontal="true"

            android:orientation="vertical">

            <ImageView
                android:id="@+id/appicon"
                android:layout_width="200dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="110dp"
                android:src="@drawable/applogo" />




            </LinearLayout>

        </ScrollView>

    </RelativeLayout>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900