开发者

Android error, when having Edittext lines

开发者 https://www.devze.com 2023-01-22 08:47 出处:网络
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 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:lin开发者_JAVA百科es="3" 
        android:gravity="top"/>


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?)

0

精彩评论

暂无评论...
验证码 换一张
取 消