OSDN Git Service

Repackaged com.andrew.apollo to com.cyngn.eleven
[android-x86/packages-apps-Eleven.git] / src / com / cyngn / eleven / widgets / theme / Colorstrip.java
1 /*
2  * Copyright (C) 2012 Andrew Neal Licensed under the Apache License, Version 2.0
3  * (the "License"); you may not use this file except in compliance with the
4  * License. You may obtain a copy of the License at
5  * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
6  * or agreed to in writing, software distributed under the License is
7  * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the specific language
9  * governing permissions and limitations under the License.
10  */
11
12 package com.cyngn.eleven.widgets.theme;
13
14 import android.content.Context;
15 import android.util.AttributeSet;
16 import android.view.View;
17
18 import com.cyngn.eleven.utils.ThemeUtils;
19
20 /**
21  * Used as a thin strip placed just above the bottom action bar or just below
22  * the top action bar.
23  * 
24  * @author Andrew Neal (andrewdneal@gmail.com)
25  */
26 public class Colorstrip extends View {
27
28     /**
29      * Resource name used to theme the colorstrip
30      */
31     private static final String COLORSTRIP = "colorstrip";
32
33     /**
34      * @param context The {@link Context} to use
35      * @param attrs The attributes of the XML tag that is inflating the view.
36      */
37     public Colorstrip(final Context context, final AttributeSet attrs) {
38         super(context, attrs);
39         // Initialze the theme resources
40         final ThemeUtils resources = new ThemeUtils(context);
41         // Theme the colorstrip
42         setBackgroundColor(resources.getColor(COLORSTRIP));
43     }
44 }