Android:inputtype problems

Source: Internet
Author: User


1. In the XML code implementation is relatively simple, directly set android:inputtype= "Textmultiline":

[Mw_shl_code=java,true]<edittext
Android:id= "@+id/edittext1"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
Android:inputtype= "Textmultiline" >[/mw_shl_code]

2. In the code, I take it for granted that Et.setinputtype (Inputtype.type_text_flag_multi_line) is set;
But found that there was no effect at all. Checked the API.

Originally, InputType is not directly set up an identity (flag) can be. You must specify class, and match variable or flag to achieve the effect.

Then, change the code to Et.setinputtype(Inputtype.type_class_text | inputtype.type_text_flag_multi_line ) It's OK!

Android:inputtype problems

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.