Previewing horizontal recyclerview in android studio

I found out how to preview a list item by using

tools:listitem="@layout/my_item_layour"

but android studio is previewing the recyclerview as a vertical list. Is there a way to tell Android Studio I will attach a horizontal LinearLayoutManager so that it can preview an horizontal list?

  • How to find the screen is locked in android
  • React Native: Custom font renders differently on Android and iOS
  • The Android emulator is out of view, how can I move it?
  • TextInputLayout hint color
  • How to send file from Android device to other device through Bluetooth by code
  • How to read and write Android NFC tags?
  • Related posts:

    Android Emulator: How can I get a list of services that are running
    What is Spurious Death in Android?
    Android: Placing ImageView on overlap between layouts
    Get application version name using adb
    Xamarin Visual Studio IOS Development Without a Mac?
    How to store uniquely a GCM registration id into MySQL
  • Lollipop optimized app compiling on Kitkat - LayoutInflaterCompatHC NoClassDefFoundError
  • Change language settings (locale) for the device
  • How to customize Android ActionBar to show a custom view before the tabs?
  • ExceptionWithContext gets thrown when trying to build an Android app with Ant
  • Exclusive CSS for iPhone/Android
  • How to handle Back button with in the dialog?
  • One Solution collect form web for “Previewing horizontal recyclerview in android studio”

    Add layoutManager and set a horizontal orientation.

    Here an example:

    //xml

    <android.support.v7.widget.RecyclerView
        android:id="@+id/homesRecyclerView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layoutManager="android.support.v7.widget.LinearLayoutManager"
        android:layout_centerVertical="true"
        />
    
    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.