Android spinner automatically pops up the list and sets the title and ttextview to automatically intercept the line break.

Source: Internet
Author: User
Android spinner automatically pops up the list and sets the title. ttextview does not wrap the automatic screenshot method. Search for Android spinner click on stackoverflow to obtain the available result. javasmclick (); // you can set the title.

Spinner. setprompt ("My title ");

 

The pop-up list cannot be listened to when you press the rollback key for the first time. // Unable to listen to the Return key tzone. setonkeylistener (new view. onkeylistener () {@ overridepublic Boolean onkey (view V, int keycode, keyevent event) {If (keycode = keyevent. keycode_back) {log. V ("tag", "onkeylistener"); timezonesetting. this. finish () ;}return false ;}}); --------------------------- textview does not wrap, automatic truncation (automatically added after ...) android: singleline = "true" <textviewandroid: Id = "@ + ID/timezonetv" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: gravity = "right" Android: layout_weight = "2" Android: paddingtop = "15dip" Android: text = "" Android: singleline = "true" Android: textcolor = "# 2a99fb" Android: textsize = "18sp" Android: textstyle = "bold"/>
Related Article

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.