[英]Am I supposed to be able to see the android scrollbar in the Eclipse Graphical Layout?
I put in a scrollview in the XML of my program, and the graphical layout shows all of the fields bunched up in the screen, rather than having a scrollbar on this side and only some of the fields showing up (like I've seen in videos). 我在我的程序的XML中放入了一个scrollview,图形布局显示了屏幕上的所有字段,而不是在这一侧有一个滚动条,只显示了一些字段(就像我在视频)。 I was wondering if this was normal, or something with my code or IDE is messed up.
我想知道这是否正常,或者我的代码或IDE的内容搞砸了。 I use Eclipse with Windows 7. Thanks :)
我在Windows 7中使用Eclipse。谢谢:)
My code is nearly identical to this one (the only things changed are the text:, and the IDs). 我的代码与此代码几乎相同(唯一改变的是文本:和ID)。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:weightSum="100" android:layout_height="match_parent">
<ScrollView android:layout_weight="30" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent" android:layout_height="match_parent">
<TextView android:text="Email address(es):"
android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
<EditText android:layout_height="wrap_content"
android:layout_width="match_parent" android:id="@+id/etEmails">
</EditText>
<TextView android:text="Hateful Intro:"
android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
<EditText android:layout_height="wrap_content"
android:layout_width="match_parent" android:id="@+id/etIntro"></EditText>
<TextView android:text="Person's name" android:layout_width="wrap_content"
android:layout_height="wrap_content"></TextView>
<EditText android:layout_height="wrap_content"
android:layout_width="match_parent" android:id="@+id/etName"></EditText>
<TextView android:text="Stupid Things that this Person does"
android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
<EditText android:layout_height="wrap_content"
android:layout_width="match_parent" android:id="@+id/etThings"></EditText>
<TextView android:text="What you want to do to this person:"
android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
<EditText android:layout_height="wrap_content"
android:layout_width="match_parent" android:id="@+id/etAction"></EditText>
<TextView android:text="Hateful Outro" android:layout_width="wrap_content"
android:layout_height="wrap_content"></TextView>
<EditText android:layout_height="wrap_content"
android:layout_width="match_parent" android:id="@+id/etOutro"></EditText>
</LinearLayout>
</ScrollView>
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent" android:layout_weight="40"
android:layout_height="fill_parent">
<Button android:text="Send Email" android:id="@+id/bSentEmail"
android:layout_width="match_parent" android:layout_height="match_parent"></Button>
</LinearLayout>
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent" android:layout_weight="30"
android:layout_height="match_parent">
<AnalogClock android:id="@+id/analogClock1"
android:layout_width="match_parent" android:layout_height="fill_parent"></AnalogClock>
</LinearLayout>
这是正常的行为(至少在我以前见过的所有Eclipse IDE上,以及我的看法)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.