 <p>The problem is that when you try to <code>getWidth</code>, your <code>ImageView</code> have not been appeared on the screen, so it always returns 0. So there are two ways, you can get the width:</p> <p><strong><em>First way</em></strong></p> <p>You need to <code>measure</code> your <code>ImageView</code> and then get the <code>measuredWidth</code>:</p> <pre><code>holder.photoPost = (ImageView) convertView.findViewById(R.id.photoPost); holder.photoPost.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); int targetHeight = holder.photoPost.getMeasuredWidth() * (9/16); </code></pre> <p><strong><em>Second way</em></strong></p> <p>Add <code>onGlobalLayoutListener</code> to your <code>ImageView</code> and then, you will be able to get the width:</p> <pre><code>holder.photoPost = (ImageView) convertView.findViewById(R.id.photoPost); holder.photoPost.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.JELLY_BEAN) { holder.photoPost.getViewTreeObserver() .removeOnGlobalLayoutListener(this); } else { holder.photoPost.getViewTreeObserver() .removeGlobalOnLayoutListener(this); } int targetHeight = holder.photoPost.getWidth() * (9/16) } }); </code></pre>