摘要:
public int getId(String str){ Class cls = R.drawable.class; int value = 0; try { value = cls.getDeclaredField(str).getInt(null); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (NoSuchFi... 阅读全文