Issue
I am using the tools:listitem attribute to show my views in the design layout with a recyclerview. Problem is, they always show up in a vertical list. Is there a way to have the Design Layout Editor display them horizontally?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@android:layout/simple_list_item_checked"/>
I want the above image, displayed horizontally. IN THE DESIGN VIEW. NOT in the application itself, I know how to do that.
Solution
Please Check this code
<android.support.v7.widget.RecyclerView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
Answered By - Atman Bhatt
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.