标签:
根据传入的字符串跳转Activity
Intent intent = new Intent(context,Class.forName("com.packname.Activity")); startActivity(intent);
根据传入的字符加载资源
int icon = getResources().getIdentifier(“imageid”, "drawable", getPackageName());
getIdentifier的函数签名如下:
public int getIdentifier (String name, String defType, String defPackage)
标签:
原文地址:http://www.cnblogs.com/l2rf/p/5314808.html