title: how to fix this category Layout Problems in Android App
body: <p>I have a problem with the Category Layout in my App. The problem is that the next category starts in the next line. I want to show it a mixed layout. Not like another category will show below that category. Please help me to fix this issue. I have searched on the internet but don't know how to fix it.</p>
  
  <p><a href="https://i.stack.imgur.com/nYHtJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nYHtJ.jpg" alt="Screenshot of Categories"></a></p>
  
  <p>item_category_list_adapter.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layout 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"&gt;
  
      &lt;data&gt;
  
          &lt;variable
              name="allWallpaperByCategory"
              type="com.panaceasoft.pswallpaper.viewobject.Category" /&gt;
      &lt;/data&gt;
  
      &lt;androidx.constraintlayout.widget.ConstraintLayout
          android:id="@+id/constraintLayout3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_margin="5dp"&gt;
  
          &lt;androidx.constraintlayout.widget.ConstraintLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"&gt;
  
              &lt;ImageView
                  android:id="@+id/itemImageView"
                  android:layout_width="0dp"
                  android:layout_height="0dp"
                  android:contentDescription="No Image"
                  android:scaleType="centerCrop"
                  app:imageUrl="@{allWallpaperByCategory.default_photo.img_path}"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="parent"
                  tools:ignore="HardcodedText"
                  tools:srcCompat="@drawable/app_icon" /&gt;
  
              &lt;View
                  android:id="@+id/view52"
                  android:layout_width="0dp"
                  android:layout_height="0dp"
                  android:background="@drawable/black_alpha_50"
                  app:layout_constraintBottom_toBottomOf="@+id/itemImageView"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintHorizontal_bias="0.0"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="@+id/itemImageView"
                  app:layout_constraintVertical_bias="0.0" /&gt;
  
              &lt;TextView
                  android:id="@+id/productCountTextView"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginStart="8dp"
                  android:layout_marginTop="8dp"
                  android:layout_marginEnd="8dp"
                  android:text="@string/category__30wallpaper"
                  android:textAlignment="viewStart"
                  android:textColor="@color/md_grey_400"
                  android:textSize="@dimen/font_body_size"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintHorizontal_bias="0.498"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toBottomOf="@+id/categoryNameTextView"
                  tools:ignore="MissingConstraints" /&gt;
  
              &lt;TextView
                  android:id="@+id/categoryNameTextView"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginStart="8dp"
                  android:layout_marginTop="8dp"
                  android:layout_marginEnd="8dp"
                  android:layout_marginBottom="8dp"
                  android:textAlignment="viewStart"
                  android:textColor="@color/md_grey_300"
                  android:textSize="@dimen/font_h5_size"
                  android:textStyle="bold"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="@+id/view52"
                  tools:ignore="MissingConstraints"
                  tools:text="20 Category" /&gt;
  
          &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
      &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  &lt;/layout&gt;
  </code></pre>