在Android的滚动布局 [英] Scrollable layout in Android
本文介绍了在Android的滚动布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个登记表的LinearLayout
,如下所示:
I have a registration form in a LinearLayout
as shown below:
在模拟器的屏幕是它的它工作正常默认位置。但是,当我旋转模拟器的屏幕就只显示这是适合屏幕和其余被包裹起来的元素。如下面屏幕中显示:
When emulator screen is in it's default position it is working fine. But when I rotate the emulator screen it only displays the elements which are fit to screen and remaining are wrap up. As shown in below screen:
现在我想使这个布局滚动,但没有得到这个想法。任何帮助将是非常美联社preciated。
Now I want to make this layout scrollable but not getting the idea. Any help will be highly appreciated.
推荐答案
尝试把你的LinearLayout内的滚动型是这样的:
Try putting your LinearLayout inside an ScrollView like this:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:id="@+id/menu_ll"
android:layout_width="fill_parent" android:layout_height="fill_parent"></LinearLayout>
</ScrollView>
这篇关于在Android的滚动布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文