android - Aligning components in RelativeLayout -
|--button 1--|
|-button 2-|
using relativelayout how align button 2's width match of button 1.
<button android:id="@+id/a" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="40dip" android:textsize="14sp" android:text="--button1--" /> <button android:id="@+id/b" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/a" android:gravity="center" android:text="button2" android:layout_alignleft="@id/a" android:layout_alignright="@id/a" android:textsize="14sp" />
try above inside relativelayout
Comments
Post a Comment