Android: Center align ImageButtons?

I hope you have images for these buttons directly. So this setting text attribute is of no use. Use RelativeLayout for easy development of these kind of screens Below I have attached the code.

Please have a look and add comment if there is any issues RelativeLayout xmlns:android="schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal".

I hope you have images for these buttons directly. So this setting text attribute is of no use. Use RelativeLayout for easy development of these kind of screens.

Below I have attached the code. Please have a look and add comment if there is any issues.

Thanks..worked perfectly. I added a blank TextView in between to give some gap between those imagebutton. Thanks – Sarfarosh Lakhan Mar 16 at 6:01 1 if you want to add space, no need to add a textview for that...add margin attribute...that will be enough.

For your first button give something like android:layout_marginRight="30dp"...it will add margins and hence spacing will get increased... – Mathew Mar 16 at 6:06 thanks..it worked – Sarfarosh Lakhan Mar 16 at 7:06.

You have put the ImageButtons inside the tablerow. The tablerow will always occupy the first layer of the screen. Do you want the buttons to be centre aligned but at the top position?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions