Java Code Examples for com.android.SdkConstants#OS_SKINS_FOLDER

The following examples show how to use com.android.SdkConstants#OS_SKINS_FOLDER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AddOnTarget.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
@Override
public String getPath(int pathId) {
    switch (pathId) {
        case SKINS:
            return mLocation + SdkConstants.OS_SKINS_FOLDER;
        case DOCS:
            return mLocation + SdkConstants.FD_DOCS + File.separator
                    + SdkConstants.FD_DOCS_REFERENCE;

        case LAYOUT_LIB:
            if (mHasRenderingLibrary) {
                return mLocation + SdkConstants.FD_DATA + File.separator
                        + SdkConstants.FN_LAYOUTLIB_JAR;
            }
            return mBasePlatform.getPath(pathId);

        case RESOURCES:
            if (mHasRenderingResources) {
                return mLocation + SdkConstants.FD_DATA + File.separator
                        + SdkConstants.FD_RES;
            }
            return mBasePlatform.getPath(pathId);

        case FONTS:
            if (mHasRenderingResources) {
                return mLocation + SdkConstants.FD_DATA + File.separator
                        + SdkConstants.FD_FONTS;
            }
            return mBasePlatform.getPath(pathId);

        case SAMPLES:
            // only return the add-on samples folder if there is actually a sample (or more)
            File sampleLoc = new File(mLocation, SdkConstants.FD_SAMPLES);
            if (sampleLoc.isDirectory()) {
                File[] files = sampleLoc.listFiles(new FileFilter() {
                    @Override
                    public boolean accept(File pathname) {
                        return pathname.isDirectory();
                    }

                });
                if (files != null && files.length > 0) {
                    return sampleLoc.getAbsolutePath();
                }
            }
            //$FALL-THROUGH$
        default :
            return mBasePlatform.getPath(pathId);
    }
}
 
Example 2
Source File: AddOnTarget.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String getPath(int pathId) {
    switch (pathId) {
        case SKINS:
            return mLocation + SdkConstants.OS_SKINS_FOLDER;
        case DOCS:
            return mLocation + SdkConstants.FD_DOCS + File.separator
                    + SdkConstants.FD_DOCS_REFERENCE;

        case LAYOUT_LIB:
            if (mHasRenderingLibrary) {
                return mLocation + SdkConstants.FD_DATA + File.separator
                        + SdkConstants.FN_LAYOUTLIB_JAR;
            }
            return mBasePlatform.getPath(pathId);

        case RESOURCES:
            if (mHasRenderingResources) {
                return mLocation + SdkConstants.FD_DATA + File.separator
                        + SdkConstants.FD_RES;
            }
            return mBasePlatform.getPath(pathId);

        case FONTS:
            if (mHasRenderingResources) {
                return mLocation + SdkConstants.FD_DATA + File.separator
                        + SdkConstants.FD_FONTS;
            }
            return mBasePlatform.getPath(pathId);

        case SAMPLES:
            // only return the add-on samples folder if there is actually a sample (or more)
            File sampleLoc = new File(mLocation, SdkConstants.FD_SAMPLES);
            if (sampleLoc.isDirectory()) {
                File[] files = sampleLoc.listFiles(new FileFilter() {
                    @Override
                    public boolean accept(File pathname) {
                        return pathname.isDirectory();
                    }

                });
                if (files != null && files.length > 0) {
                    return sampleLoc.getAbsolutePath();
                }
            }
            //$FALL-THROUGH$
        default :
            return mBasePlatform.getPath(pathId);
    }
}