
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:text="Admissions"
android:layout_marginLeft="14dp"
android:textColor="#33b5e5"
android:textSize="28dp"
android:textAppearance="?android:attr/textAppearanceLarge"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/relativeLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.75" >
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:layout_marginBottom="-7dp"
android:layout_marginRight="-6dp"
android:layout_marginLeft="-6dp"
android:gravity="fill"
android:text="Application Form"
android:shadowColor="#ffffff"
android:shadowDx="2"
android:shadowDy="2"
android:shadowRadius="1"
android:drawableRight="@drawable/ab" />
<Button
android:id="@+id/button2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button1"
android:layout_below="@+id/button1"
android:layout_marginBottom="-7dp"
android:layout_marginRight="-6dp"
android:layout_marginLeft="-6dp"
android:gravity="fill"
android:text="Prospectus"
android:shadowColor="#ffffff"
android:shadowDx="2"
android:shadowDy="2"
android:shadowRadius="1"
android:drawableRight="@drawable/ab" />
<Button
android:id="@+id/button3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button2"
android:layout_below="@+id/button2"
android:layout_marginBottom="-7dp"
android:layout_marginRight="-6dp"
android:layout_marginLeft="-6dp"
android:gravity="fill"
android:text="Scholarship"
android:shadowColor="#ffffff"
android:shadowDx="2"
android:shadowDy="2"
android:shadowRadius="1"
android:drawableRight="@drawable/ab" />
<Button
android:id="@+id/button4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button3"
android:layout_below="@+id/button3"
android:layout_marginBottom="-7dp"
android:layout_marginRight="-6dp"
android:layout_marginLeft="-6dp"
android:gravity="fill"
android:text="Counselling"
android:shadowColor="#ffffff"
android:shadowDx="2"
android:shadowDy="2"
android:shadowRadius="1"
android:drawableRight="@drawable/ab" />
<Button
android:id="@+id/button5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/button4"
android:layout_below="@+id/button4"
android:layout_marginBottom="-7dp"
android:layout_marginRight="-6dp"
android:layout_marginLeft="-6dp"
android:gravity="fill"
android:text="Admission Helpline"
android:shadowColor="#ffffff"
android:shadowDx="2"
android:shadowDy="2"
android:shadowRadius="1"
android:drawableRight="@drawable/ab" />
</RelativeLayout>
</LinearLayout>
i have made a app in which i applied image to the end of button, a arrow button. this i hav done by using drawableright. but at last button, i button comes some what out of order.. why is that?
i have tried to reduce the text “admission helpline” to just “admission” so as to see if there is problem of some text formatting problem, but that don’t work too..
For other buttons except the last one you have used:
But for the last one you are using:
Change alignRight to alignLeft as:
Here is the outcome:
