How to create tabs in an android app ?

Asked

Viewed 823 times

0

            <TableRow>
                <TextView android:text="Tipo:"/>
                <RadioGroup android:id="@+id/tipos">
                    <RadioButton android:id="@+id/rodizio"
                        android:text="Rodízio"/>
                    <RadioButton android:id="@+id/fast_food"
                        android:text="Fast Food"/>
                    <RadioButton android:id="@+id/a_domicilio"
                        android:text="A Domicílio"/>
                </RadioGroup>
            </TableRow>
            <Button android:id="@+id/salvar"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Salvar"/>
        </TableLayout>
    </FrameLayout>
</LinearLayout>

1 answer

1

Do not use table Rows, use Fragments with tabs instead:

Creating Swipe Views with Tabs

Swipe views provide lateral navigation between sibling screens such as tabs with a horizontal finger Esture (a Pattern sometimes known as horizontal paging). This Lesson teaches you how to create a tab layout with Swipe views for switching between tabs, or how to show a title strip Instead of tabs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.