Android Scrollview: Scrollview

When there are so many contents on the user interface provided by activity that the current mobile phone screen cannot fully display all the contents, you need to scroll the view to help browse all the contents. Taking the project widgetdemo as an example, because buttons and other components are constantly added to the main.xml file during the description, it can not display all the contents at present. The effect is shown in Figure 1.

At this time, you need to use Scrollview to convert the current activity view into a scrolling view for easy browsing. The use of Scrollview is very convenient. Just add the declaration of Scrollview component outside the < LinearLayout > tag of main.xml. The contents of the layout file main.xml are as follows:

After adding Scrollview, the operation effect of the main.xml layout is shown in Figure 2.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>