gpt4 book ai didi

android - 如何在图形 View 中查看 XML 布局中的所有小部件/如何在 Eclipse 中滚动图形布局?

转载 作者:行者123 更新时间:2023-11-29 01:41:14 25 4
gpt4 key购买 nike

我有一个 XML 布局,其中包含许多 textView 和 editText,一个在另一个下面,比如 10 个 textView 和 10 个 editText。这会自动在手机和模拟器中创建一个 ScrollView 。然而,在 ADT 的图形布局中,只有 4 个是可见的。我无法查看 eclipse 图形布局中的剩余部分。我必须连接到模拟器以查看设计/对齐是否符合预期。

有什么方法可以使用 eclipse 的图形布局功能查看所有 textView 和 editText 直到最后一个?

最佳答案

我将整个子 View 放在 Scroll View 中,而不是线性布局或相对布局。像这样

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_color"
android:orientation="vertical" >
..........
..........

</LinearLayout>
</ScrollView>

这对我有用。

关于android - 如何在图形 View 中查看 XML 布局中的所有小部件/如何在 Eclipse 中滚动图形布局?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24552098/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com