Back to project page CommonLibs.
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.
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?? *-------------------------*/ }