我使用布局代码来设计您在图像中看到的页面的主要部分:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minWidth="25px"
android:minHeight="25px">
<ScrollView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/scrollView1"
android:layout_weight="1"
android:background="#ffededed">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:text="@string/MortgageSelectCurrencyString"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/textView1"
android:layout_marginLeft="5dp"
android:textColor="#0094ff"
android:textStyle="bold"
android:textSize="16sp"
android:layout_marginTop="5dp" />
<TextView
android:text="@string/MortgageCurrencyDiscriptionString"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/textView2"
android:layout_marginLeft="5dp"
android:textColor="#666666"
android:textSize="10sp"
android:textStyle="bold" />
<RadioGroup
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/radioGroup1"
android:orientation="horizontal"
android:layout_marginTop="0dp">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/MortgageUSD_String"
android:id="@+id/USDCheck"
android:layout_marginRight="5dp"
android:textColor="#000000"
android:textSize="14sp" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MortgageLocalString"
android:id="@+id/LocalCheck"
android:textColor="#000000"
android:textSize="14sp" />
</RadioGroup>
<RelativeLayout
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/relativeLayout1">
<TextView
android:text="@string/MortgagePropertyPriceString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView3"
android:layout_marginLeft="5dp"
android:textColor="#0094ff"
android:textStyle="bold"
android:layout_centerVertical="true" />
<EditText
android:inputType="number"
android:layout_width="100dp"
android:layout_height="30dp"
android:id="@+id/MrtgPropertyPriceEditText"
android:background="@drawable/textbox_bg"
android:text="3463"
android:textColor="#000000"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp" />
</RelativeLayout>
<TextView
android:text="@string/MortgageDownPaymentString"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/textView1"
android:layout_marginLeft="5dp"
android:textColor="#0094ff"
android:textStyle="bold"
android:textSize="16sp"
android:layout_marginTop="10dp" />
<TextView
android:text="@string/MortgageDownPaymentDiscriptionString"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/textView2"
android:layout_marginLeft="5dp"
android:textColor="#666666"
android:textSize="10sp"
android:textStyle="bold" />
<TextView
android:text="50%"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/textView4"
android:layout_marginLeft="5dp"
android:layout_marginTop="3dp"
android:textSize="12sp" />
<SeekBar
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/seekBar1"
android:layout_marginLeft="3dp"
android:layout_marginRight="10dp" />
<TextView
android:text="@string/MortgageFI_String"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/textView1"
android:layout_marginLeft="5dp"
android:textColor="#0094ff"
android:textStyle="bold"
android:textSize="16sp"
android:layout_marginTop="10dp" />
<TextView
android:text="@string/MortgageFI_DescriptionString"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/textView2"
android:layout_marginLeft="5dp"
android:textColor="#666666"
android:textSize="10sp"
android:textStyle="bold" />
<Spinner
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/spinner1"
android:layout_marginRight="10dp" />
<RelativeLayout
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/relativeLayout1">
<TextView
android:text="@string/MortgageYearsString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView3"
android:layout_marginLeft="5dp"
android:textColor="#0094ff"
android:textStyle="bold"
android:layout_centerVertical="true" />
<EditText
android:inputType="number"
android:layout_width="100dp"
android:layout_height="30dp"
android:id="@+id/MrtgLoanYearsEditText"
android:background="@drawable/textbox_bg"
android:text="3463"
android:textColor="#000000"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp" />
</RelativeLayout>
<TextView
android:text="@string/MortgageMonthlyPaymentString"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/textView5"
android:layout_marginLeft="5dp"
android:layout_marginTop="10dp"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#0094ff" />
<EditText
android:inputType="number"
android:layout_width="fill_parent"
android:layout_height="30dp"
android:id="@+id/MrtgMonthlyPaymentEditText"
android:background="@drawable/textbox_bg"
android:text="3463"
android:textColor="#000000"
android:layout_marginRight="10dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="2dp" />
<RelativeLayout
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/relativeLayout1"
android:layout_marginTop="10dp">
<TextView
android:text="@string/MortgageFamilyIncomeString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/FamilyInComeTxtView"
android:layout_marginLeft="5dp"
android:textColor="#0094ff"
android:textStyle="bold" />
<TextView
android:text="@string/MortgageFamilyIncomeDescriptionString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView2"
android:layout_marginLeft="5dp"
android:textColor="#666666"
android:textSize="10sp"
android:textStyle="bold"
android:layout_below="@+id/FamilyInComeTxtView" />
<EditText
android:inputType="number"
android:layout_width="100dp"
android:layout_height="30dp"
android:id="@+id/MrtgFamilyIncomeEditText"
android:background="@drawable/textbox_bg"
android:text="3463"
android:textColor="#000000"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp" />
</RelativeLayout>
<RelativeLayout
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/relativeLayout1"
android:layout_marginTop="10dp">
<TextView
android:text="@string/MortgageAffordString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/FamilyInComeTxtView"
android:layout_marginLeft="5dp"
android:textColor="#0094ff"
android:textStyle="bold" />
<TextView
android:text="@string/MortgageAffordDescriptionString"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:id="@+id/textView2"
android:layout_marginLeft="5dp"
android:textColor="#666666"
android:textSize="10sp"
android:textStyle="bold"
android:layout_below="@+id/FamilyInComeTxtView" />
<EditText
android:inputType="number"
android:layout_width="100dp"
android:layout_height="30dp"
android:id="@+id/MrtgAffordEditText"
android:background="@drawable/textbox_bg"
android:text="3463"
android:textColor="#000000"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
并将其包含在另一个布局中,如下所示(我包含抵押布局的部分是用于包含上述代码):
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/AllPropertShow"
android:minWidth="25px"
android:minHeight="25px">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="45dp">
<include
android:id="@+id/TopActionBarMenu"
layout="@layout/ActionBarMenu" />
</LinearLayout>
<include
android:id="@+id/PropertyShowBar"
layout="@layout/PropertyShowBar" />
<ScrollView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/scrollView1"
android:scrollbars="vertical"
android:layout_weight="1"
android:fillViewport="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#f3f3f3"
android:orientation="vertical">
<include
android:id="@+id/ImageInfoLayout"
layout="@layout/PropertyShowImageView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<LinearLayout
android:id="@+id/InfoLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp" />
<include
android:id="@+id/AgentInfoLayout"
layout="@layout/PropertyShoeAgentInfo" />
<include
android:id="@+id/MortgageLayout"
layout="@layout/Mortgage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
</ScrollView>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="350dp"
android:background="@drawable/AgentInfo_bg"
android:id="@+id/PrptyLocationOnMapLayout">
<com.google.android.maps.MapView
android:id="@+id/PrptyLocationOnMap"
android:layout_width="wrap_content"
android:layout_height="310dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:apiKey="0OXLEzToRdbykr-QjEcfB9RECFS2k_Y5be7en-Q"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" />
</LinearLayout>
<include
android:id="@+id/Buttomactionbar"
layout="@layout/Buttom_ActionBar" />
结果是这个图像:
我不知道为什么这部分会显示黑条。我在此活动的地图上方也有这个(您可以在标签栏下方看到它):
我怎样才能隐藏它们?
谢谢