Esempio n. 1
0
 /*1,  男 0:女 -1 不公开*/
 public static String getGender(Integer gender) {
   switch (gender) {
     case 0:
       return AppApplication.getContext().getString(R.string.female);
     case 1:
       return AppApplication.getContext().getString(R.string.male);
     case -1:
       return AppApplication.getContext().getString(R.string.private_info);
     default:
       return AppApplication.getContext().getString(R.string.private_info);
   }
 }
Esempio n. 2
0
 public static boolean isWifiConnected(Context context) {
   SharedPreferences shp =
       PreferenceManager.getDefaultSharedPreferences(AppApplication.getContext());
   boolean isSupport = shp.getBoolean(context.getString(R.string.pref_wifi), false);
   ConnectivityManager connectivityManager =
       (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
   NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
   if (activeNetInfo != null && activeNetInfo.getType() == ConnectivityManager.TYPE_WIFI) {
     return isSupport;
   }
   return false;
 }
Esempio n. 3
0
 public static String getUserLogo() {
   return PreferenceUtil.getString(
       Config.USER_LOG, AppApplication.getContext().getString(R.string.default_user_logo));
 }
Esempio n. 4
0
 public static String getUserName() {
   return PreferenceUtil.getString(
       Config.USERNAME, AppApplication.getContext().getString(R.string.un_login));
 }
Esempio n. 5
0
 public static String getSignatrue() {
   return PreferenceUtil.getString(
       Config.USER_SIGNATRUE, AppApplication.getContext().getString(R.string.un_login));
 }