string.xml

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

string.xml

Postby android2 » Wed Nov 11, 2009 10:33 pm

you can put in the ArrayList string.xml how do?
android2
Developer
Developer
 
Posts: 48
Joined: Sun Oct 04, 2009 8:34 pm

Top

Postby IHeartAndroid » Thu Nov 12, 2009 8:54 am

What ArrayList ? The whole xml file at once ? Why dont you be a little bit accurate...


If you want to get a value of a string that you have saved in string.xml try:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. String bla = getString(R.string.my_string);
  3.  
  4. myArrayList.add(bla);
  5.  
  6.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
User avatar
IHeartAndroid
Junior Developer
Junior Developer
 
Posts: 24
Joined: Wed Jul 08, 2009 8:51 am

string.xml

Postby android2 » Thu Nov 12, 2009 10:53 am

but in string.xml as stated I thought the strings to the array string???
IHeartAndroid wrote:What ArrayList ? The whole xml file at once ? Why dont you be a little bit accurate...


If you want to get a value of a string that you have saved in string.xml try:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. String bla = getString(R.string.my_string);
  2. myArrayList.add(bla);
  3.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
android2
Developer
Developer
 
Posts: 48
Joined: Sun Oct 04, 2009 8:34 pm

Re: string.xml

Postby android2 » Thu Nov 12, 2009 11:21 am

<string-array name="khgkh">

</string-array>
android2 wrote:but in string.xml as stated I thought the strings to the array string???
IHeartAndroid wrote:What ArrayList ? The whole xml file at once ? Why dont you be a little bit accurate...


If you want to get a value of a string that you have saved in string.xml try:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. String bla = getString(R.string.my_string);
  2. myArrayList.add(bla);
  3.  
Parsed in 0.034 seconds, using GeSHi 1.0.8.4
android2
Developer
Developer
 
Posts: 48
Joined: Sun Oct 04, 2009 8:34 pm

Re: string.xml

Postby android2 » Thu Nov 12, 2009 12:50 pm

I have to define a structure that is passed to the listview ??
android2 wrote:<string-array name="khgkh">

</string-array>
android2 wrote:but in string.xml as stated I thought the strings to the array string???
IHeartAndroid wrote:What ArrayList ? The whole xml file at once ? Why dont you be a little bit accurate...


If you want to get a value of a string that you have saved in string.xml try:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. String bla = getString(R.string.my_string);
  2. myArrayList.add(bla);
  3.  
Parsed in 0.036 seconds, using GeSHi 1.0.8.4
android2
Developer
Developer
 
Posts: 48
Joined: Sun Oct 04, 2009 8:34 pm

Postby qlimax » Thu Nov 12, 2009 5:06 pm

solved :idea:
¯`·.¸¸.><((((º>¯`·.¸¸. ><((((º>
User avatar
qlimax
Master Developer
Master Developer
 
Posts: 271
Joined: Mon Aug 31, 2009 10:54 am
Location: Swiss

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests