• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.videoeditor;
18 
19 import android.content.Context;
20 
21 import com.android.videoeditor.service.MovieOverlay;
22 
23 /**
24  * An overlay
25  */
26 public class OverlayType {
27     /**
28      * Get overlays
29      *
30      * @param context The context
31      *
32      * @return The array of overlay
33      */
getOverlays(Context context)34     public static OverlayType[] getOverlays(Context context) {
35         final OverlayType[] overlays = new OverlayType[4];
36         overlays[0] = new OverlayType(context.getString(R.string.overlay_preview_center),
37                 MovieOverlay.OVERLAY_TYPE_CENTER_1);
38         overlays[1] = new OverlayType(context.getString(R.string.overlay_preview_bottom),
39                 MovieOverlay.OVERLAY_TYPE_BOTTOM_1);
40         overlays[2] = new OverlayType(context.getString(R.string.overlay_preview_center),
41                 MovieOverlay.OVERLAY_TYPE_CENTER_2);
42         overlays[3] = new OverlayType(context.getString(R.string.overlay_preview_bottom),
43                 MovieOverlay.OVERLAY_TYPE_BOTTOM_2);
44 
45         return overlays;
46     }
47 
48     // Instance variables
49     private final String mName;
50     private final int mType;
51 
52     /**
53      * Constructor
54      */
OverlayType(String name, int type)55     public OverlayType(String name, int type) {
56         mName = name;
57         mType = type;
58     }
59 
60     /**
61      * @return The theme name
62      */
getName()63     public String getName() {
64         return mName;
65     }
66 
67     /**
68      * @return The type
69      */
getType()70     public int getType() {
71         return mType;
72     }
73 }
74