Skip to content

Instantly share code, notes, and snippets.

@devrath
Created April 21, 2016 11:16
Show Gist options
  • Select an option

  • Save devrath/ccbef1eda4646416176736a55a05638b to your computer and use it in GitHub Desktop.

Select an option

Save devrath/ccbef1eda4646416176736a55a05638b to your computer and use it in GitHub Desktop.
Update Dimensions Using String Value
protected int UpdateDimens(String imageName)
{
int identifier = getResources().getIdentifier(imageName, "dimens",getPackageName());
//int strId = getResources().getIdentifier(imageName, "string", getPackageName());
System.out.println(">>>>>>"+identifier);
try {
return identifier;
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment