| | |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.wpc.library.util.ScreenUtils; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.cache.DiskLruCache; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | |
| | | seekBar = top.findViewById(R.id.slide_indicator_point); |
| | | seekBar.setPadding(0, 0, 0, 0); |
| | | seekBar.setThumbOffset(0); |
| | | seekBar.setVisibility(View.GONE); |
| | | // seekBar.setVisibility(View.GONE); |
| | | |
| | | rv_special_offer.addItemDecoration(circleSpecialItemDecoration); |
| | | |
| | |
| | | gradientDrawable.setSize(DimenUtils.dip2px(getContext(), 50) * 5 / (circleSpecials.size() / 2) |
| | | , DimenUtils.dip2px(getContext(), 4)); |
| | | } |
| | | // seekBar.setVisibility(mSpecial2s.size() <= 10 ? View.GONE : View.VISIBLE); |
| | | seekBar.setVisibility(circleSpecials.size() <= 8 ? View.GONE : View.VISIBLE); |
| | | |
| | | if (list2 == null || list2.size() == 0) { |
| | | rv_special_offer.setVisibility(View.GONE); |
| | |
| | | } |
| | | circleSpecials.addAll(list2); |
| | | specialAdapter2.notifyDataSetChanged(); |
| | | // seekBar.setVisibility(mSpecial2s.size() <= 10 ? View.GONE : View.VISIBLE); |
| | | seekBar.setVisibility(circleSpecials.size() <= 8 ? View.GONE : View.VISIBLE); |
| | | if (circleSpecials.size() > 10) { |
| | | GradientDrawable gradientDrawable = (GradientDrawable) seekBar.getThumb(); |
| | | //根据列表的个数,动态设置游标的大小,设置游标的时候,progress进度的颜色设置为和seekbar的颜色设置的一样的,所以就不显示进度了。 |
| | |
| | | .optJSONArray("list").toString(), |
| | | new TypeToken<List<SpecialOffer2>>() { |
| | | }.getType()); |
| | | list5.clear(); |
| | | showActivity2(list5); |
| | | |
| | | if (list5 == null || list5.size() == 0) { |
| | |
| | | // goodsAdapter.notifyItemRangeChanged(goodsAdapter.getItemCount(), list.size());//倒序批量刷新列表 |
| | | count = jsonObject.optJSONObject("data").optInt("count"); |
| | | // tv_recommend_goods_hint.setVisibility(mList.size() > 0 ? View.VISIBLE : View.GONE); |
| | | v_divider.setVisibility(mList.size() > 0 ? View.VISIBLE : View.GONE); |
| | | |
| | | if (mList.size() == count) { |
| | | bottom.setVisibility(View.VISIBLE); |
| | |
| | | */ |
| | | private void showBigActivity(final List<SpecialOffer2> mList, String bottomPic) { |
| | | if (mList.size() > 0) { |
| | | float screenWidth = SystemCommon.getScreenWidth(vp_banner.getContext()); |
| | | int screenWidth = ScreenUtils.getScreenWidth(getContext()); |
| | | ViewGroup.MarginLayoutParams p1 = (ViewGroup.MarginLayoutParams) ((View) fl_fragment_activity.getParent()).getLayoutParams(); |
| | | |
| | | int rowSpace=DimenUtils.dip2px(getContext(),10); |
| | | int smallImageWidth; |
| | | int bigImageWidth=screenWidth-p1.leftMargin-p1.rightMargin; |
| | | |
| | | float actTotalHeight = (screenWidth - DimenUtils.dip2px(getContext(), 20)) * 7 / 20; |
| | | for (int i = 0; i < mList.size(); i++) { |
| | | if (i > 0 && i % 2 == 0) { |