alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Android example source code file (BridgeConstants.java)

This example Android source code file (BridgeConstants.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Android by Example" TM.

Java - Android tags/keywords

bridgeconstants, fill_parent, ns_resources, prefix_android_resource_ref, prefix_theme_ref, r, reference_null, reference_style, res_attr, res_layout, res_string, res_style, string, wrap_content

The BridgeConstants.java Android example source code

/*
 * Copyright (C) 2008 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.layoutlib.bridge;

/**
 * Constant definition class.<br>
 * <br>
 * Most constants have a prefix defining the content.
 * <ul>
 * <li>WS_ Workspace path constant. Those are absolute paths,
 * from the project root.</li>
 * <li>OS_ OS path constant. These paths are different depending on the platform.
 * <li>FN_ File name constant.
 * <li>FD_ Folder name constant.
 * <li>EXT_ File extension constant. This does NOT include a dot.
 * <li>DOT_ File extension constant. This start with a dot.
 * <li>RE_ Regexp constant.
 * <li>NS_ Namespace constant.
 * <li>CLASS_ Fully qualified class name.
 * </ul>
 *
 */
public class BridgeConstants {

    /** Namespace for the resource XML */
    public final static String NS_RESOURCES = "http://schemas.android.com/apk/res/android";

    public final static String R = "com.android.internal.R";

    public final static String PREFIX_ANDROID_RESOURCE_REF = "@android:";
    public final static String PREFIX_RESOURCE_REF = "@";
    public final static String PREFIX_ANDROID_THEME_REF = "?android:";
    public final static String PREFIX_THEME_REF = "?";

    public final static String PREFIX_ANDROID = "android:";

    public final static String RES_STYLE = "style";
    public final static String RES_ATTR = "attr";
    public final static String RES_DIMEN = "dimen";
    public final static String RES_DRAWABLE = "drawable";
    public final static String RES_COLOR = "color";
    public final static String RES_LAYOUT = "layout";
    public final static String RES_STRING = "string";
    public final static String RES_ID = "id";

    public final static String REFERENCE_STYLE = RES_STYLE + "/";
    public final static String REFERENCE_NULL = "@null";

    public final static String MATCH_PARENT = "match_parent";
    public final static String FILL_PARENT = "fill_parent";
    public final static String WRAP_CONTENT = "wrap_content";
}

Other Android examples (source code examples)

Here is a short list of links related to this Android BridgeConstants.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.