Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build an Interactive Story App User Input Introducing ImageViews

When I was changing the image width I pressed match_parent but in stead of making the picture bigger it made it smaller

I did everything the exact same as the guy in the video but it just made the image to 176 dp so I had to manually change it to 368 dp. Is that ok?

1 Answer

I have found a way around this.

If you set the 'layout_width' and 'layout_height' for 'titleImageView' both to 'match_constraint' using the design window. And then go into the text window and find where it has added 'android:layout_width="0dp"' and 'android:layout_height="0dp"'. Then change the '0dp' values to 'match_parent'. Then check to make sure that 'android:scaleType' is set to 'centerCrop'.

That should all work as it is shown in the video. I have no idea why the match_parent option isn't displayed like in the video. It might be a version problem. I am running Android Studio 3.0.1