Reputation: 12947
I have a box where a user can input a sentence and send it to a database along with their personal information. I need to have a multiline box so that a sentence or short paragraph can be entered and sent. I am able to send the sentence to the table, but if I go over one line, the data is not received by the db. I can type a full line (just one) sentence in the box, and that will be received just fine by the db, but if I go to a second line, nothing is received (not even the personal info). Any ideas why?
Here is my code for the multiline box:
<EditText
android:id="@+id/incidentDescription"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_margin="3dp"
android:height="100dp"
android:gravity="top">
<requestFocus />
</EditText>
Upvotes: 0
Views: 281
Reputation: 3876
It might be because you haven't set android:inputType="textMultiLine"
. The default behavior of EditText is to allow only 1 line.
Upvotes: 1