Created
April 21, 2016 11:16
-
-
Save devrath/ccbef1eda4646416176736a55a05638b to your computer and use it in GitHub Desktop.
Update Dimensions Using String Value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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