|
@@ -22,16 +22,13 @@ import android.text.Html;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
import android.text.method.ScrollingMovementMethod;
|
|
import android.text.method.ScrollingMovementMethod;
|
|
|
import android.util.DisplayMetrics;
|
|
import android.util.DisplayMetrics;
|
|
|
-import android.util.TypedValue;
|
|
|
|
|
import android.view.Display;
|
|
import android.view.Display;
|
|
|
import android.view.Gravity;
|
|
import android.view.Gravity;
|
|
|
import android.view.LayoutInflater;
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
import android.view.Window;
|
|
import android.view.Window;
|
|
|
import android.view.WindowManager;
|
|
import android.view.WindowManager;
|
|
|
-
|
|
|
|
|
-import com.tencent.smtt.sdk.WebView;
|
|
|
|
|
-
|
|
|
|
|
|
|
+import android.webkit.WebView;
|
|
|
import android.widget.CheckBox;
|
|
import android.widget.CheckBox;
|
|
|
import android.widget.CompoundButton;
|
|
import android.widget.CompoundButton;
|
|
|
import android.widget.EditText;
|
|
import android.widget.EditText;
|
|
@@ -48,7 +45,6 @@ import com.google.gson.Gson;
|
|
|
import com.kfzs.duanduan.fragment.FgtPersonalCenter;
|
|
import com.kfzs.duanduan.fragment.FgtPersonalCenter;
|
|
|
import com.sheep.gamegroup.dateview.DatePickerDialog;
|
|
import com.sheep.gamegroup.dateview.DatePickerDialog;
|
|
|
import com.sheep.gamegroup.dateview.DateUtil;
|
|
import com.sheep.gamegroup.dateview.DateUtil;
|
|
|
-import com.sheep.gamegroup.model.api.RedPackageMoney;
|
|
|
|
|
import com.sheep.gamegroup.model.entity.Advertising;
|
|
import com.sheep.gamegroup.model.entity.Advertising;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
import com.sheep.gamegroup.model.entity.Container;
|
|
import com.sheep.gamegroup.model.entity.Container;
|
|
@@ -57,9 +53,6 @@ import com.sheep.gamegroup.model.entity.GameAccountEntity;
|
|
|
import com.sheep.gamegroup.model.entity.HomeListEntity;
|
|
import com.sheep.gamegroup.model.entity.HomeListEntity;
|
|
|
import com.sheep.gamegroup.model.entity.PayEntity;
|
|
import com.sheep.gamegroup.model.entity.PayEntity;
|
|
|
import com.sheep.gamegroup.model.entity.RobTask;
|
|
import com.sheep.gamegroup.model.entity.RobTask;
|
|
|
-import com.sheep.gamegroup.model.entity.TaskEty;
|
|
|
|
|
-import com.sheep.gamegroup.model.entity.TaskReleaseEty;
|
|
|
|
|
-import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.gamegroup.util.glide.RoundedCornersTransformation;
|
|
import com.sheep.gamegroup.util.glide.RoundedCornersTransformation;
|
|
|
import com.sheep.gamegroup.view.activity.PersonalInfoAct;
|
|
import com.sheep.gamegroup.view.activity.PersonalInfoAct;
|
|
@@ -132,7 +125,7 @@ public class ViewUtil {
|
|
|
View save_pic = view.findViewById(R.id.save_pic);
|
|
View save_pic = view.findViewById(R.id.save_pic);
|
|
|
ImageView iv_qr_small = view.findViewById(R.id.iv_qr_small);
|
|
ImageView iv_qr_small = view.findViewById(R.id.iv_qr_small);
|
|
|
|
|
|
|
|
- GlideImageLoader.saveAndSetRqImage(iv_qr, AppUtil.getQRLink(link, 800), 800);
|
|
|
|
|
|
|
+ GlideImageLoader.saveAndSetRqImage(iv_qr, link, 800);
|
|
|
Glide.with(activity)
|
|
Glide.with(activity)
|
|
|
.load(R.drawable.icon)
|
|
.load(R.drawable.icon)
|
|
|
.apply(new RequestOptions().override(G.WIDTH / 8))
|
|
.apply(new RequestOptions().override(G.WIDTH / 8))
|
|
@@ -501,7 +494,7 @@ public class ViewUtil {
|
|
|
if (!TextUtils.isEmpty(link))
|
|
if (!TextUtils.isEmpty(link))
|
|
|
tv_link.setText(link);
|
|
tv_link.setText(link);
|
|
|
|
|
|
|
|
- GlideImageLoader.saveAndSetRqImage(iv_qr, AppUtil.getQRLink(link, 800), 800);
|
|
|
|
|
|
|
+ GlideImageLoader.saveAndSetRqImage(iv_qr, link, 800);
|
|
|
dialog_close.setOnClickListener(new View.OnClickListener() {
|
|
dialog_close.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
@@ -591,7 +584,7 @@ public class ViewUtil {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static void setH5Text(TextView textView, WebView webView, String content) {
|
|
|
|
|
|
|
+ public static void setH5Text(TextView textView, com.tencent.smtt.sdk.WebView webView, String content) {
|
|
|
if (textView == null || webView == null) {
|
|
if (textView == null || webView == null) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -626,9 +619,14 @@ public class ViewUtil {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public static void loadDataWithBaseURL(com.tencent.smtt.sdk.WebView webView, String content) {
|
|
|
|
|
+ webView.loadDataWithBaseURL(null,
|
|
|
|
|
+ new StringBuilder("<html><head><meta name=\"viewport\" content=\"width=device-width,height=auto, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" /><style>img{max-width:100% !important;height:auto !important;}</style><style>body{max-width:100% !important;}</style></head><body>").append(content).append("</body></html>").toString()
|
|
|
|
|
+ , "text/html", "utf-8", null);
|
|
|
|
|
+ }
|
|
|
public static void loadDataWithBaseURL(WebView webView, String content) {
|
|
public static void loadDataWithBaseURL(WebView webView, String content) {
|
|
|
webView.loadDataWithBaseURL(null,
|
|
webView.loadDataWithBaseURL(null,
|
|
|
- new StringBuilder("<html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" /><style>img{max-width:100% !important;height:auto !important;}</style><style>body{max-width:100% !important;}</style></head><body>").append(content).append("</body></html>").toString()
|
|
|
|
|
|
|
+ new StringBuilder("<html><head><meta name=\"viewport\" content=\"width=device-width,height=auto, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" /><style>img{max-width:100% !important;height:auto !important;}</style><style>body{max-width:100% !important;}</style></head><body>").append(content).append("</body></html>").toString()
|
|
|
, "text/html", "utf-8", null);
|
|
, "text/html", "utf-8", null);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -680,7 +678,7 @@ public class ViewUtil {
|
|
|
}
|
|
}
|
|
|
View dialog_close = dialog_parent.findViewById(R.id.dialog_close);
|
|
View dialog_close = dialog_parent.findViewById(R.id.dialog_close);
|
|
|
LinearLayout dialog_center_ll = dialog_parent.findViewById(R.id.dialog_center_ll);
|
|
LinearLayout dialog_center_ll = dialog_parent.findViewById(R.id.dialog_center_ll);
|
|
|
- View view = LayoutInflater.from(mContext).inflate(dialogConfig.getLayoutId(), dialog_center_ll, true);
|
|
|
|
|
|
|
+ final View view = LayoutInflater.from(mContext).inflate(dialogConfig.getLayoutId(), dialog_center_ll, true);
|
|
|
if (!TextUtils.isEmpty(title))
|
|
if (!TextUtils.isEmpty(title))
|
|
|
dialog_title.setText(title);
|
|
dialog_title.setText(title);
|
|
|
|
|
|