Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;

import android.util.TypedValue;

public class Main {
    public static Drawable getSplitActionBarBackground(Context context) {
        TypedValue outValue = new TypedValue();
        context.getTheme().resolveAttribute(android.R.attr.actionBarStyle, outValue, true);
        TypedArray typedArray = context.obtainStyledAttributes(outValue.resourceId,
                new int[] { android.R.attr.backgroundSplit });
        Drawable background = typedArray.getDrawable(0);
        typedArray.recycle();
        return background;
    }
}