Monday, December 10, 2012

[android-developers] edit text begin scroll after second line

i have a EditText in a relativelayout i want the edit text to begin scroll after writing the second line but its not work with me any help with that this is my code xml

      <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@drawable/lback" >

          <EditText
              android:id="@+id/editText1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentLeft="true"
              android:layout_alignParentTop="true"
              android:layout_toLeftOf="@+id/button1"
              android:maxLines="2"
              android:scrollHorizontally="true"
              android:ems="10" >

              <requestFocus />
          </EditText>

          <Button
              android:id="@+id/button1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:layout_alignParentTop="true"
              android:text="Button" />

      </RelativeLayout>

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment