Help in getting String Array from arrays.xml file
来源:互联网 发布:淘宝买家怎么发优惠券 编辑:程序博客网 时间:2024/06/07 06:59
https://stackoverflow.com/questions/2453989/help-in-getting-string-array-from-arrays-xml-file
import android.app.ListActivity;import android.os.Bundle;import android.widget.ArrayAdapter;public class Episode7 extends ListActivity { String[] mTestArray; /** Called when the activity is first created. */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Create an ArrayAdapter that will contain all list items ArrayAdapter<String> adapter; mTestArray = getResources().getStringArray(R.array.testArray); /* Assign the name array to that adapter and also choose a simple layout for the list items */ adapter = new ArrayAdapter<String>( this, android.R.layout.simple_list_item_1, mTestArray); // Assign the adapter to this ListActivity setListAdapter(adapter); }}
end
阅读全文
0 0
- Help in getting String Array from arrays.xml file
- Getting help from shells
- R in getting help
- Getting help as XML
- Powershell: Read in file without converting into string array
- How to get file extension from string in C++
- Getting the indexes of duplicate elements in arrays (Ruby)
- How to get array from string contained identical symbols in Ruby?
- How to get array from string contained identical symbols in Ruby?
- RedHat getting help
- Insight into DOMDocument - how to convert data from XML to array in PHP
- Read a file from xml
- Obtain Key from a Hash of Arrays using array value
- Creating a XML Document from scratch without using a file in C#
- cannot load settings from file '\.idea\workspace.xml': content is not allowed in prolog . please cor
- Collect index from Array/String Matchdata
- matlab2014a中help与参考页翻译 Tutorials-matrices and arrays- Array Creation
- matlab2014a中help与参考页翻译 Tutorials-matrices and arrays- Matrix and Array Operations
- Bless You Autocorrect 字典树+bfs
- ajax
- Linux中MySql数据库的使用
- 统计字符串中的不同字符个数
- codeforces round #438 C. Qualification Rounds
- Help in getting String Array from arrays.xml file
- CCI(1)-- Arrays and Strings
- python建站及mydjango笔记
- tp5模型笔记---一对多
- 多线程并发问题
- sort()用法
- 将Atom打造成强大的Markdown编辑器
- 删除vector重复元素
- EU5-11: Talking about the environment