I am new in android development and i am using eclipse java to develop an app.My problem is that i want to locate the elements like image view or button to wherever i want like it is in the Adobe Flash.How can i do that.Relative layout puts elements relative to other objects.Should i change the relative layout and what should i change it into?( i mean which layout) Thanks Here is my code.
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ff8D8D8D"
tools:context="com.example.deniz.MainActivity" >
<ImageView android:id="@+id/imageView1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:scaleType="fitXY" android:src="@drawable/back"/>
<ImageView android:id="@+id/close" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:onClick="close_app" android:src="@drawable/exit"/>
<ImageView android:id="@+id/new_project" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="22dp" android:layout_marginTop="24dp" android:onClick="open_new" android:src="@drawable/buttonm"/>
<ImageView android:id="@+id/little" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/new_project" android:layout_below="@+id/new_project" android:layout_marginLeft="16dp" android:layout_marginTop="18dp" android:src="@drawable/buttonm"/>
<ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_marginBottom="16dp" android:layout_toRightOf="@+id/new_project" android:scaleType="fitCenter" android:src="@drawable/buttonm"/>
</RelativeLayout>
No comments:
Post a Comment