有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java我应该能够在Eclipse图形布局中看到安卓滚动条吗?

我在程序的XML中加入了一个scrollview,图形布局显示了屏幕上所有聚集的字段,而不是在这边有一个滚动条,只显示了一些字段(就像我在视频中看到的那样)。我想知道这是否正常,或者我的代码或IDE有问题。我在Windows7中使用Eclipse。谢谢:)

我的代码与此代码几乎相同(唯一更改的是文本:,和ID)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:安卓="http://schemas.安卓.com/apk/res/安卓"
安卓:orientation="vertical" 安卓:layout_width="match_parent"
安卓:weightSum="100" 安卓:layout_height="match_parent">
<ScrollView 安卓:layout_weight="30" 安卓:layout_width="fill_parent"
    安卓:layout_height="fill_parent">

    <LinearLayout 安卓:orientation="vertical"
        安卓:layout_width="match_parent" 安卓:layout_height="match_parent">
        <TextView 安卓:text="Email address(es):"
            安卓:layout_width="wrap_content" 安卓:layout_height="wrap_content"></TextView>
        <EditText 安卓:layout_height="wrap_content"
            安卓:layout_width="match_parent" 安卓:id="@+id/etEmails">
        </EditText>
        <TextView 安卓:text="Hateful Intro:"
            安卓:layout_width="wrap_content" 安卓:layout_height="wrap_content"></TextView>
        <EditText 安卓:layout_height="wrap_content"
            安卓:layout_width="match_parent" 安卓:id="@+id/etIntro"></EditText>
        <TextView 安卓:text="Person's name" 安卓:layout_width="wrap_content"
            安卓:layout_height="wrap_content"></TextView>
        <EditText 安卓:layout_height="wrap_content"
            安卓:layout_width="match_parent" 安卓:id="@+id/etName"></EditText>
        <TextView 安卓:text="Stupid Things that this Person does"
            安卓:layout_width="wrap_content" 安卓:layout_height="wrap_content"></TextView>
        <EditText 安卓:layout_height="wrap_content"
            安卓:layout_width="match_parent" 安卓:id="@+id/etThings"></EditText>
        <TextView 安卓:text="What you want to do to this person:"
            安卓:layout_width="wrap_content" 安卓:layout_height="wrap_content"></TextView>
        <EditText 安卓:layout_height="wrap_content"
            安卓:layout_width="match_parent" 安卓:id="@+id/etAction"></EditText>
        <TextView 安卓:text="Hateful Outro" 安卓:layout_width="wrap_content"
            安卓:layout_height="wrap_content"></TextView>
        <EditText 安卓:layout_height="wrap_content"
            安卓:layout_width="match_parent" 安卓:id="@+id/etOutro"></EditText>
    </LinearLayout>
</ScrollView>
<LinearLayout 安卓:orientation="vertical"
    安卓:layout_width="match_parent" 安卓:layout_weight="40"
    安卓:layout_height="fill_parent">
    <Button 安卓:text="Send Email" 安卓:id="@+id/bSentEmail"
        安卓:layout_width="match_parent" 安卓:layout_height="match_parent"></Button>
</LinearLayout>
<LinearLayout 安卓:orientation="vertical"
    安卓:layout_width="match_parent" 安卓:layout_weight="30"
    安卓:layout_height="match_parent">
    <AnalogClock 安卓:id="@+id/analogClock1"
        安卓:layout_width="match_parent" 安卓:layout_height="fill_parent"></AnalogClock>
</LinearLayout>


共 (1) 个答案

  1. # 1 楼答案

    这是正常的行为(至少在我以前见过的所有EclipseIDE和我的IDE上)