Thursday, 15 August 2013

Two buttons same width android

Two buttons same width android

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
<Button
android:id="@+id/bb"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/bb"
android:drawablePadding="5dp"
android:text="bb" />
<Button
android:id="@+id/cc"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@id/bb"
android:drawableLeft="@drawable/cc"
android:drawablePadding="5dp"
android:text="cc" />
</RelativeLayout>
</RelativeLayout>
there should be two buttons in the screen with same width in the center.
but there is nothing but blank screen x.x I'm not that new in developing
android, but sometimes I miss little details which give me a lot of
headache. sorry for disturbing

No comments:

Post a Comment