简体   繁体   English

如何在Android中将TextView分为2个单独的TextView

[英]How to divide TextView into 2 Separate TextView in Android

I have a problem with TextView in Android 我在Android中遇到TextView问题

I am making an application like Facebook. 我正在制作Facebook之类的应用程序。 In m.facebook.com, when I open it I see they do one thing specailly. 在m.facebook.com中,当我打开它时,我看到他们专心地做一件事。

(Alice) is writing on (BackStreetBoy1010938920) wall (爱丽丝(Alice))在(BackStreetBoy1010938920)墙上写字

Because the width of Mobile screen is small so the real message like tha 由于“移动”屏幕的宽度很小,因此真实信息如tha

(Alice) is writing on (BackStreet (爱丽丝(Alice))正在(BackStreet

Boy10101009393) wall Boy10101009393)墙

I guess they use TextView for (BackStreetBoy1010938920) but I can't do like this. 我猜他们为(BackStreetBoy1010938920)使用TextView,但是我不能这样做。

Well if you consider facebook, they open a webview on device, since the screen is small the textbox width gets reduced, if you capture the same URL and open it in browser, it takes the complete width of the browser.................. 好吧,如果您考虑使用facebook,他们会在设备上打开一个webview,因为屏幕很小,文本框的宽度会减小,如果您捕获相同的URL并在浏览器中打开它,则会占用浏览器的整个宽度…… ............

Now consider the textView, if you make layout_height="wrap_content", it will take the height of the text and the width will be limited to whatever you provided............ 现在考虑一下textView,如果您使layout_height =“ wrap_content”,它将占用文本的高度,并且宽度将被限制为您提供的任何内容……

Hope it helps a bit........... 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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