I want two buttons next to each other like this: [ Use ] [ Cancel ] (These are just buttons with background images, NOT ImageButtons)
But the result is strange, the first button fills all the space, in the linear layout like this: [..........Use...........] and the Cancel button is not shown. The layout_width are "wrap_content" for both buttons, and the linear layout's orientation is horizontal whats the problem?
Got a code:
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:id="@+id/linearLayout2"
android:layout_gravity="bottom"
android:layout_height="fill_parent"
android:layout_weight="1">
<Button
android:text="Use"
android:height="14dp"
android:textSize="15sp"
android:textColor="#ffffff"
android:background="@drawable/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/UseButtonDialog"
android:layout_gravity="bottom">
</Button>
<Button android:text="Cancel"
android:background="@drawable/button1"
android:height="14dp"
android:textSize="15sp"
android:textColor="#ffffff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/CancelButtonDialog"
android:layout_gravity="bottom">
</Button>
</LinearLayout>
Something should i do with the images?