public abstract class BaseActivity extends AppCompatActivity implements View.OnClickListener
{
protected void addClick(intid)
{
View view =mVFinder.findView(id);
addClick(view);
}
}
public class ViewFinder{
private SparseArray mViews;
publicTfindView(int viewId)
{
View view =mViews.get(viewId);
if(view ==null)
{
view =mLayout.findViewById(viewId);
mViews.put(viewId,view);
}
return(T) view;
}
}