scroll - Show more than 3 item in a wearable listview without scrolling -
i want create wearable listview can show more 3 item simultaneously, wearable listview shows 3 item, , have scroll down see other items. wearablelistview specific thing?
so wearablelistview looks this:
but want show more 3 item without scrolling, because has enough space.
the listview container xml:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/kaempewatch_screen_bg" android:orientation="vertical"> <android.support.wearable.view.wearablelistview android:id="@+id/exercise_listview" android:layout_width="match_parent" android:layout_height="match_parent" /> </linearlayout>
the item xml:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingleft="40dp" android:paddingright="40dp"> <textview android:id="@+id/li_tv_training_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="new text" android:lines="1" android:ellipsize="marquee" android:marqueerepeatlimit="marquee_forever" android:textcolor="@color/white" android:textsize="16sp"/> <textview android:id="@+id/li_tv_training_duration" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/nr_bg" android:textcolor="@color/white" android:textsize="13sp"/> </linearlayout>
the wear listview designed have 3 items give suitably large touch target wouldn't recommend trying add more items on screen should interacted with.
if purely want have list displayed can scrolled through use textview inside scrollview. wrapper custom widget access methods individual lines if you're going re-use lot.
Comments
Post a Comment