Showing posts with label Multiple lines Edittext. Show all posts
Showing posts with label Multiple lines Edittext. Show all posts

Tuesday, 4 October 2011

Android Multiple lines Edittext Example

In android we can create Edittext with multiple lines using below code in Layout

<LinearLayout 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:background="@android:color/black"
    android:orientation="vertical" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Multiline EditText"
        android:textColor="@android:color/white" />

    <EditText
        android:id="@+id/editext"
        android:layout_width="fill_parent"
        android:layout_height="150dip"
        android:layout_marginLeft="10dip"
        android:layout_marginRight="10dip"
        android:layout_marginTop="10dip"
        android:ems="150"
        android:gravity="left|top"
        android:hint="Please provide your comments here."
        android:inputType="textMultiLine|textCapSentences"
        android:padding="5dip"
        android:scrollbarAlwaysDrawVerticalTrack="true"
        android:textSize="20sp" >
    </EditText>

</LinearLayout>


Output Screen :











Android SQLite Database Viewer or Debuging with Stetho

Every Android Developer uses SQLite Database to store data into the Android Application data. But to view the data in SQLite have a lot of...