package cl.monsoon.s1next.util;

import android.content.Context;
import android.util.TypedValue;

import cl.monsoon.s1next.R;

public final class ResourceUtil {

    private ResourceUtil() {

    }

    public static int getToolbarHeight(Context context) {
        TypedValue typedValue = new TypedValue();
        context.getTheme().resolveAttribute(R.attr.actionBarSize, typedValue, true);

        return
                TypedValue.complexToDimensionPixelSize(
                        typedValue.data,
                        context.getResources().getDisplayMetrics());
    }
}

@@ -61,40 +61,8 @@
 ext;
-%0Aimport android.util.TypedValue;
 %0A%0Aim
@@ -230,135 +230,53 @@
     
-TypedValue typedValue = new TypedValue();%0A        context.getTheme().resolveAttribute(R.attr.actionBarSize, typedValue, true);%0A
+return%0A                context.getResources()
 %0A   
@@ -272,39 +272,32 @@
 urces()%0A        
-return%0A
                 
@@ -300,155 +300,77 @@
     
-TypedValue.complexToDimensionPixelSize(%0A                        typedValue.data,%0A                        context.getResources().getDisplayMetrics()
+.getDimensionPixelSize(R.dimen.abc_action_bar_default_height_material
 );%0A 

Refactor `getToolbarHeight(Context)`