Android Open Source - AndroidTrainingCode Constants






From Project

Back to project page AndroidTrainingCode.

License

The source code is released under:

Apache License

If you think the Android project AndroidTrainingCode listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * Copyright (C) 2012 The Android Open Source Project
 */*  w w  w  . jav  a2s .c o  m*/
 * 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.example.android.threadsample;

import java.util.Locale;

/**
 *
 * Constants used by multiple classes in this package
 */
public final class Constants {

    // Set to true to turn on verbose logging
    public static final boolean LOGV = false;
    
    // Set to true to turn on debug logging
    public static final boolean LOGD = true;

    // Custom actions
    
    public static final String ACTION_VIEW_IMAGE =
            "com.example.android.threadsample.ACTION_VIEW_IMAGE";

    public static final String ACTION_ZOOM_IMAGE =
            "com.example.android.threadsample.ACTION_ZOOM_IMAGE";
    
    // Defines a custom Intent action
    public static final String BROADCAST_ACTION = "com.example.android.threadsample.BROADCAST";

    // Fragment tags
    public static final String PHOTO_FRAGMENT_TAG =
            "com.example.android.threadsample.PHOTO_FRAGMENT_TAG";
    
    public static final String THUMBNAIL_FRAGMENT_TAG =
            "com.example.android.threadsample.THUMBNAIL_FRAGMENT_TAG";

    // Defines the key for the status "extra" in an Intent
    public static final String EXTENDED_DATA_STATUS = "com.example.android.threadsample.STATUS";

    // Defines the key for the log "extra" in an Intent
    public static final String EXTENDED_STATUS_LOG = "com.example.android.threadsample.LOG";
    
    // Defines the key for storing fullscreen state
    public static final String EXTENDED_FULLSCREEN =
            "com.example.android.threadsample.EXTENDED_FULLSCREEN";

    /*
     * A user-agent string that's sent to the HTTP site. It includes information about the device
     * and the build that the device is running.
     */
    public static final String USER_AGENT = "Mozilla/5.0 (Linux; U; Android "
            + android.os.Build.VERSION.RELEASE + ";"
            + Locale.getDefault().toString() + "; " + android.os.Build.DEVICE
            + "/" + android.os.Build.ID + ")";

    // Status values to broadcast to the Activity

    // The download is starting
    public static final int STATE_ACTION_STARTED = 0;

    // The background thread is connecting to the RSS feed
    public static final int STATE_ACTION_CONNECTING = 1;

    // The background thread is parsing the RSS feed
    public static final int STATE_ACTION_PARSING = 2;

    // The background thread is writing data to the content provider
    public static final int STATE_ACTION_WRITING = 3;

    // The background thread is done
    public static final int STATE_ACTION_COMPLETE = 4;

    // The background thread is doing logging
    public static final int STATE_LOG = -1;

    public static final CharSequence BLANK = " ";
}




Java Source Code List

com.example.android.animationsdemo.ApplicationTest.java
com.example.android.animationsdemo.CardFlipActivity.java
com.example.android.animationsdemo.CrossfadeActivity.java
com.example.android.animationsdemo.LayoutChangesActivity.java
com.example.android.animationsdemo.MainActivity.java
com.example.android.animationsdemo.ScreenSlideActivity.java
com.example.android.animationsdemo.ScreenSlidePageFragment.java
com.example.android.animationsdemo.TouchHighlightImageButton.java
com.example.android.animationsdemo.ZoomActivity.java
com.example.android.lifecycle.ActivityA.java
com.example.android.lifecycle.ActivityB.java
com.example.android.lifecycle.ActivityC.java
com.example.android.lifecycle.ApplicationTest.java
com.example.android.lifecycle.DialogActivity.java
com.example.android.lifecycle.util.StatusTracker.java
com.example.android.lifecycle.util.Utils.java
com.example.android.threadsample.BroadcastNotifier.java
com.example.android.threadsample.Constants.java
com.example.android.threadsample.DataProviderContract.java
com.example.android.threadsample.DataProvider.java
com.example.android.threadsample.DisplayActivity.java
com.example.android.threadsample.PhotoDecodeRunnable.java
com.example.android.threadsample.PhotoDownloadRunnable.java
com.example.android.threadsample.PhotoFragment.java
com.example.android.threadsample.PhotoManager.java
com.example.android.threadsample.PhotoTask.java
com.example.android.threadsample.PhotoThumbnailFragment.java
com.example.android.threadsample.PhotoView.java
com.example.android.threadsample.ProgressNotifier.java
com.example.android.threadsample.RSSPullParser.java
com.example.android.threadsample.RSSPullService.java