1 /*
2  * Copyright (C) 2014 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.layoutlib.bridge.android;
18 
19 import com.android.ide.common.rendering.api.RenderParams;
20 import com.android.ide.common.rendering.api.SessionParams.Key;
21 
22 /**
23  * This contains all known keys for the {@link RenderParams#getFlag(Key)}.
24  * <p/>
25  * The IDE has its own copy of this class which may be newer or older than this one.
26  * <p/>
27  * Constants should never be modified or removed from this class.
28  */
29 public final class RenderParamsFlags {
30 
31     public static final Key<String> FLAG_KEY_ROOT_TAG =
32             new Key<String>("rootTag", String.class);
33     public static final Key<Boolean> FLAG_KEY_DISABLE_BITMAP_CACHING =
34             new Key<Boolean>("disableBitmapCaching", Boolean.class);
35     public static final Key<Boolean> FLAG_KEY_RENDER_ALL_DRAWABLE_STATES =
36             new Key<Boolean>("renderAllDrawableStates", Boolean.class);
37     /**
38      * To tell LayoutLib that the IDE supports RecyclerView.
39      * <p/>
40      * Default is false.
41      */
42     public static final Key<Boolean> FLAG_KEY_RECYCLER_VIEW_SUPPORT =
43             new Key<Boolean>("recyclerViewSupport", Boolean.class);
44     /**
45      * The application package name. Used via
46      * {@link com.android.ide.common.rendering.api.LayoutlibCallback#getFlag(Key)}
47      */
48     public static final Key<String> FLAG_KEY_APPLICATION_PACKAGE =
49             new Key<String>("applicationPackage", String.class);
50 
51     // Disallow instances.
RenderParamsFlags()52     private RenderParamsFlags() {}
53 }
54