Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to do fastScrolling on tablelayout in Android
    primarykey
    data
    text
    <p>I have tableLayout filled with a lot of rows (in xml). I wrapped it in a scrollView and it scrolls great. However I'm trying to get the fastScrolling feature to work (the slider bar on the right) and saying <code>android:fastScrollEnabled="true"</code> for both the tableLayout and the scrollView does nothing. Does anyone know how to fix this?</p> <p>Here is a simplified version of the layout code</p> <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/frameLayout" android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/tableLayoutParent"&gt; &lt;TableLayout android:id="@+id/tableLayout" android:fastScrollEnabled="true" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;TableRow android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;Button android:text="◦" android:id="@+id/spaceColumn" android:background="@drawable/top_button" android:clickable="true" android:onClick="showSlider" android:gravity="center" android:padding="2dip" android:textSize="15px" android:layout_height="wrap_content" android:layout_width="15dip"/&gt; &lt;ToggleButton android:textOn="Title ▼" android:textOff="Title" android:id="@+id/titleColumn" android:background="@drawable/top_button" android:clickable="true" android:onClick="sortSong" android:gravity="center" android:padding="2dip" android:textSize="15px" android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="0dip"/&gt; &lt;ToggleButton android:textOn="Artist ▼" android:textOff="Artist" android:id="@+id/artistColumn" android:background="@drawable/top_button" android:clickable="true" android:onClick="sortArtist" android:gravity="center" android:padding="2dip" android:textSize="15px" android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="0dip"/&gt; &lt;ToggleButton android:textOn="Time ▼" android:textOff="Time" android:id="@+id/timeColumn" android:background="@drawable/top_button" android:clickable="true" android:onClick="sortTime" android:gravity="center" android:padding="2dip" android:textSize="15px" android:layout_height="wrap_content" android:layout_width="45dip"/&gt; &lt;ToggleButton android:textOn="Album ▼" android:textOff="Album" android:id="@+id/albumColumn" android:background="@drawable/top_button" android:clickable="true" android:onClick="sortAlbum" android:gravity="center" android:padding="2dip" android:textSize="15px" android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="0dip"/&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;/ScrollView&gt; &lt;/FrameLayout&gt; </code></pre> <p>song data is then read from a SQLite database and filled into the table layout</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload