set Holo Light Theme - Android android.content

Android examples for android.content:Context

Description

set Holo Light Theme

Demo Code


//package com.java2s;
import android.annotation.SuppressLint;

import android.content.Context;

public class Main {

    protected static final int THEME_HOLO_SDK_LEVEL = 14;

    @SuppressLint("InlinedApi")
    public static void setHoloLightTheme(final Context context) {
        if (android.os.Build.VERSION.SDK_INT > THEME_HOLO_SDK_LEVEL) {
            context.setTheme(android.R.style.Theme_Holo_Light_NoActionBar);
        }/*from   w  w w .  ja va  2  s.  c  o m*/
    }
}

Related Tutorials