1

I am using ?android:attr/buttonBarStyle and ?android:attr/buttonBarButtonStyle for my button bar.

Here is my code:

    <LinearLayout
        android:id="@+id/label_edit_dialog_buttonbar"
        style="?android:attr/buttonBarStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/label_edit_dialog_name_edittext"
        android:layout_marginTop="8dp"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/label_edit_dialog_save_button"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/save" />

        <Button
            android:id="@+id/label_edit_dialog_cancel_button"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/cancel" />
    </LinearLayout>

Here is result I get:

enter image description here

I expected to see a Divider between my button bar and other views but I didn't see it. I see top Divider when I am using AlertDialog - I checked AlertDialog xml layout and saw that AlertDialog also use buttonBarStyle. Anyone has any ideas? Thanks!

Here is dev settings: Eclipse + Nexus 4 Simulator + Min API is 14+

ligi
  • 39,001
  • 44
  • 144
  • 244
LHA
  • 9,398
  • 8
  • 46
  • 85

1 Answers1

0

The ButtonBarStyle does not (as far as I know) provide dividers. To create such a divider, you will need to add them as Views in your layout (see this question for more).

Community
  • 1
  • 1
emerssso
  • 2,376
  • 18
  • 24