1

is there any documentation page that shows which android XML attributes are equivalent to android Java code? for example I have a TextView something like:

<TextView
    android:id="@+id/tview"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="v0.5 (beta)"
    android:textColor="#ffffff"
    android:textSize="10sp" />

I need an online documentation page or something that shows/list all of the used java code which equivalent to the above attributes. I.e:

android:id is equivalent to setId(int id)

android:text is equivalent to setText(String string)

... and so on

I hope you guys got the idea of what I want.

4
  • The official android documentation has most of this. Commented Apr 1, 2013 at 2:51
  • @Tushar show me an example please. I've tried to look for something similar but I had no luck. Commented Apr 1, 2013 at 2:52
  • Depends on the UI element. Example: TextView Commented Apr 1, 2013 at 2:53
  • @RobinVanPersi see the Related Methods section of every attribute. Example: developer.android.com/reference/android/widget/… Commented Apr 1, 2013 at 2:55

1 Answer 1

2

http://developer.android.com/reference/android/widget/TextView.html

Under 'XML Attributes' section.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.