Search code examples
androidadkgraphical-layout-editor

How to edit the value of a Text Field using Graphical Layout view (Eclipse Android Development Tool)


I don't understand what is going on when I am in the Graphical layout window in the Eclipse Android Development tool (v22.6.2-1085508) and want to change the text of a TextView. I saw other questions/answers on how to do it programmatically. But unless I am overlooking something obvious the process to do it using the GUI seems very laborious and non-intutive.

Here is the steps I went through:

  1. Start with the default Android Application project. I Want to change text: "Hello World"
  2. I find that I can't modify the textView inline (i.e. visual studio style).
  3. So I select Edit (F2)
  4. But now I find I can't really "edit" the resource https://i.sstatic.net/cBtXL.jpg
  5. So I click on the "New String" button.
  6. And create a whole new resource with the new text string that I want.

The screen shots: https://i.sstatic.net/yAcLz.jpg

Can someone clue me in to the philosophy behind this Graphical interface? Is there a better way to do it?


Solution

  • Maybe you aren't using the editor correctly:

    enter image description here

    Here you see I defined @string/help for the Text property
    And you correctly read "User guide", as defined in strings.xml

    Alternatively, in the xml view, you can add your TextView the attribute:

    android:text="Whatever you want"
    

    or (better), reference a string resource (as in my example):

    android:text="@string/your_string_name"