对于我的大学,我正在做一个Android应用程序.. XML代码是: -的Android如何设置滚动型
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/back">
<LinearLayout
android:id="@+id/linear_login"
android:layout_width="320dp"
android:layout_height="430dp"
android:background="@drawable/oie_transparent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="15dp"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="60dp"
android:layout_marginTop="10dp"
android:text="College name"
android:textColor="@color/red1"
android:textSize="20dp" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="14dp"
android:padding="15dp"
android:text="@string/desc"
android:textColor="@color/purple2"
android:textSize="20dp" />
<LinearLayout
android:layout_width="230dp"
android:layout_height="180dp"
android:layout_marginLeft="40dp"
android:padding="10dp"
android:orientation="vertical" >
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:background="@drawable/edit_style"
android:ems="10"
android:hint="student name"
android:textColorHint="#7D0541"/>
<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/edit_style"
android:layout_marginTop="6dp"
android:ems="10"
android:hint="student roll no"
android:textColorHint="#7D0541">
</EditText>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Press Here"
android:layout_marginTop="8dp"
android:layout_gravity="center"
android:background="@drawable/button_state"
android:textColor="#0000A0"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/imageView1"
android:layout_width="120dp"
android:layout_height="80dp"
android:layout_gravity="center"/>
</LinearLayout>
这里,2个编辑框和一个按钮是存在的,我想加入there..But一个滚动视图当我把它的示值误差每time..Hey家伙谁能告诉我问题出在哪里..
“显示每一次错误。”什么是错误? – 2014-12-03 05:03:04
将wrap_content设置为match_parent..and当我添加match_parent时,它会在我的代码中创建一个混乱 – 2014-12-03 05:04:49
您希望添加滚动视图的位置?整个布局还是什么? – 2014-12-03 05:06:09