我想知道是否有可能将每个单独RadioButton
的组合在一起,RadioGroup
保持相同的结构.我的结构看起来像这样:
如你所见,现在每个人RadioButton
都是不同的孩子LinearLayout
.我尝试使用下面的结构,但它不起作用:
我正在尝试从assets文件夹中读取相同的文件" xmlfile.xml ",并从SD卡sdcard/download /中读取另一个副本.
我可以从SD卡读取:
我无法从Assets文件夹中读取:
这段代码不适用
File source = new File("file:///android_asset/xmlfile.xml");
boolean unfile = source.isFile();
boolean Esiste = source.exists();
try
{
// todo
} catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
这段代码工作
File source = new File("/sdcard/" + "download" + "/" + "xmlfile.xml");
boolean unfile = source.isFile();
boolean Esiste = source.exists();
try
{
// todo
} catch (Exception e)
{ …
Run Code Online (Sandbox Code Playgroud) 在我的项目中,我收到一个错误,无法让我编译.据报道,作为示例: 描述资源路径位置类型区域设置它缺少翻译:foo,htmlsource1,htmlsource_old values-it/Android_coll/res line 1 Android Lint问题
"foo,htmlsource1,htmlsource_old"是旧的字符串,现在不再位于res-> values-it文件夹中.更具体地说,它们不再存在于整个项目中
我试过了:
关闭并打开项目.
关闭并打开Eclipse(indingo)
清理项目(项目 - >清洁)
从文件夹值复制文件string.xml并将其复制到文件夹值-it
但我仍然有相同的错误信息.
谢谢马克
如何从数组字符串[]填充微调器
例:
String [] items = new String [] {"uno","due","tre"};
sp =(Spinner)findViewById(R.id.spinner);
sp << --- ADD items Array
谢谢
马尔科