Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

linearview 2 items next to each other

<LinearLayout 

    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">
    <Button
        android:id="@+id/button_capture"
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:layout_weight="0.5"
        android:background="?android:attr/selectableItemBackground"
        android:onClick="snapIt"
        android:text="@string/Capture" />

    <Button
        android:id="@+id/button1"
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_weight="0.5"
        android:background="?android:attr/selectableItemBackground"
        android:onClick="snapIt"
        android:text="@string/Capture" />
   </LinearLayout>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linearview #items
ADD COMMENT
Topic
Name
4+3 =