how to use text box in android studio



-------------------------------buttonbox---------------------


<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"    android:shape="rectangle">
    <gradient android:startColor="@android:color/transparent"        android:endColor="@android:color/transparent"        android:angle="270" />
    <corners android:radius="30dp" />
    <stroke android:width="5px" android:color="@android:color/white" />
</shape>

===========================end button box=====================

-----------------------------textboxes.xml--------------------
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"    android:shape="rectangle" android:padding="10dp">
    <solid android:color="@color/teal"/>
    <corners        android:bottomRightRadius="20dp"        android:bottomLeftRadius="20dp"        android:topLeftRadius="20dp"        android:topRightRadius="20dp"/>
    <stroke android:width="1dp" android:color="@color/bgcolor" />
</shape>
========================end textboxes.xml===========================



<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:background="@drawable/backk"    android:fillViewport="false"    android:fitsSystemWindows="true">

    <LinearLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:orientation="vertical"        android:paddingLeft="24dp"        android:paddingRight="24dp"        android:paddingTop="40dp">

        <LinearLayout            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_marginBottom="30dp"            android:layout_marginTop="8dp"            android:orientation="vertical">

            <ImageView                android:layout_width="70dp"                android:layout_height="70dp"                android:layout_gravity="center_horizontal"                android:src="@drawable/just" />

            <TextView
                android:id="@+id/gg"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:gravity="center"                android:text="@string/name_of_university"                android:textColor="#123456"                android:textSize="12sp"
                />

            <TextView
                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:gravity="center"                android:text="@string/admission_2017_18"                android:textColor="#FF5722"                android:textSize="16sp" />

            <TextView
                android:id="@+id/msg"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_marginTop="20dp"                android:gravity="center"                android:text=""                android:textColor="@color/red"                android:textSize="16sp" />

            <TextView
                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:gravity="center"                android:text="@string/seatplan"                android:textSize="20sp" />
        </LinearLayout>

        <!-- unit Label -->        <LinearLayout            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_marginBottom="8dp"            android:layout_marginTop="8dp"            android:background="@drawable/buttonbox">


            <Spinner                android:id="@+id/unitspiner"                android:layout_width="match_parent"                android:layout_height="45dp"                android:entries="@array/unit_name"                android:gravity="center"                android:prompt="@string/unit_prom">

            </Spinner>
        </LinearLayout>

        <!-- Roll Label -->        <LinearLayout            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_marginBottom="8dp"            android:layout_marginTop="8dp">

            <EditText                android:id="@+id/rollnum"                android:layout_width="match_parent"                android:layout_height="50dp"                android:background="@drawable/buttonbox"                android:gravity="center"                android:hint="@string/enter_7_digits_roll_ex_1000001"                android:inputType="numberDecimal|numberSigned|none"                android:maxLength="7"                android:textColor="#000"                android:textColorHint="#fff" />

        </LinearLayout>

        <Button            android:id="@+id/btn_login"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_marginBottom="24dp"            android:layout_marginTop="24dp"            android:background="@drawable/textboxes"            android:onClick="Signin"            android:padding="12dp"            android:text="@string/submit"            android:textColor="#fff"            android:textStyle="bold" />


    </LinearLayout>
</ScrollView>

Comments

Popular posts from this blog

Can't import database through phpmyadmin file size too large xampp

incompatible hax module version 3 requires minimum version 4 no accelerator found