I am trying to use an EditText
in my app.I have used match_parent
for the EditText
.When i try to enter some text in that EditText then it gets shifted to left and henceforth the earlier text goes out of screen.All of this is done inside a scrollview
.
I want that all the text written should be visible on the screen.
Here is activity_main.xml
.
<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:orientation="vertical"
tools:context=".MainActivity" >
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="300dp"
android:id="@+id/editText"
android:inputType="text"
/>
</ScrollView>
</LinearLayout>