我想放大和缩小我的完整活动,为用户提供申请任何美国签证的分步指南。我的活动的根布局是相对布局。它有一个旋转器,可以在同一个活动中选择签证类型和关于该签证的完整指南。下面是VisaInfoActivity.java和activity.xml的代码。
Activity_info_visa.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/relativelayout_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".VisaInfoActivity" >
<Spinner
android:id="@+id/spinner_options"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
/>
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/relativeLayout_buttons"
android:layout_below="@+id/relativeLayout_buttons"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/Linearlayout_Tourist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="vertical" >
<TextView
android:id="@+id/textView_TouristHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tourist and Visitors Visa Info"
android:textColor="#ff00ff"
android:textSize="20dp" />
<TextView
android:id="@+id/tVTourist_Overview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Overview"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:layout_marginTop="10dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVTourist_OverviewInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Overview Info"
android:textSize="16dp" />
<TextView
android:id="@+id/tVTourist_Steps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Steps for Tourist/Visitor Visa"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVTourist_ApplicationInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Application Info"
android:textSize="16dp" />
<TextView
android:id="@+id/tVTourist_Documents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Required Documents"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVTourist_Info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="add Info"
android:textSize="16dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/Linearlayout_Business"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="vertical" >
<TextView
android:id="@+id/textView_BusinessHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Business Visa Info"
android:textSize="20dp"
android:textColor = "#ff00ff" />
<TextView
android:id="@+id/tVBusiness_Overview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Overview"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:layout_marginTop="10dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVBusiness_OverviewInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Business Visa Info"
android:textSize="16dp" />
<TextView
android:id="@+id/tVBusiness_Steps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Steps for Business Visa"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVBusiness_ApplicationInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Application Info"
android:textSize="16dp" />
<TextView
android:id="@+id/tVBusiness_Documents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Required Documents"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVBusiness_Info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="info add"
android:textSize="16dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/Linearlayout_Employment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="vertical" >
<TextView
android:id="@+id/textView_EmploymentHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Employment Visa Info"
android:textSize="20dp"
android:textColor = "#ff00ff" />
<TextView
android:id="@+id/tVEmployment_Overview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Overview"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:layout_marginTop="10dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVEmployment_OverviewInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Overview Info"
android:textSize="16dp" />
<TextView
android:id="@+id/tVEmployment_Steps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Steps for Employment Visa"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVEmployment_ApplicationInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Application Info"
android:textSize="16dp" />
<TextView
android:id="@+id/tVEmployment_Documents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Required Documents"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0568b2"
android:textSize="18dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tVEmployment_Info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Add Info"
android:textSize="16dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/Linearlayout_Student"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="vertical" >
<TextView
android:id="@+id/textView_StudentHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Student Visa Info"
android:textSize="20dp"
android:textColor = "#ff00ff" />
<TextView
android:id="@+id/tVStudent_Overview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Overview"
android:textColor="#0568b2"
android:layout_marginTop="10dp"
android:textSize="18dp"
android:textStyle = "bold"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/tVStudent_OverviewInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Overview Info"
android:textSize="16dp" />
<TextView
android:id="@+id/tVStudent_Steps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Steps for Student Visa"
android:textColor="#0568b2"
android:textStyle = "bold"
android:textSize="18dp"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/tVStudent_ApplicationInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Application Info"
android:textSize="16dp" />
<TextView
android:id="@+id/tVStudent_Documents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Required Documents"
android:textColor="#0568b2"
android:textStyle = "bold"
android:textSize="18dp"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/tVStudent_Info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Add Info"
android:textSize="16dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<RelativeLayout
android:id="@+id/relativeLayout_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/spinner_options"
android:background="#f0f0f0" >
<Button
android:id="@+id/btn_email"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="Email" />
<Button
android:id="@+id/btn_bluetooth"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/btn_email"
android:text="BT" />
<Button
android:id="@+id/btn_pdf"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/btn_bluetooth"
android:text="pdf" />
</RelativeLayout>