Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 23rd, 2012  |  syntax: None  |  size: 1.40 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!--
  2.   A button bar is a set of buttons at the bottom of an activity.
  3.   An example is an AlertDialog with OK/Cancel buttons.
  4.  
  5.   Note that something similar can be accomplished using a
  6.   split action bar and text-only action buttons, but this is an
  7.   alternate presentation that's often preferred.
  8. -->
  9. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  10.     android:orientation="vertical"
  11.     android:layout_width="match_parent"
  12.     android:layout_height="match_parent"
  13.     android:divider="?android:attr/dividerHorizontal"
  14.     android:showDividers="middle">
  15.  
  16.     <TextView android:layout_width="match_parent"
  17.         android:layout_height="0dp"
  18.         android:layout_weight="1"
  19.         android:gravity="center"
  20.         android:text="Hello World" />
  21.  
  22.     <LinearLayout style="?android:attr/buttonBarStyle"
  23.         android:layout_width="match_parent"
  24.         android:layout_height="wrap_content"
  25.         android:orientation="horizontal">
  26.  
  27.         <Button style="?android:attr/buttonBarButtonStyle"
  28.             android:layout_width="0dp"
  29.             android:layout_height="wrap_content"
  30.             android:layout_weight="1"
  31.             android:text="One" />
  32.  
  33.         <Button style="?android:attr/buttonBarButtonStyle"
  34.             android:layout_width="0dp"
  35.             android:layout_height="wrap_content"
  36.             android:layout_weight="1"
  37.             android:text="Two" />
  38.     </LinearLayout>
  39. </LinearLayout>