Я хочу показать несколько itemview сразу, как этотГоризонтальный Ресайклер Вид с несколькими пункта сразу
Я использую вид ресайклер 23.2.1
compile 'com.android.support:recyclerview-v7:23.2.1'
мой взгляд утилизатор XML
<android.support.v7.widget.RecyclerView
android:id="@+id/gallary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbars="horizontal" />
Соответствующий код Java
mRecyclerView = (RecyclerView) findViewById(R.id.gallary);
mLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
mRecyclerView.setLayoutManager(mLayoutManager);
С этой конфигурацией я получаю только один элемент одновременно. Как изображение ниже
Похоже wrap_content в виде ресайклера не работает как пространство между изображениями есть. Есть ли способ удалить пространство между элементами.
Обнаружена одна ошибка, связанная с wrap_contect в режиме ресайклера link, которая исправлена. Не уверен, что это вызывает проблему. Любая помощь, чтобы исправить это будет оценено
Мой вид строки:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/facebook" />
<TextView
android:id="@+id/titletv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/image"
android:layout_centerHorizontal="true"
android:text="Testing"
android:textSize="@dimen/fourteen_sp" />
<ProgressBar
android:id="@+id/mainimgloading"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_centerInParent="true"
android:layout_gravity="center" />
</RelativeLayout>
</LinearLayout>
, что делает макет строки выглядеть – tyczj
Я обновил этот вопрос с точки зрения ряда – manish