Regarding the development of a project on Android

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Regarding the development of a project on Android

Postby uvr.pavan » Tue Jul 22, 2008 11:23 am

Hi,

I am a beginner for Android. I donno how to get the android id: in XML files.
how to append that in R.java file? how to design the application using XML file? what is the meaning for "@+" for id specification.



Please Help me...



Thanks and Regards
UVR Pavan
uvr.pavan
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Jul 22, 2008 7:29 am
Location: London

Top

Postby borya » Tue Jul 22, 2008 7:59 pm

The documentation google provides on layout is quite handy for your problem :)

http://code.google.com/android/devel/im ... ng-ui.html

particularly the section labeled 'Designing Your Screen In XML'

essentially, to make a text view with an id you can access from your program you would have something like this in your xml file:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <TextView android:id="@+id/YOUR_ID_HERE"
  3.  
  4.         android:layout_width="fill_parent"
  5.  
  6.         android:layout_height="wrap_content"
  7.  
  8.     android:text = "TEXT"/>
  9.  
  10.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4
borya
Developer
Developer
 
Posts: 27
Joined: Wed Jul 02, 2008 7:50 pm
Location: California, USA

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests