我试图动态查找textView的资源ID。我需要它根据输入的每个名称在布局中找到每个TextView。
据我所知:
String test = "t12";
//Just an idea I had on how to get it.Doesnt work
var r = (TextView)test;
TextView t = FindViewById <TextView>(Resource.Id.r);
任何帮助将不胜感激......:)
答案 0 :(得分:0)
以下代码有效:
<?xml version="1.0" encoding="utf-8" ?>
<Response success="true">
<data>
<class name="getId" classValue=" this is a class value"></class>
</data>
</Response>
答案 1 :(得分:0)
你不能这样解析......
字符串测试=&#34; t12&#34 ;;
var r =(TextView)test;
试试这个......
TextView textView = new TextView(this);
textView.Text =&#34;一些文字&#34 ;;