Introduction
Step 1
Create a new project like this:

Step 2
Create an XML file and write the following code.
In this, you will use an ImageView and two Buttons inside the LinearLayout of which the orientation is set to vertical.
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:paddingTop="@dimen/activity_vertical_margin"
- android:paddingBottom="@dimen/activity_vertical_margin"
- tools:context=".MainActivity"
- android:background="#E0A51B">
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:orientation="vertical">
- <ImageView
- android:id="@+id/imageVIEW"
- android:layout_width="fill_parent"
- android:layout_height="150dp"
- android:background="@drawable/man_of_steel"
- android:layout_centerHorizontal="true"
- >
- </ImageView>
- <Button
- android:id="@+id/btnZoom_In"
- android:layout_height="wrap_content"
- android:layout_width="150dp"
- android:text="StartZoomIn"
- android:layout_centerHorizontal="true"
- android:layout_marginLeft="70dp"
- android:layout_marginTop="40dp"
- />
- <Button
- android:id="@+id/btn_Zoom_out"
- android:layout_height="wrap_content"
- android:layout_width="150dp"
- android:text="StartZoomOut"
- android:layout_centerHorizontal="true"
- android:layout_marginLeft="70dp"
- android:layout_marginTop="40dp"
- />
- </LinearLayout>
- </RelativeLayout>
Step 3



Join the conversation! Your thoughts help the community grow.