图像上传设置
This commit is contained in:
parent
0ecc077bc2
commit
e2741cdccb
|
|
@ -26,6 +26,7 @@ import com.ifish.basebean.LookReport;
|
|||
import com.ifish.baseclass.BaseActivity;
|
||||
import com.ifish.geewe.ImgScreenshotUtil;
|
||||
import com.ifish.utils.AnimationUtil;
|
||||
import com.ifish.utils.AppUtil;
|
||||
import com.ifish.utils.Commons;
|
||||
import com.ifish.utils.Commons.LoginSPKey;
|
||||
import com.ifish.utils.Commons.NetWork;
|
||||
|
|
@ -91,11 +92,8 @@ public class LookAtReportActivity extends BaseActivity {
|
|||
iv_camera = findMyViewById(R.id.iv_camera);
|
||||
iv_head = findMyViewById(R.id.iv_head);
|
||||
String wximg = SPUtil.getInstance(LookAtReportActivity.this).getString(Commons.LoginSPKey.WXIMAGE);
|
||||
if (!TextUtils.isEmpty(wximg)) {
|
||||
Picasso.with(LookAtReportActivity.this).load(wximg).error(R.drawable.ic_error).into(iv_head);
|
||||
} else {
|
||||
Picasso.with(LookAtReportActivity.this).load(HttpManager.HEAD_URL + Commons.USER.getUserImg()).error(R.drawable.ic_error).into(iv_head);
|
||||
}
|
||||
AppUtil.setHeader(this,iv_head,wximg);
|
||||
|
||||
try {//加载最后一帧摄像头的图片,获取错误则加载默认图片
|
||||
cameraId = lookCamera.cameraId;
|
||||
File fileUpload = new File(ImgScreenshotUtil.getScreenshotImage(sp.getString(LoginSPKey.GeeWeUserId, ""), cameraId));
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import com.ifish.geewe.ImgScreenshotUtil;
|
|||
import com.ifish.geewe.VideoPlayNumber;
|
||||
import com.ifish.utils.ActivityManager;
|
||||
import com.ifish.utils.AnimationUtil;
|
||||
import com.ifish.utils.AppUtil;
|
||||
import com.ifish.utils.Commons;
|
||||
import com.ifish.utils.Commons.LoginSPKey;
|
||||
import com.ifish.utils.HttpListener;
|
||||
|
|
@ -436,11 +437,8 @@ public class LookFishMonitorActivity extends BaseGradeMonitorActivity implements
|
|||
et_content = (EditText) v.findViewById(R.id.et_content);
|
||||
iv_userImg = (ImageView) v.findViewById(R.id.iv_userImg);
|
||||
String wximg = SPUtil.getInstance(LookFishMonitorActivity.this).getString(Commons.LoginSPKey.WXIMAGE);
|
||||
if (!TextUtils.isEmpty(wximg)) {
|
||||
Picasso.with(getApplicationContext()).load(wximg).error(R.drawable.ic_error).into(iv_userImg);
|
||||
} else {
|
||||
Picasso.with(getApplicationContext()).load(HttpManager.HEAD_URL + Commons.USER.getUserImg()).error(R.drawable.ic_error).into(iv_userImg);
|
||||
}
|
||||
AppUtil.setHeader(this,iv_userImg,wximg);
|
||||
|
||||
iv_userType = (ImageView) v.findViewById(R.id.iv_userType);
|
||||
iv_reward = (ImageView) v.findViewById(R.id.iv_reward);
|
||||
tv_gradeNum = (TextView) v.findViewById(R.id.tv_gradeNum);
|
||||
|
|
|
|||
|
|
@ -280,26 +280,27 @@ public class MineActivity extends BaseActivity {
|
|||
|
||||
|
||||
private void changeHead() {
|
||||
final Dialog dialogHead = new Dialog(MineActivity.this, R.style.HOLOMyDialogs);
|
||||
dialogHead.show();
|
||||
Window window = dialogHead.getWindow();
|
||||
window.setContentView(R.layout.dialog_cramer);
|
||||
RelativeLayout rl_png = (RelativeLayout) window.findViewById(R.id.rl_man);
|
||||
RelativeLayout rl_cramera = (RelativeLayout) window.findViewById(R.id.rl_woman);
|
||||
rl_png.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
gallery();
|
||||
dialogHead.dismiss();
|
||||
}
|
||||
});
|
||||
rl_cramera.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
camera();
|
||||
dialogHead.dismiss();
|
||||
}
|
||||
});
|
||||
gallery();
|
||||
// final Dialog dialogHead = new Dialog(MineActivity.this, R.style.HOLOMyDialogs);
|
||||
// dialogHead.show();
|
||||
// Window window = dialogHead.getWindow();
|
||||
// window.setContentView(R.layout.dialog_cramer);
|
||||
// RelativeLayout rl_png = (RelativeLayout) window.findViewById(R.id.rl_man);
|
||||
// RelativeLayout rl_cramera = (RelativeLayout) window.findViewById(R.id.rl_woman);
|
||||
// rl_png.setOnClickListener(new OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
//
|
||||
// dialogHead.dismiss();
|
||||
// }
|
||||
// });
|
||||
// rl_cramera.setOnClickListener(new OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// camera();
|
||||
// dialogHead.dismiss();
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -218,12 +218,11 @@ public class AppUtil {
|
|||
if (!TextUtils.isEmpty(userImg)){
|
||||
Picasso.with(activity).invalidate(HttpManager.HEAD_URL + Commons.USER.getUserImg());//清除缓存 重新加载图片
|
||||
Picasso.with(activity).load(HttpManager.HEAD_URL + Commons.USER.getUserImg()).error(R.drawable.ic_error).into(header);
|
||||
}else {
|
||||
if (!TextUtils.isEmpty(weixin)) {
|
||||
}else if (!TextUtils.isEmpty(weixin)) {
|
||||
Picasso.with(activity).invalidate(weixin);//清除缓存 重新加载图片
|
||||
Picasso.with(activity).load(weixin).error(R.drawable.ic_error).into(header);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue