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 (Retired) User Input Using EditText for Text Input

Orla McGreal
Orla McGreal
1,625 Points

In task 3 of the challenge it says I need the 'scaleType' attribute but I thought I had already added it! SOLVED

I have a feeling it's something that is staring me in the face!

But have I not already added the scaleType attribute? See my code below:

<ImageView android:id="@+id/imageView1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/captionField"; android:layout_alignParentLeft="true" android:src="@drawable/grumpy_cat" android:scaleType= "fitXY"/>

Thanks a million for your help!!!

Turns out my browser/ Treehouse was acting funny. I closed them and went back in again. # SOLVED

Doug Ray
Doug Ray
7,493 Points

Hey Oriea it looks like you forgot to post the code but the scale type should just be android:scaleType="" with whatever scale type you need :).

1 Answer

Orla McGreal
Orla McGreal
1,625 Points

Hey Doug , Thanks for replying so fast! I have the android:scaleType="fitXY" and I still get the error message that I need a scaleType attribute :(

Any suggestions?

The code is actually below this time! :p

<ImageView android:id="@+id/imageView1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/captionField"; android:layout_alignParentLeft="true" android:src="@drawable/grumpy_cat" android:scaleType="fitXY"/>