logo加载不出来的问题处理
This commit is contained in:
parent
7df1704147
commit
487f7c4ee1
|
|
@ -26,5 +26,5 @@ android.enableJetifier=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.useDeprecatedNdk=true
|
android.useDeprecatedNdk=true
|
||||||
|
|
||||||
versionCode=41
|
versionCode=42
|
||||||
versionName=4.11.1
|
versionName=4.11.2
|
||||||
|
|
@ -158,4 +158,5 @@ dependencies {
|
||||||
|
|
||||||
implementation 'com.tencent:mmkv:1.3.3'
|
implementation 'com.tencent:mmkv:1.3.3'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ifish.activity;
|
package com.ifish.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
|
|
@ -95,10 +96,12 @@ public class MainSixControlActivity extends BaseGradeActivity implements SwipeRe
|
||||||
init();
|
init();
|
||||||
initView();
|
initView();
|
||||||
initListener();
|
initListener();
|
||||||
|
L.i( "---3-------------onCreate"+HttpManager.Store_URL+Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0)).getVenderList().getLogo());
|
||||||
try {
|
try {
|
||||||
initTitle(Commons.DEVICE.get(Commons.DevicePosition).getShowName());
|
initTitle(Commons.DEVICE.get(Commons.DevicePosition).getShowName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
}
|
}
|
||||||
ReviewBrand();
|
ReviewBrand();
|
||||||
LoginDevice();
|
LoginDevice();
|
||||||
|
|
@ -326,8 +329,18 @@ public class MainSixControlActivity extends BaseGradeActivity implements SwipeRe
|
||||||
private void ReviewBrand() {
|
private void ReviewBrand() {
|
||||||
try {//展示厂家
|
try {//展示厂家
|
||||||
if (Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0)).getVenderList()!=null) {//厂家为空则展示默认的鱼影
|
if (Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0)).getVenderList()!=null) {//厂家为空则展示默认的鱼影
|
||||||
Picasso.with(MainSixControlActivity.this).load(HttpManager.Store_URL+Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0)).getVenderList().getLogo()).error(R.drawable.ifish_logo_default).into(iv_left);
|
|
||||||
tv_left.setText(Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0)).getVenderList().getBrandName());
|
String imageName = HttpManager.Store_URL+Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0))
|
||||||
|
.getVenderList().getLogo();
|
||||||
|
|
||||||
|
Picasso.with(MainSixControlActivity.this)
|
||||||
|
.load(imageName.replace("https","http")).error(R.drawable.ifish_logo_default)
|
||||||
|
.placeholder(getDrawable(R.drawable.ifish_logo_default))
|
||||||
|
.into(iv_left);
|
||||||
|
String brandName = Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0)).getVenderList().getBrandName();
|
||||||
|
if (!TextUtils.isEmpty(brandName)){
|
||||||
|
tv_left.setText(brandName);
|
||||||
|
}
|
||||||
L.i("厂家Logo="+HttpManager.Store_URL+Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0)).getVenderList().getLogo());
|
L.i("厂家Logo="+HttpManager.Store_URL+Commons.DEVICE.get(sp.getInt(Commons.LoginSPKey.Position, 0)).getVenderList().getLogo());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -286,20 +286,12 @@ public class DeviceFragment extends BaseV4Fragment implements ObservableScrollVi
|
||||||
dialog.setCancelable(false);
|
dialog.setCancelable(false);
|
||||||
// dialog.setMessage("请到应用管理-爱鱼奇-应用权限页面开启权限后重新打开app");
|
// dialog.setMessage("请到应用管理-爱鱼奇-应用权限页面开启权限后重新打开app");
|
||||||
dialog.setMessage("请到应用信息页面-权限管理-打开位置和相机权限");
|
dialog.setMessage("请到应用信息页面-权限管理-打开位置和相机权限");
|
||||||
dialog.setPositiveButton("去开启", new DialogInterface.OnClickListener() {
|
dialog.setPositiveButton("去开启", (dialog1, which) -> {
|
||||||
@Override
|
|
||||||
public void onClick(
|
|
||||||
DialogInterface dialog,
|
|
||||||
int which) {
|
|
||||||
// Intent mItent = new Intent(Settings.ACTION_SETTINGS);
|
// Intent mItent = new Intent(Settings.ACTION_SETTINGS);
|
||||||
// startActivity(mItent);
|
// startActivity(mItent);
|
||||||
AppUtil.toAuthority(requireActivity());
|
AppUtil.toAuthority(requireActivity());
|
||||||
}
|
|
||||||
});
|
});
|
||||||
dialog.setNegativeButton("取消", new DialogInterface.OnClickListener() {
|
dialog.setNegativeButton("取消", (dialog12, which) -> {
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue