0
How to make that when creating multiple imageview , it go to the other side , and when ending the space in the column it pass to the next? I tried to use linear but when it ends the column , he keeps putting in the same column , and decreasing the size so that it fits all
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.paivadeveloper.lolvoices.AhriActivity"
tools:showIn="@layout/activity_ahri"
android:background="@color/corFundo">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingTop="30dp">
<ImageButton
android:id="@+id/imageButton6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
app:srcCompat="@drawable/ahriicon" />
<ImageButton
android:id="@+id/imageButton5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
app:srcCompat="@drawable/ahriicon" />
<ImageButton
android:id="@+id/imageButton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
app:srcCompat="@drawable/ahriicon" />
<ImageButton
android:id="@+id/imageButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
app:srcCompat="@drawable/ahriicon" />
<ImageButton
android:id="@+id/imageButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
app:srcCompat="@drawable/ahriicon" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
Then I create a separate class and put the recyclerimageadapter right? This recyclercview I replace the linear layout with it ?
– Paiva
That friend, the
adapter
is a separate class. In the case of Recycler instead of linear, here goes its layout. What you should take are all the image Buttons.– LMaker
I put the image button inside the Recycler right
– Paiva
Note also that I treated my Adapter for 2 different image views. A call image, and another imageadd. In your case, you can use only 1 and when comparing, show a placeholder if image is
null
– LMaker
I edited my answer by putting the itemadd, layout that you will use on Adapter
– LMaker