use*_*985 20
LinearLayout linLayout = (LinearLayout)findViewWithTag("layout1");
Run Code Online (Sandbox Code Playgroud)
但我认为你不需要动态视图的标签.您可以通过以下代码检索动态资源
for (int i=0; i < total_resource; i++) {
//retrieve id dynamically
int id = getResources().getIdentifier("resource"+i, "id", getPackageName());
TextView myText = (TextView) findViewById(id); // get the element
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
25109 次 |
| 最近记录: |