Guest User

Untitled

a guest
Oct 15th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. public class HelperUtil {
  2.  
  3. private final HelperUtilImpl mImpl;
  4.  
  5. public HelperUtil (Context context) {
  6.  
  7. if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {
  8. mImpl = new HelperUtilImplL(context);
  9. } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
  10. mImpl = new HelperUtilImplKK(context);
  11. } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
  12. mImpl = new HelperUtilImplJB(context);
  13. } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
  14. mImpl = new HelperUtilImplICS(context);
  15. } else {
  16. mImpl = new HelperUtilImplBase(context);
  17. }
  18. }
  19.  
  20. public void setActionBar() {
  21. mImpl.setActionBar();
  22. }
  23.  
  24. public void setElevation(View view, float elevation){
  25. mImpl.setElevation(view, elevation);
  26. }
  27.  
  28. }
Add Comment
Please, Sign In to add comment