|
|
@@ -268,7 +268,7 @@ public class ViewUtil {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
mRobTask = getTask(ivIcon, tvTitel, tvDutyMoney);
|
|
|
- LogUtil.logI("抢任务---"+new Gson().toJson(mRobTask));
|
|
|
+ LogUtil.logI("抢任务---" + new Gson().toJson(mRobTask));
|
|
|
|
|
|
}
|
|
|
});
|
|
|
@@ -300,6 +300,7 @@ public class ViewUtil {
|
|
|
|
|
|
/**
|
|
|
* 设置默认方块文本
|
|
|
+ *
|
|
|
* @param textView
|
|
|
*/
|
|
|
public static void setDefaultText(TextView textView) {
|
|
|
@@ -566,6 +567,7 @@ public class ViewUtil {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 领取福利成功的对话框
|
|
|
*
|
|
|
@@ -717,6 +719,7 @@ public class ViewUtil {
|
|
|
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) {
|
|
|
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()
|
|
|
@@ -1315,6 +1318,12 @@ public class ViewUtil {
|
|
|
final AlertDialog dialog = new AlertDialog.Builder(activity, R.style.AppTheme_Dialog_Alert)
|
|
|
.setView(dialog_parent)
|
|
|
.create();
|
|
|
+ Window windows = dialog.getWindow();
|
|
|
+ windows.setGravity(Gravity.BOTTOM); //Dialog在屏幕底部弹出来
|
|
|
+ WindowManager.LayoutParams layoutParams = windows.getAttributes();//获得布局属性
|
|
|
+ layoutParams.width = 400; //设置Dialog的宽
|
|
|
+ layoutParams.height = 200; //设置Dialog的高
|
|
|
+ windows.setWindowAnimations(R.style.Rising);//设置动画效果
|
|
|
// TextView ask_share_title = dialog_parent.findViewById(R.id.ask_share_title);
|
|
|
RecyclerView ask_share_list = dialog_parent.findViewById(R.id.ask_share_list);
|
|
|
GridLayoutManager gridLayoutManager = new GridLayoutManager(activity, 5);
|
|
|
@@ -1402,23 +1411,24 @@ public class ViewUtil {
|
|
|
textView.setBackgroundResource(R.drawable.shape_red_stroke_rectangle_no_lb);
|
|
|
textView.setTextColor(context.getResources().getColor(R.color.red_FD2D54));
|
|
|
textView.setText("现金");
|
|
|
- textView.setPadding( padding2, padding1, padding2, padding1);
|
|
|
+ textView.setPadding(padding2, padding1, padding2, padding1);
|
|
|
break;
|
|
|
case 4:
|
|
|
textView.setVisibility(View.VISIBLE);
|
|
|
textView.setBackgroundResource(R.drawable.shape_red_f07422_stroke_retangle_no_lb);
|
|
|
textView.setTextColor(context.getResources().getColor(R.color.red_F07422));
|
|
|
textView.setText("活跃");
|
|
|
- textView.setPadding( padding2, padding1, padding2, padding1);
|
|
|
+ textView.setPadding(padding2, padding1, padding2, padding1);
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 获取状态栏高度
|
|
|
*
|
|
|
- * @return , 状态栏高度
|
|
|
* @param activity
|
|
|
+ * @return , 状态栏高度
|
|
|
*/
|
|
|
public static int getBarHeight(FragmentActivity activity) {
|
|
|
int result = 0;
|