进度条加载封装类
package demo.bwie.com.shopcrat.utiles;
import android.app.ProgressDialog;
import android.content.Context;
public class DialogUtil {
public static ProgressDialog getProgressDialog(Context context) {
ProgressDialog progressDialog = new ProgressDialog(context);
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progressDialog.setMessage("正在加载...");
progressDialog.setCancelable(false);
return progressDialog;
}
}
SharedPreferences的一个工具类
package demo.bwie.com.shopcrat.utiles;
import android.content.Context;
import android.content.SharedPreferences;
/**
* SharedPreferences的一个工具类,调用setParam就能保存String, Integer, Boolean, Float, Long类型的参数
* 同样调用getParam就能获取到保存在手机里面