<?xml version="1.0" encoding="utf-8"?> <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" android:scrollbarStyle="outsideInset"> <TableLayout android:id="@+id/table_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="*" /> </HorizontalScrollView>