Android Open Source - CommonLibs App Config






From Project

Back to project page CommonLibs.

License

The source code is released under:

Apache License

If you think the Android project CommonLibs 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

package com.alex.common;
//  w w  w.java2s  .  com
import android.content.Context;

/**
 * ?????????
 * @author caisenchuan
 */
public class AppConfig {
    /*--------------------------
     * ???
     *-------------------------*/
    /**?????jpeg???????*/
    public static final int JPEG_QUALITY = 50;
    
    /*--------------------------
     * ?????
     *-------------------------*/

    /*--------------------------
     * ????????
     *-------------------------*/
    /**????*/
    private static boolean mDebug = false;
    
    /**????*/
    private static String mDirBase = "com.alex";
    
    /*--------------------------
     * public??
     *-------------------------*/
    /**
     * ????????????
     * @param context
     */
    public static void configPackageNameAsBaseDir(Context context) {
        mDirBase = context.getApplicationInfo().packageName;
    }
    
    /**
     * ??????
     */
    public static void setDebug(boolean debug) {
        mDebug = debug;
    }
    
    /**
     * ????????????
     */
    public static boolean isDebug() {
        return mDebug;
    }
    
    /**
     * ????????
     */
    public static void setDirPostfix(String fix) {
        mDirBase = String.format("com.alex.%s", fix);
    }
    
    /**
     * ????APP???????
     */
    public static String getDirApp() {
        String str = String.format("/%s/", mDirBase);
        return str;
    }

    /**
     * ????APP??????
     */
    public static String getDirPhoto() {
        String str = String.format("/%s/photo/", mDirBase);
        return str;
    }
    
    /**
     * ????APP??????
     */
    public static String getDirDownload() {
        String str = String.format("/%s/download/", mDirBase);
        return str;
    }
    
    /**
     * ????APP????
     */
    public static String getDirShare() {
        String str = String.format("/%s/share/", mDirBase);
        return str;
    }
    /*--------------------------
     * protected??packet??
     *-------------------------*/

    /*--------------------------
     * private??
     *-------------------------*/

}




Java Source Code List

com.alex.common.AppConfig.java
com.alex.common.AppControl.java
com.alex.common.Err.java
com.alex.common.OnHttpRequestReturnListener.java
com.alex.common.activities.BaseActivity.java
com.alex.common.activities.ImageLoadActivity.java
com.alex.common.activities.WebViewActivity.java
com.alex.common.apis.HttpApi.java
com.alex.common.exception.RetErrorException.java
com.alex.common.utils.BackgroundHandler.java
com.alex.common.utils.BaiduMapUtils.java
com.alex.common.utils.DateTimeUtils.java
com.alex.common.utils.DeviceUtils.java
com.alex.common.utils.DialogUtils.java
com.alex.common.utils.FileUtils.java
com.alex.common.utils.ImageUtils.java
com.alex.common.utils.KLog.java
com.alex.common.utils.Misc.java
com.alex.common.utils.NetworkUtils.java
com.alex.common.utils.PrefUtils.java
com.alex.common.utils.ShareUtils.java
com.alex.common.utils.StringUtils.java
com.alex.common.utils.ThreadUtils.java
com.alex.common.utils.ToastUtils.java
com.alex.common.views.ZoomImageView.java