代码整理

This commit is contained in:
kehaoyuan
2017-05-05 18:24:37 +08:00
parent 4da12055e9
commit c96193b3d0
29 changed files with 44 additions and 66 deletions

View File

@ -58,7 +58,6 @@ public class DialogUtils {
, R.layout.dialog_kuaichuan, null);
final LinearLayout mShareLl = (LinearLayout) view.findViewById(R.id.kuaichuan_dialog_ll);
final LinearLayout mShareBottomLl = (LinearLayout) view.findViewById(R.id.kuaichuan_dialog_share_rl);
RelativeLayout content = (RelativeLayout) view.findViewById(R.id.kuaichuan_dialog);
LinearLayout shareIconLl = (LinearLayout) view.findViewById(R.id.kuaichuan_icon_ll);
ImageView qrCode = (ImageView) view.findViewById(R.id.kuaichuan_qrcode);
TextView dateTv = (TextView) view.findViewById(R.id.kuaichuan_dialog_date);
@ -190,7 +189,10 @@ public class DialogUtils {
}
public static void saveBitmap(Bitmap bm, Activity activity, String picName) {
File file = new File(activity.getExternalCacheDir().getPath() + "/ShareImg");
File externalCacheDir = activity.getExternalCacheDir();
if (externalCacheDir == null) return;
File file = new File(externalCacheDir.getPath() + "/ShareImg");
if (!file.isDirectory()) {
file.delete();
file.mkdirs();
@ -285,7 +287,6 @@ public class DialogUtils {
final ImageView installhint_unselect = (ImageView) view.findViewById(R.id.installhint_unselect);
final ImageView installhint_select = (ImageView) view.findViewById(R.id.installhint_select);
TextView installhint_cancel = (TextView) view.findViewById(R.id.installhint_cancel);
LinearLayout installhint_unselect_ll = (LinearLayout) view.findViewById(R.id.installhint_unselect_ll);
installhint_unselect_ll.setOnClickListener(new View.OnClickListener() {