Troj
Troj

Reputation: 11911

Android error, when having Edittext lines

This gives me error: EditText messageEdit = (EditText)findViewById(R.id.description_text); Why can I not do like this on a eittext with lines?

This is how the Edittext looks like

     <EditText android:id="@+id/message_text"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:lines="3" 
        android:gravity="top"/>

Upvotes: 2

Views: 405

Answers (1)

Bryan Denny
Bryan Denny

Reputation: 27596

EditText messageEdit = (EditText)findViewById(R.id.description_text);

Shouldn't that be:

EditText messageEdit = (EditText)findViewById(R.id.message_text);

(You're using the wrong ID name?)

Upvotes: 2

Related Questions