title: android - Imageview has height 0 in adapter
body: <p>I've an imageview in my RecyclerView's adapter ... I download the image for it with Glide library . this is item view code :</p>
  <pre><code>&lt;androidx.cardview.widget.CardView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  xmlns:card_view=&quot;http://schemas.android.com/tools&quot;
  android:layout_width=&quot;match_parent&quot;
  android:layout_height=&quot;wrap_content&quot;
  android:layout_margin=&quot;5dp&quot;
  app:cardCornerRadius=&quot;8dp&quot;
  app:cardElevation=&quot;5dp&quot;
  card_view:cardCornerRadius=&quot;8dp&quot;
  card_view:cardPreventCornerOverlap=&quot;false&quot;
  card_view:cardUseCompatPadding=&quot;true&quot;&gt;
  
  &lt;LinearLayout
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:orientation=&quot;vertical&quot;&gt;
  
      &lt;ImageView
          android:id=&quot;@+id/img&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:adjustViewBounds=&quot;true&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/onvan&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:gravity=&quot;right&quot;
          android:padding=&quot;3dp&quot;
          android:textColor=&quot;#000&quot;
          android:textSize=&quot;17sp&quot;
          android:textStyle=&quot;bold&quot; /&gt;
  </code></pre>
  <p>.....</p>
  <p>this is my adapter class :</p>
  <pre><code> @Override
      public MyViewHolder onCreateViewHolder(ViewGroup parrent, int i) {
          View view = inflater.inflate(R.layout.blog_row, parrent, false);
          MyViewHolder holder = new MyViewHolder(view);
          return holder;
      }
  
   @Override
      public void onBindViewHolder(MyViewHolder viewHolder, int position) {
          Blog_items item = list.get(position);
          Glide.with(ctx).load(ctx.getString(R.string.url) + &quot;NewsPictures/&quot; + imgurl).into(viewHolder.img);
  
  class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
          TextView title, rateNum, tv_blog_dates, shortTozihat;
          ImageView img;
          RatingBar rate;
  
          public MyViewHolder(View itemView) {
              super(itemView);
              img =itemView.findViewById(R.id.img);
          }
  </code></pre>
  <p>it creates the views and I've 10 rows .. each row has it's own image and the image URL is 100percent true I'm sure about it but it has 0 height and it doesn't shown . if I set the imageview's height manually , it'll show</p>
  <p>what is wrong ? I don't want to set it manually because I have different images with different heights</p>
  <p>what is wrong with it ?</p>