简体   繁体   中英

How do I make an EditText have a certain maximum width, but not go off the screen?

I'm trying to set up an EditText that has a set width, but if the screen is smaller than this width, does not extend off the screen. I've tried a number of variations of layout_width and maxWidth and the like, but to no avail. Any ideas?

I think you can find what you are searching for on Android Developers.

Check this link look for section "How to support multiple screens"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM