Created
April 2, 2015 10:33
-
-
Save pcqpcq/cf64984d67b4c2c86d40 to your computer and use it in GitHub Desktop.
Reduce findViewById
This file contains 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
/** | |
* @param resId resource Id | |
*/ | |
public <T extends View> T findView(int resId) { | |
return (T) findViewById(resId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment