I want to zoom in and out all the images inside the layout. I have seen many questions like here and here and tried to implement them but I couldn't.
Please help me in order to understand this. My confusion is, why would I extend my class from relative layout, as described in the question above, i mean i have a relative layout in my XML and I am setting this XML in content view but how could I grab the specific relative layout by using this methodology. And even if I have extended class from relative layout, how would I use this class in the activity which contains my images inside layout.
My XML setup is like this, can anyone please tell me what approach I have to follow.
<?xml version="1.0" encoding="utf-8"?>
<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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.cpec.farrukhtanveer.MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="130dp"
android:layout_marginRight="130dp"
android:background="@drawable/imageBackGround">
<ImageView
android:id="@+id/img_one"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
android:src="@drawable/imageone"/>
<ImageView
android:id="@+id/img_two"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="imagetwo"/>
</RelativeLayout>
</RelativeLayout>
Please help folks ! Thanks. Umair