Java tutorial
//package com.java2s; import android.view.View; import java.lang.reflect.Field; public class Main { public static int getSystemUiFlagLayoutStableValue(Class<View> object) { return getConstantValue(object, "SYSTEM_UI_FLAG_LAYOUT_STABLE"); } public static int getConstantValue(Class<View> object, String constantName) { int value = -1; try { Field field = object.getField(constantName); value = field.getInt(object); } catch (Exception e) { e.printStackTrace(); } return value; } }