|
|
@@ -32,6 +32,7 @@ import android.widget.TextView;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alipay.sdk.app.PayTask;
|
|
|
import com.bumptech.glide.Glide;
|
|
|
+import com.kfzs.duanduan.cardview.ScreenUtil;
|
|
|
import com.kfzs.duanduan.utils.ApkUtils;
|
|
|
import com.mdad.sdk.mdsdk.AdManager;
|
|
|
import com.mdad.sdk.mdsdk.common.AdData;
|
|
|
@@ -3013,32 +3014,32 @@ public class CommonUtil {
|
|
|
int x = 35;
|
|
|
int y = -50;
|
|
|
|
|
|
- if (TestUtil.isDev()) {//测试部分
|
|
|
- CharSequence copyText = StringUtils.getCopyText();
|
|
|
- String copy;
|
|
|
- if (copyText == null) {
|
|
|
- copy = "1;0;100;35;-50";
|
|
|
- } else {
|
|
|
- copy = copyText.toString();
|
|
|
- }
|
|
|
- String[] items = copy.split(";");
|
|
|
- int i = 0;
|
|
|
- try {
|
|
|
- int n = Integer.parseInt(items[i++]);
|
|
|
- p = Integer.parseInt(items[i++]);
|
|
|
- w = Integer.parseInt(items[i++]);
|
|
|
- x = Integer.parseInt(items[i++]);
|
|
|
- y = Integer.parseInt(items[i++]);
|
|
|
- while (n != child_list.size()) {
|
|
|
- if (n > child_list.size())
|
|
|
- child_list.add(child_list.get(0));
|
|
|
- else
|
|
|
- child_list.remove(0);
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
+// if (TestUtil.isDev()) {//测试部分
|
|
|
+// CharSequence copyText = StringUtils.getCopyText();
|
|
|
+// String copy;
|
|
|
+// if (copyText == null) {
|
|
|
+// copy = "1;0;100;35;-50";
|
|
|
+// } else {
|
|
|
+// copy = copyText.toString();
|
|
|
+// }
|
|
|
+// String[] items = copy.split(";");
|
|
|
+// int i = 0;
|
|
|
+// try {
|
|
|
+// int n = Integer.parseInt(items[i++]);
|
|
|
+// p = Integer.parseInt(items[i++]);
|
|
|
+// w = Integer.parseInt(items[i++]);
|
|
|
+// x = Integer.parseInt(items[i++]);
|
|
|
+// y = Integer.parseInt(items[i++]);
|
|
|
+// while (n != child_list.size()) {
|
|
|
+// if (n > child_list.size())
|
|
|
+// child_list.add(child_list.get(0));
|
|
|
+// else
|
|
|
+// child_list.remove(0);
|
|
|
+// }
|
|
|
+// } catch (Exception e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
View contentView = LayoutInflater.from(activity).inflate(R.layout.pop_hom_list_tip, null, false);
|
|
|
int padding = G.getRealPix(p);
|
|
|
@@ -3052,7 +3053,7 @@ public class CommonUtil {
|
|
|
home_list_rv.setHasFixedSize(true);
|
|
|
home_list_rv.setNestedScrollingEnabled(false);
|
|
|
home_list_rv.setLayoutManager(manager);
|
|
|
- AdpHomeList<HomeListEntity> adpHomeList = new AdpHomeList<>(R.layout.item_my_list_but2, child_list);
|
|
|
+ AdpHomeList<HomeListEntity> adpHomeList = new AdpHomeList<>(R.layout.item_my_list_but2, ScreenUtil.getScreenWidth(activity) / 4, child_list);
|
|
|
adpHomeList.bindToRecyclerView(home_list_rv);
|
|
|
adpHomeList.setOnItemClickListener((adapter, view, position) -> {
|
|
|
HomeListEntity item = ListUtil.getItem(child_list, position);
|
|
|
@@ -3064,7 +3065,7 @@ public class CommonUtil {
|
|
|
});
|
|
|
|
|
|
PopupWindowUtil.showLayout(activity, new PopupWindowUtil.PopupWindowParams(contentView).setAnchor(anchor)
|
|
|
- .setWidth(G.getRealPix(spanCount * w + p)).setXoff(G.getRealPix(x)).setYoff(G.getRealPix(y))
|
|
|
+ .setWidth(ViewGroup.LayoutParams.MATCH_PARENT).setXoff(G.getRealPix(x)).setYoff(G.getRealPix(y))
|
|
|
.setGravity(Gravity.BOTTOM).setOutsideTouchable(true).setFocusable(true));
|
|
|
}
|
|
|
}
|