BridgeConstants.java revision 918aaa5717fce6081557c82ce1c439b6922737d5
1/*
2 * Copyright (C) 2008 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
17package com.android.layoutlib.bridge;
18
19/**
20 * Constant definition class.<br>
21 * <br>
22 * Most constants have a prefix defining the content.
23 * <ul>
24 * <li><code>WS_</code> Workspace path constant. Those are absolute paths,
25 * from the project root.</li>
26 * <li><code>OS_</code> OS path constant. These paths are different depending on the platform.</li>
27 * <li><code>FN_</code> File name constant.</li>
28 * <li><code>FD_</code> Folder name constant.</li>
29 * <li><code>EXT_</code> File extension constant. This does NOT include a dot.</li>
30 * <li><code>DOT_</code> File extension constant. This start with a dot.</li>
31 * <li><code>RE_</code> Regexp constant.</li>
32 * <li><code>NS_</code> Namespace constant.</li>
33 * <li><code>CLASS_</code> Fully qualified class name.</li>
34 * </ul>
35 *
36 */
37public class BridgeConstants {
38
39    /** Namespace for the resource XML */
40    public final static String NS_RESOURCES = "http://schemas.android.com/apk/res/android";
41
42    public final static String R = "com.android.internal.R";
43
44    public final static String PREFIX_ANDROID_RESOURCE_REF = "@android:";
45    public final static String PREFIX_RESOURCE_REF = "@";
46    public final static String PREFIX_ANDROID_THEME_REF = "?android:";
47    public final static String PREFIX_THEME_REF = "?";
48
49    public final static String PREFIX_ANDROID = "android:";
50
51    public final static String RES_ANIMATOR = "animator";
52    public final static String RES_STYLE = "style";
53    public final static String RES_ATTR = "attr";
54    public final static String RES_DIMEN = "dimen";
55    public final static String RES_DRAWABLE = "drawable";
56    public final static String RES_COLOR = "color";
57    public final static String RES_LAYOUT = "layout";
58    public final static String RES_STRING = "string";
59    public final static String RES_ID = "id";
60
61    public final static String REFERENCE_STYLE = RES_STYLE + "/";
62    public final static String REFERENCE_NULL = "@null";
63
64    public final static String MATCH_PARENT = "match_parent";
65    public final static String FILL_PARENT = "fill_parent";
66    public final static String WRAP_CONTENT = "wrap_content";
67}
68