Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
269 views
in Technique[技术] by (71.8m points)

android - what is ids.xml used for?

Just a quick question, what is the ids.xml used for when developing an Android app? I saw an example on the android resources webpage which contained:

<resources>
  <item name="snack" type="id"/>
</resources>

What would this be used for?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

id.xml is generally used to declare the id's that you use for the views in the layouts.

you could use something like

<TextView android:id="@id/snack">

for your given xml.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...