Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: LGPL 

import android.content.Context;

import android.util.TypedValue;

public class Main {
    /**
     * @Description:
     * @param applicationContext
     * @return
     */
    public static int getHeightActionBar(Context context) {
        int height;
        TypedValue typeValue = new TypedValue();
        context.getTheme().resolveAttribute(android.R.attr.actionBarSize, typeValue, true);
        height = TypedValue.complexToDimensionPixelSize(typeValue.data, context.getResources().getDisplayMetrics());
        return height;
    }
}