Skip to content

Android: acessing internal resoures

a new android I just drew. source-code: android_look.svg. CC-BY-SA as usual.

You can acess internal Android resources such strings, drawables, layouts and others. For example, if you need to create a button with the text “Cancel” you can do:

<Button 
   android:id="@+id/CancelButton"
   android:text="@android:string/cancel" 
/>

Using this you are using the internal resource for “Cancel” in that Android and all its i18n. Using the same logic you can access drawables, layouts, etc.

Published inenglish

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *