I have a normal "read an article" type page with a single large photo at the top.
I'd like it to:
- not scale larger than the source imgae
- not be larger than the screen
- not be CRAZY long vertically
- side things I already have working
- border (via padding), center crop (would rather top crop, but seems not avail)
The main issue I'm having is - I can either have it fill_parent (ie full width) OR wrap_content (ie as large as the original image). And nothing I have done so far allows the image to be normal size (ie keep from enlarging).
Is there a "norm" for this kind of thing? I'm sure there's some kind of sweet spot or combination of attributes for this that works - I just can't find them.
My current attempt:
<ImageView
android:id="@+id/article_photo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/super_light_gray"
android:scaleType="centerCrop"
android:contentDescription="@string/articlePhoto"
android:cropToPadding="true"
android:layout_marginBottom="20dp"
android:padding="1dp"/>