Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HelperUtil {
- private final HelperUtilImpl mImpl;
- public HelperUtil (Context context) {
- if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {
- mImpl = new HelperUtilImplL(context);
- } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
- mImpl = new HelperUtilImplKK(context);
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- mImpl = new HelperUtilImplJB(context);
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- mImpl = new HelperUtilImplICS(context);
- } else {
- mImpl = new HelperUtilImplBase(context);
- }
- }
- public void setActionBar() {
- mImpl.setActionBar();
- }
- public void setElevation(View view, float elevation){
- mImpl.setElevation(view, elevation);
- }
- }
Add Comment
Please, Sign In to add comment