This is a simple helper class to casting the Views of your layout file in your Activity or Fragment.
Normally you get your layout Views like this:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splashscreen);
TextView tv = (TextView) findViewById(R.id.textview)
}
You need to casting all the views in the "right" view, when needed. That is ugly!
With theses static helper class you can directly get your View you want.
For example
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splashscreen);
TextView tv = FindView.getView(this, R.id.textview)
}
So put the FindView class in your Utils package and use it like a pro ;)
#HappyCoding