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 trialAndrew Izquierdo
3,212 PointsWhen trying to select the layout_width for the "titleImageView", I do not see the option of "match_parent". Why?
I followed the steps in the video. But when I got to setting the layout_width and the layout_height, i do not see the option of "match_parent" like it shows in the video.
The only options i have are: "none", "match constraint", and "wrap content".
why do I not see "match parent" ?
will manually inputting 368dp and 495dp for the width and height give me the same results? Thanks for the help!
3 Answers
Duncan Michael-MacGregor
15,204 PointsI 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
Alan Kuo
7,697 Pointssolved it using your method, thanks
Jeremiah Shore
31,168 PointsThanks, this worked. Having the same issue in Android Studio 3.2.1.
Oshedhe Munasinghe
8,108 Points3.6 is working by your help, thanks! 👾 👍🏽
Elliott Moos
2,103 PointsWorked for me as well. Android Studio version 3.5.1
Noah Schochet
611 PointsI think it has to do with changes between the newer version of Android studio and the one he is using in the video. Don't worry about it, it ends up being resolved in the next video. Just watch the next video and it will make sense.
Hasancan Boga
4,642 PointsHasancan Boga
4,642 Pointssame, it only shows match_constraint and when i select that it defaults to 0dp.