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

Building an interactive story android app - Text is editable when running completed app on phone?

HI,

Have just finished this module and when I run the app on my phone to test I have noticed that the text is editable. Should this be happening? Have I missed a step in locking this down during the dev?

Cheers!

1 Answer

Hi Nic

If you don't want the text editable simply change the layouts to textbox instead of edittext. All your other code should work fine. The only real difference is the included function for the user to edit the text with an edittext.

Daniel

Fantastic thanks. Newbie question.. How do I achieve this? Can't see anywhere to edit the type in the xml

Ah got it. Right click and select - Morphing - TextView

In you XML file you should have something like

<EditText android:layout_height="match_parent" android:layout_width="match_parent"

</EditText>

Change the tags that say EditText to TextView. You will also need to alter the Java code slightly to adopt the new type.