<?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">
<RelativeLayout
android:orientation="horizontal"
android:id="@+id/headerLayout"
style="@style/TitleBar">
<TextView android:textAppearance="?android:textAppearanceMedium"
android:textColor="#ffffff"
android:id="@+id/createpatientheader"
android:background="@android:color/transparent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Patient Registration"
android:maxLines="1"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"/>
</RelativeLayout>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:background="#81BEF7"
android:scrollbarAlwaysDrawVerticalTrack="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:scrollbarFadeDuration="0"
android:scrollbarAlwaysDrawHorizontalTrack="true"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/patient_fields"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#81BEF7"
android:gravity="center"
android:stretchColumns="*">
<TableRow>
<TextView
style="@style/TextViewStandard"
android:gravity="left"
android:text="Name *"
android:textColor="#ffffff"
android:layout_weight="1"/>
<EditText
style="@style/EditTextStandard"
android:id="@+id/patientname"
android:hint="At least 3 Alphabets"
android:layout_span="2"
android:singleLine="true"
android:maxLength="30"
android:inputType="textPersonName"
android:layout_weight="1"
/>
</TableRow>
<TableRow >
<TextView
style="@style/TextViewStandard"
android:gravity="left"
android:text="Date of Birth"
android:textColor="#ffffff"
android:layout_weight="1" />
<EditText
style="@style/EditTextStandard"
android:id="@+id/dob"
android:layout_span="2"
android:singleLine="true"
android:layout_weight="1"
/>
<DatePicker android:id="@+id/dateofbirth"
android:visibility="gone"/>"
</TableRow>
<TableRow>
<TextView
style="@style/TextViewStandard"
android:gravity="left"
android:padding="3dip"
android:text="Mobile"
android:textColor="#ffffff"
android:layout_weight="1"/>
<EditText
style="@style/EditTextStandard"
android:id="@+id/mobile"
android:layout_span="2"
android:singleLine="true"
android:numeric="integer"
android:maxLength="10"
android:layout_weight="1"/>
</TableRow>
</TableLayout>
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
</ScrollView>
</LinearLayout>
我想要我的应用程序中的两个滚动条。我已经尝试过这段代码。如果我将所有控件都放在滚动视图中,那么所有控件都会被拉伸并填满屏幕。但是如果我把它放在水平滚动中,它不会被拉伸,也不会填满屏幕。我错过了一些东西..帮助我..