46个文件已添加
77个文件已修改
3个文件已删除
| | |
| | | api files('libs/eventbus-2.4.0.jar') |
| | | api files('libs/universal-image-loader-1.9.5.jar') |
| | | implementation 'com.github.bumptech.glide:glide:4.9.0' |
| | | implementation project(path: ':library-gallery') |
| | | annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' |
| | | implementation project(':library-ViewPagerIndicator') |
| | | implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+' |
| | |
| | | android:label="@string/app_name" |
| | | android:theme="@style/fullScreen" |
| | | android:screenOrientation="portrait"> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.MAIN" /> |
| | | |
| | | <category android:name="android.intent.category.LAUNCHER" /> |
| | | |
| | | </intent-filter> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.VIEW" /> |
| | | |
| | |
| | | android:launchMode="singleTask" |
| | | android:screenOrientation="portrait" |
| | | android:theme="@style/AppTabTheme1" |
| | | android:windowSoftInputMode="adjustPan" /> |
| | | android:windowSoftInputMode="adjustPan" > |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.MAIN" /> |
| | | |
| | | <category android:name="android.intent.category.LAUNCHER" /> |
| | | |
| | | </intent-filter> |
| | | |
| | | </activity> |
| | | |
| | | |
| | | <activity android:name=".util.PermissionsActivity" /> |
| | | <activity |
| | | android:name=".ui.category.CategoryActivity" |
| | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | params.put("page", page); |
| | | params.put("type", type); |
| | | if (type != null) |
| | | params.put("type", type); |
| | | commonPost(context, BASE_URL + "user/msg/getMsgList", params, handler); |
| | | } |
| | | |
| | |
| | | if (!StringUtils.isEmpty(source)) |
| | | params.put("source", source); |
| | | commonPostWithFailture(context, BASE_URL2 + "goods/getPDDLink", params, handler); |
| | | } |
| | | |
| | | public static void getPDDAuthInfo(Context context, String uid, boolean buy, |
| | | BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | params.put("type", (buy ? 1 : 2) + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "pdd/getAuthJumpInfo", params, handler); |
| | | } |
| | | |
| | | |
| | |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | params.put("packages", "com.youhuiquan.android"); |
| | | params.put("packages", "com.yeshi.ec.rebate"); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | params.put("packages", "com.youhuiquan.android"); |
| | | params.put("packages", "com.yeshi.ec.rebate"); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = MobileUtil.getSystemModel(); |
| | | params.put("packages", "com.youhuiquan.android"); |
| | | params.put("packages", "com.yeshi.ec.rebate"); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | |
| | | private JSONObject params; |
| | | @Expose |
| | | private JumpDetail jumpDetail; |
| | | //背景颜色 |
| | | @Expose |
| | | private String bgColor; |
| | | |
| | | public String getBgColor() { |
| | | return bgColor; |
| | | } |
| | | |
| | | public void setBgColor(String bgColor) { |
| | | this.bgColor = bgColor; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | |
| | | @Expose |
| | | private String name; |
| | | |
| | | public TrendsCategory(int id, String name) { |
| | | this.id = id; |
| | | this.name = name; |
| | | } |
| | | |
| | | public TrendsCategory() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | |
| | | @Expose |
| | | private String openid; |
| | | @Expose |
| | | private String qqOpenId; |
| | | |
| | | @Expose |
| | | private String qqNickName; |
| | | |
| | | @Expose |
| | | private String wxOpenId; |
| | | @Expose |
| | | private String payPassword; |
| | |
| | | private String erCode;//微信二维码链接 |
| | | |
| | | |
| | | public String getQqOpenId() { |
| | | return qqOpenId; |
| | | } |
| | | |
| | | public void setQqOpenId(String qqOpenId) { |
| | | this.qqOpenId = qqOpenId; |
| | | } |
| | | |
| | | public String getQqNickName() { |
| | | return qqNickName; |
| | | } |
| | | |
| | | public void setQqNickName(String qqNickName) { |
| | | this.qqNickName = qqNickName; |
| | | } |
| | | |
| | | public String getErCode() { |
| | | return erCode; |
| | | } |
New file |
| | |
| | | package com.tejia.lijin.app.entity.common; |
| | | |
| | | /** |
| | | * 拼多多跳转链接 |
| | | */ |
| | | public class GoodsConvertLinkJumpLink { |
| | | private String jumpLink; |
| | | private boolean _native; |
| | | private String nativeJumpLink; |
| | | private WXXCXJumpInfo wxxcxJumpInfo; |
| | | |
| | | public String getJumpLink() { |
| | | return jumpLink; |
| | | } |
| | | |
| | | public void setJumpLink(String jumpLink) { |
| | | this.jumpLink = jumpLink; |
| | | } |
| | | |
| | | |
| | | public boolean is_native() { |
| | | return _native; |
| | | } |
| | | |
| | | public void set_native(boolean _native) { |
| | | this._native = _native; |
| | | } |
| | | |
| | | public String getNativeJumpLink() { |
| | | return nativeJumpLink; |
| | | } |
| | | |
| | | public void setNativeJumpLink(String nativeJumpLink) { |
| | | this.nativeJumpLink = nativeJumpLink; |
| | | } |
| | | |
| | | public WXXCXJumpInfo getWxxcxJumpInfo() { |
| | | return wxxcxJumpInfo; |
| | | } |
| | | |
| | | public void setWxxcxJumpInfo(WXXCXJumpInfo wxxcxJumpInfo) { |
| | | this.wxxcxJumpInfo = wxxcxJumpInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.tejia.lijin.app.entity.common; |
| | | |
| | | public class WXXCXJumpInfo { |
| | | private String userName; |
| | | private String path; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | public String getPath() { |
| | | return path; |
| | | } |
| | | |
| | | public void setPath(String path) { |
| | | this.path = path; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 初始热门搜索化缓存 |
| | | */ |
| | | public void initCacheData(DiskLruCache cache, FlowLayout fl_hot_search, final int id, List<HotSearch> hList) { |
| | | public void initCacheData(DiskLruCache cache, FlowLayout fl_container, final int id, List<HotSearch> hList) { |
| | | //进入缓存 |
| | | if (cache != null) { |
| | | fl_hot_search.removeAllViews(); |
| | | fl_container.removeAllViews(); |
| | | //热门搜索 |
| | | DiskLruCache.Snapshot snapshot = null; |
| | | try { |
| | |
| | | }.getType()); |
| | | for (int i = 0; i < homeTypes.size(); i++) { |
| | | final TextView tv = new TextView(mContext); |
| | | tv.setTextSize(13); |
| | | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT); |
| | | params.setMargins(0, DimenUtils.dip2px(mContext, 8), DimenUtils.dip2px(mContext, 12), 0); |
| | | tv.setLayoutParams(params); |
| | | tv.setLines(1); |
| | | tv.setTextColor(mContext.getResources().getColor(R.color.text_black_1)); |
| | | tv.setTextColor(mContext.getResources().getColor(R.color.search_content_text_color)); |
| | | tv.setEllipsize(TextUtils.TruncateAt.END); |
| | | tv.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.shape_search1)); |
| | | tv.setBackground(mContext.getResources().getDrawable(R.drawable.shape_search_history_item_bg)); |
| | | tv.setPadding(DimenUtils.dip2px(mContext, 20), DimenUtils.dip2px(mContext, 5), DimenUtils.dip2px(mContext, 20), DimenUtils.dip2px(mContext, 5)); |
| | | tv.setText(homeTypes.get(i).getName()); |
| | | tv.setOnClickListener(new View.OnClickListener() { |
| | |
| | | addSearchResultActivity(tv.getText().toString(), id); |
| | | } |
| | | }); |
| | | fl_hot_search.addView(tv); |
| | | fl_container.addView(tv); |
| | | } |
| | | hList.addAll(homeTypes); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public void fillFlowData(List<String> list, FlowLayout fl_container, final ISearchItemClick clickListener) { |
| | | fl_container.removeAllViews(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | final int p = i; |
| | | final TextView tv = new TextView(mContext); |
| | | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT); |
| | | params.setMargins(0, DimenUtils.dip2px(mContext, 8), DimenUtils.dip2px(mContext, 12), 0); |
| | | tv.setLayoutParams(params); |
| | | tv.setTextSize(13); |
| | | tv.setLines(1); |
| | | tv.setTextColor(mContext.getResources().getColor(R.color.search_content_text_color)); |
| | | tv.setEllipsize(TextUtils.TruncateAt.END); |
| | | tv.setBackground(mContext.getResources().getDrawable(R.drawable.shape_search_history_item_bg)); |
| | | tv.setPadding(DimenUtils.dip2px(mContext, 20), DimenUtils.dip2px(mContext, 5), DimenUtils.dip2px(mContext, 20), DimenUtils.dip2px(mContext, 5)); |
| | | tv.setText(list.get(i)); |
| | | tv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (clickListener != null) { |
| | | clickListener.onClick(tv.getText() + "", p); |
| | | } |
| | | } |
| | | }); |
| | | fl_container.addView(tv); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public static void fillFlowData(Context context, List<String> list, FlowLayout fl_container, final ISearchItemClick clickListener) { |
| | | fl_container.removeAllViews(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | final int p = i; |
| | | final TextView tv = new TextView(context); |
| | | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT); |
| | | params.setMargins(0, DimenUtils.dip2px(context, 8), DimenUtils.dip2px(context, 12), 0); |
| | | tv.setLayoutParams(params); |
| | | tv.setTextSize(13); |
| | | tv.setLines(1); |
| | | tv.setTextColor(context.getResources().getColor(R.color.search_content_text_color)); |
| | | tv.setEllipsize(TextUtils.TruncateAt.END); |
| | | tv.setBackground(context.getResources().getDrawable(R.drawable.shape_search_history_item_bg)); |
| | | tv.setPadding(DimenUtils.dip2px(context, 20), DimenUtils.dip2px(context, 5), DimenUtils.dip2px(context, 20), DimenUtils.dip2px(context, 5)); |
| | | tv.setText(list.get(i)); |
| | | tv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (clickListener != null) { |
| | | clickListener.onClick(tv.getText() + "", p); |
| | | } |
| | | } |
| | | }); |
| | | fl_container.addView(tv); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public String getKey(String method) { |
| | | return new Md5FileNameGenerator().generate(method); |
| | | } |
| | |
| | | /** |
| | | * 显示历史记录 |
| | | */ |
| | | public void setHistoricalRecords(int id, List<String> mList, FragmentSearch.HistoryAdapter adapter, |
| | | public void setHistoricalRecords(int id, List<String> mList, |
| | | LinearLayout ll_search_history_hint, LinearLayout ll_guide, RelativeLayout ll_guidevideo |
| | | , String videoPicture) { |
| | | SharedPreferences sp; |
| | |
| | | mList.add(formItem); |
| | | // Log.e("mResult", "onResume();" + mList.get(i)); |
| | | } |
| | | adapter.notifyDataSetChanged(); |
| | | |
| | | if (mList.size() > 0) { |
| | | ll_search_history_hint.setVisibility(View.VISIBLE); |
| | |
| | | .load(uir) |
| | | .into(iv_guide1); |
| | | } |
| | | |
| | | public interface ISearchItemClick { |
| | | |
| | | public void onClick(String text, int position); |
| | | |
| | | } |
| | | } |
| | |
| | | View view = LayoutInflater.from(mContext).inflate(R.layout.item_yellow_notice, parent, false); |
| | | return new ViewHolderNotifyCation(view); |
| | | } else { |
| | | View view = LayoutInflater.from(mContext).inflate(R.layout.item_category, parent, false); |
| | | View view = LayoutInflater.from(mContext).inflate(R.layout.item_goods, parent, false); |
| | | ViewHolder holder = new ViewHolder(view); |
| | | return holder; |
| | | } |
| | |
| | | RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) notify.ll_notice.getLayoutParams(); |
| | | layoutParams.height = DimenUtils.dip2px(mContext, 30); |
| | | layoutParams.topMargin = DimenUtils.dip2px(mContext, 10); |
| | | layoutParams.leftMargin = DimenUtils.dip2px(mContext, 10); |
| | | layoutParams.rightMargin = DimenUtils.dip2px(mContext, 10); |
| | | } |
| | | |
| | | } else if (!isHeaderView(position) && !isFooterView(position)) { |
| | |
| | | } |
| | | |
| | | ViewHolder viewHolder = (ViewHolder) holder; |
| | | viewHolder.ll_recommend_gv.setVisibility(View.GONE); |
| | | viewHolder.ll_item1.setVisibility(View.VISIBLE); |
| | | viewHolder.v_top.setVisibility(View.VISIBLE); |
| | | |
| | | if ((haveHeaderView() && position == 1) || (!haveHeaderView() && position == 0)) { |
| | | viewHolder.v_top.setVisibility(View.VISIBLE); |
| | | } else { |
| | | viewHolder.v_top.setVisibility(View.GONE); |
| | | } |
| | | |
| | | viewHolder.v_top.setVisibility(View.GONE); |
| | | viewHolder.v_top1.setVisibility(View.VISIBLE); |
| | | viewHolder.v_left.setVisibility(View.GONE); |
| | | |
| | | //商品详情填充 |
| | | GoodsDetailListUtil.setGoodsDetail(mContext, info, viewHolder.goodsDetail); |
| | | // 图片 |
| | |
| | | placeholder(R.drawable.ic_goods_default).error(R.drawable.ic_goods_default). |
| | | transform(new GlideRoundTransform(mContext, 5)) |
| | | .diskCacheStrategy(DiskCacheStrategy.ALL) |
| | | .into(viewHolder.iv_pic1); |
| | | .into(viewHolder.iv_pic); |
| | | |
| | | viewHolder.ll_item1.setOnClickListener(new View.OnClickListener() { |
| | | viewHolder.itemView.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | // Intent intent = new Intent(mContext, GoodsDetailBrowerActivity.class); |
| | | if (!StringUtils.isEmpty(type)) |
| | | CategoryCustomEvent.classGoods(mContext, type); |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(mContext, info.getGoodsType()); |
| | |
| | | |
| | | |
| | | class ViewHolder extends RecyclerView.ViewHolder { |
| | | TextView tv_name; |
| | | TextView tv_price; |
| | | TextView tv_coupon_price; |
| | | LinearLayout ll_coupon_bg; |
| | | TextView tv_shop_name; |
| | | LinearLayout ll_coupon; |
| | | LinearLayout ll_shop; |
| | | TextView tv_normal_price; |
| | | LinearLayout ll_recommend_gv; |
| | | TextView tv_favourable;//红包,券后价 |
| | | TextView tv_sale_num; |
| | | ImageView iv_pic; |
| | | View v_top; |
| | | View v_top1; |
| | | View v_left; |
| | | LinearLayout ll_item1; |
| | | ImageView iv_pic1; |
| | | |
| | | GoodsRightViewHolder goodsDetail; |
| | | |
| | | public ViewHolder(View convertView) { |
| | |
| | | */ |
| | | goodsDetail = new GoodsRightViewHolder(convertView); |
| | | iv_pic = convertView |
| | | .findViewById(R.id.iv_movie_cover); |
| | | tv_normal_price = convertView |
| | | .findViewById(R.id.tv_normal_price); |
| | | tv_shop_name = convertView |
| | | .findViewById(R.id.tv_shop_name); |
| | | tv_name = convertView |
| | | .findViewById(R.id.tv_movie_title); |
| | | tv_price = convertView.findViewById(R.id.tv_price); |
| | | ll_coupon_bg = convertView.findViewById(R.id.ll_coupon_bg); |
| | | tv_coupon_price = convertView.findViewById(R.id.tv_coupon_price); |
| | | ll_coupon = convertView.findViewById(R.id.ll_coupon); |
| | | ll_recommend_gv = convertView.findViewById(R.id.ll_recommend_gv); |
| | | tv_favourable = convertView.findViewById(R.id.tv_favourable); |
| | | tv_sale_num = convertView.findViewById(R.id.tv_sale_num); |
| | | ll_shop = convertView.findViewById(R.id.ll_shop); |
| | | /* |
| | | 横屏 |
| | | */ |
| | | v_top = convertView.findViewById(R.id.v_top); |
| | | v_top1 = convertView.findViewById(R.id.v_top1); |
| | | v_left = convertView.findViewById(R.id.v_left); |
| | | ll_item1 = convertView.findViewById(R.id.ll_horizontal_item); |
| | | iv_pic1 = convertView |
| | | .findViewById(R.id.iv_movie_cover1); |
| | | .findViewById(R.id.iv_pic); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.tejia.lijin.app.ui.main; |
| | | |
| | | import android.Manifest; |
| | | import android.annotation.SuppressLint; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.content.SharedPreferences; |
| | | import android.graphics.drawable.AnimationDrawable; |
| | | import android.media.MediaScannerConnection; |
| | | import android.os.Bundle; |
| | | import android.os.Environment; |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | | import android.provider.Settings; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.widget.FrameLayout; |
| | | import android.widget.ImageView; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback; |
| | | import com.androidquery.AQuery; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.callBack.PermissionInterface; |
| | | import com.tejia.lijin.app.entity.HomeBanner; |
| | | import com.tejia.lijin.app.entity.TrendsCategory; |
| | | import com.tejia.lijin.app.entity.common.ImageShowEntity; |
| | | import com.tejia.lijin.app.entity.trends.SendCircleCommment; |
| | | import com.tejia.lijin.app.entity.trends.SendCircleContent; |
| | | import com.tejia.lijin.app.entity.trends.SendCircleImage; |
| | | import com.tejia.lijin.app.ui.dialog.MultiImageDownloadDialog; |
| | | import com.tejia.lijin.app.ui.dialog.SendCircleShareDialog; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.ui.recommend.SearchActivity; |
| | | import com.tejia.lijin.app.ui.trends.BigImageActivity; |
| | | import com.tejia.lijin.app.ui.trends.SendCircleAdapter; |
| | | import com.tejia.lijin.app.util.PermissionHelper; |
| | | import com.tejia.lijin.app.util.baichuan.AlibcTradeUtil; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.wpc.library.util.RefreshLayout; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.ysh.wpc.appupdate.download.DownLoadFile; |
| | | import com.ysh.wpc.appupdate.download.FileUtils; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONArray; |
| | | import org.json.JSONObject; |
| | | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import androidx.annotation.Nullable; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | |
| | | /** |
| | | * 好物 |
| | | */ |
| | | public class BetterGoodsFragment extends RetainViewFragment implements SendCircleAdapter.AdapterEventActionListener, PermissionInterface { |
| | | |
| | | private RefreshLayout srl_better_goods; |
| | | private RecyclerView rv_better_goods; |
| | | private View bottom; |
| | | private TextView tv_loading; |
| | | private ImageView iv_loading; |
| | | private ShapeLoadingDialog pd = null; |
| | | |
| | | |
| | | private List<HomeBanner> mBannerList = new ArrayList<>(); |
| | | private List<SendCircleContent> mContentList = new ArrayList<>(); |
| | | private int page = 1; |
| | | private int count = 0; |
| | | private SendCircleAdapter adapter; |
| | | private boolean isLoad = false; |
| | | private ConnectivityChangeHelper mChangeHelper; |
| | | private boolean haveCache = false; |
| | | private String TYPE = ""; |
| | | private TrendsCategory mCategory; |
| | | private String cId; |
| | | private String cate; |
| | | private PermissionHelper mPermissionsChecker; // 权限检测器 |
| | | |
| | | //上次复制的类型 |
| | | private Map<String, Integer> copyTypeMap = new HashMap<>(); |
| | | |
| | | public static BetterGoodsFragment newInstance(String cate, String cId) { |
| | | BetterGoodsFragment fragment = new BetterGoodsFragment(); |
| | | Bundle bundle = new Bundle(); |
| | | bundle.putString("cid", cId); |
| | | bundle.putString("cate", cate); |
| | | fragment.setArguments(bundle); |
| | | return fragment; |
| | | } |
| | | |
| | | private AQuery mAquery; |
| | | |
| | | |
| | | @Override |
| | | public void onCreate(@Nullable Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getContentResource() { |
| | | return R.layout.fragment_activity; |
| | | } |
| | | |
| | | |
| | | private void init() { |
| | | ((FrameLayout) mAquery.id(R.id.fl_search).getView()).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | mCategory = (TrendsCategory) getArguments().getSerializable("category"); |
| | | cId = getArguments().getString("cid", "0"); |
| | | cate = getArguments().getString("cate"); |
| | | |
| | | if ("7".equalsIgnoreCase(cate)) { |
| | | mAquery.id(R.id.tv_no_data_hint).text("哎呀,发圈内容都被抢光了~"); |
| | | } else if ("8".equalsIgnoreCase(cate)) { |
| | | mAquery.id(R.id.tv_no_data_hint).text("哎呀,素材正在赶来的路上~"); |
| | | } |
| | | mAquery.id(R.id.iv_no_data).getImageView().setImageDrawable(null); |
| | | mAquery.id(R.id.iv_no_data).background(R.drawable.iv_no_send_circle); |
| | | |
| | | |
| | | float hRatio = 260 / 720f; |
| | | float wRatio = 23 / 720f; |
| | | int bottomPo = (int) (DimenUtils.getScreenWidth(getActivity()) * hRatio); |
| | | int rightPo = (int) (DimenUtils.getScreenWidth(getActivity()) * wRatio); |
| | | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(DimenUtils.dip2px(getActivity(), 40), DimenUtils.dip2px(getActivity(), 40)); |
| | | params.setMargins(0, 0, rightPo, bottomPo); |
| | | params.gravity = Gravity.BOTTOM | Gravity.RIGHT; |
| | | mAquery.id(R.id.iv_slid_top).getImageView().setLayoutParams(params); |
| | | mAquery.id(R.id.iv_slid_top).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | rv_better_goods.getLayoutManager().scrollToPosition(0); |
| | | mAquery.id(R.id.iv_slid_top).visibility(View.GONE); |
| | | } |
| | | }); |
| | | |
| | | rv_better_goods.setLayoutManager(new LinearLayoutManager(getContext())); |
| | | DividerItemDecoration decoration = new DividerItemDecoration(); |
| | | decoration.setSize(DimenUtils.dip2px(getContext(), 6)); |
| | | rv_better_goods.addItemDecoration(decoration); |
| | | |
| | | bottom = LayoutInflater.from(getContext()).inflate(R.layout.item_recyclerview_bottom, null); |
| | | pd = new ShapeLoadingDialog.Builder(getContext()).build(); |
| | | bottom.setVisibility(View.GONE); |
| | | tv_loading = bottom.findViewById(R.id.tv_loading); |
| | | iv_loading = bottom.findViewById(R.id.iv_loading); |
| | | AnimationDrawable animationDrawable = (AnimationDrawable) getResources().getDrawable( |
| | | R.drawable.anim_list_loading); |
| | | iv_loading.setImageDrawable(animationDrawable); |
| | | animationDrawable.start(); |
| | | bottom.setVisibility(View.GONE); |
| | | srl_better_goods.setColorSchemeColors(getResources().getColor(R.color.theme)); |
| | | mAquery.id(R.id.tv_net_setting).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | getContext().startActivity(new Intent(Settings.ACTION_SETTINGS)); |
| | | } |
| | | }); |
| | | mAquery.id(R.id.tv_refresh).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View view) { |
| | | getContext().startActivity(new Intent(Settings.ACTION_SETTINGS)); |
| | | } |
| | | }); |
| | | mChangeHelper = new ConnectivityChangeHelper(getContext(), |
| | | new ConnectivityChangeHelper.OnConnectivityChangeListener() { |
| | | |
| | | @Override |
| | | public void onNetworkUnAvailable() { |
| | | if (mContentList.size() == 0 && mBannerList.size() == 0) |
| | | requestState(3); |
| | | } |
| | | |
| | | @Override |
| | | public void onNetworkAvailable() { |
| | | if ((mContentList.size() == 0 && mBannerList.size() == 0) || haveCache) { |
| | | getContentList(); |
| | | } |
| | | } |
| | | }); |
| | | rv_better_goods.addOnScrollListener(new RecyclerView.OnScrollListener() { |
| | | @Override |
| | | public void onScrollStateChanged(RecyclerView recyclerView, int newState) { |
| | | super.onScrollStateChanged(recyclerView, newState); |
| | | LinearLayoutManager manager = (LinearLayoutManager) recyclerView.getLayoutManager(); |
| | | int first = manager.findFirstVisibleItemPosition(); |
| | | int last = manager.findLastVisibleItemPosition(); |
| | | int total = manager.getItemCount(); |
| | | if (newState == RecyclerView.SCROLL_STATE_IDLE) { |
| | | if (first == 0) { |
| | | mAquery.id(R.id.iv_slid_top).visibility(View.GONE); |
| | | } |
| | | if (last == total - 1 && mContentList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | getContentList(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onScrolled(RecyclerView recyclerView, int dx, final int dy) { |
| | | super.onScrolled(recyclerView, dx, dy); |
| | | if (Math.abs(dy) > 10) { |
| | | if (dy > 0) { |
| | | mAquery.id(R.id.iv_slid_top).visibility(View.GONE); |
| | | } else { |
| | | mAquery.id(R.id.iv_slid_top).visibility(View.VISIBLE); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | srl_better_goods.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { |
| | | @Override |
| | | public void onRefresh() { |
| | | page = 1; |
| | | getContentList(); |
| | | } |
| | | }); |
| | | rv_better_goods.setAdapter(adapter); |
| | | srl_better_goods.setRefreshing(true); |
| | | mPermissionsChecker = new PermissionHelper(getActivity(), this); |
| | | |
| | | |
| | | mAquery.id(R.id.fl_search).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(new Intent(getContext(), SearchActivity.class)); |
| | | } |
| | | }); |
| | | |
| | | /**小黄条*/ |
| | | getAppPageNotification(); |
| | | } |
| | | |
| | | private void initView() { |
| | | srl_better_goods = (RefreshLayout) mAquery.id(R.id.srl_activity).getView(); |
| | | rv_better_goods = (RecyclerView) mAquery.id(R.id.rv_activity).getView(); |
| | | } |
| | | |
| | | @Override |
| | | public void onCreateView(View contentView, Bundle savedInstanceState) { |
| | | mAquery = new AQuery(contentView); |
| | | initView(); |
| | | init(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | mChangeHelper.registerReceiver(); |
| | | if (actionCode > 0) { |
| | | switch (actionCode) { |
| | | case ACTION_LOGIN://登录 |
| | | actionCode = ACTION_NONE; |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | if (uid != null && uid > 0) |
| | | resumeAction();//重新走预备流程 |
| | | break; |
| | | case ACTION_TBAUTH: |
| | | actionCode = ACTION_NONE; |
| | | break; |
| | | case ACTION_TBH5AUTH://授权 |
| | | actionCode = ACTION_NONE; |
| | | getTaoBaoH5AuthInfo(new IPrePareSuccessListener() { |
| | | @Override |
| | | public void onSuccess() { |
| | | resumeAction();//重新走预备流程 |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void resumeAction() { |
| | | if (actionParams != null) { |
| | | switch (actionParams.type) { |
| | | case ActionParams.TYPE_COPY_COMMENT: |
| | | copyComment(actionParams.content, actionParams.comment); |
| | | break; |
| | | case ActionParams.TYPE_CREATE_ERCODE: |
| | | createERCode(actionParams.content, actionParams.imgList, actionParams.img, actionParams.position); |
| | | break; |
| | | case ActionParams.TYPE_SAVE_IMAGES: |
| | | saveImgs(actionParams.content); |
| | | break; |
| | | case ActionParams.TYPE_SHARE: |
| | | share(actionParams.content); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | mChangeHelper.unregisterReceiver(); |
| | | } |
| | | |
| | | |
| | | private boolean isCancel = false;//来标识是fragment否退出 |
| | | //这里很重要,使用Handler的延时效果,每隔一秒刷新一下适配器,以此产生倒计时效果 |
| | | @SuppressLint("HandlerLeak") |
| | | private Handler handler_timeCurrent = new Handler() { |
| | | @Override |
| | | public void handleMessage(Message msg) { |
| | | //isCancel,防止界面销毁时,再一次改变UI |
| | | if (isCancel || handler_timeCurrent == null) { |
| | | return; |
| | | } |
| | | if (msg.what == 1001) { |
| | | handler_timeCurrent.sendEmptyMessageDelayed(1001, 1000); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | private void getAppPageNotification() { |
| | | ShoppingApi.getAppPageNotification(rv_better_goods.getContext(), TYPE, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | | boolean isClose = jsonObject.optJSONObject("data").optBoolean("canClose"); |
| | | String content = jsonObject.optJSONObject("data").optString("content"); |
| | | final String contentUrl = jsonObject.optJSONObject("data").optString("contentUrl"); |
| | | final String md5 = jsonObject.optJSONObject("data").optString("md5"); |
| | | |
| | | mAquery.id(R.id.tv_notice_content).visibility(!StringUtils.isEmpty(content) ? View.VISIBLE : View.GONE); |
| | | mAquery.id(R.id.tv_notice_content).text(content); |
| | | final SharedPreferences sp = rv_better_goods.getContext().getSharedPreferences("notice", Context.MODE_PRIVATE); |
| | | if (!sp.getBoolean(md5, false)) {//false 展示,true不展示 |
| | | mAquery.id(R.id.ll_notice).visibility(View.VISIBLE); |
| | | } else { |
| | | mAquery.id(R.id.ll_notice).visibility(View.GONE); |
| | | } |
| | | |
| | | if (isClose) { |
| | | mAquery.id(R.id.iv_close).getImageView().setImageDrawable(getResources().getDrawable(R.drawable.ic_notice_close_red)); |
| | | mAquery.id(R.id.iv_close).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | mAquery.id(R.id.ll_notice).visibility(View.GONE); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.putBoolean(md5, true); |
| | | editor.commit(); |
| | | } |
| | | }); |
| | | } else { |
| | | mAquery.id(R.id.iv_close).getImageView().setImageDrawable(getResources().getDrawable(R.drawable.icon_array_right_red)); |
| | | } |
| | | mAquery.id(R.id.ll_notice).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (StringUtils.isEmpty(contentUrl)) |
| | | return; |
| | | Intent intent = new Intent(rv_better_goods.getContext(), ShareBrowserActivity.class); |
| | | intent.putExtra("url", contentUrl); |
| | | rv_better_goods.getContext().startActivity(intent); |
| | | } |
| | | }); |
| | | } else { |
| | | mAquery.id(R.id.ll_notice).visibility(View.GONE); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { |
| | | super.onFailure(statusCode, headers, responseString, throwable); |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 发圈内容请求 |
| | | */ |
| | | private void getContentList() { |
| | | ShoppingApi.sendCircleContentList(srl_better_goods.getContext(), page, cate, cId + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (page > 1) { |
| | | bottom.setVisibility(View.VISIBLE); |
| | | } else { |
| | | bottom.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | mAquery.id(R.id.ll_request_failture).visibility(View.GONE); |
| | | bottom.setVisibility(View.GONE); |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | haveCache = false; |
| | | Gson gson = new GsonBuilder().serializeNulls().create(); |
| | | if (page == 1) { |
| | | mContentList.clear(); |
| | | |
| | | if (data.optJSONArray("banners") != null) { |
| | | List<HomeBanner> list = gson.fromJson( |
| | | data.optJSONArray("banners").toString(), |
| | | new TypeToken<List<HomeBanner>>() { |
| | | }.getType()); |
| | | mBannerList.clear(); |
| | | mBannerList.addAll(list); |
| | | } |
| | | } |
| | | if (data.optJSONArray("list") != null) { |
| | | List<SendCircleContent> circleContentList = gson.fromJson( |
| | | data.optJSONArray("list").toString(), |
| | | new TypeToken<List<SendCircleContent>>() { |
| | | }.getType()); |
| | | if (circleContentList != null) { |
| | | for (SendCircleContent content : circleContentList) { |
| | | if (content.getImgList() != null) { |
| | | List<SendCircleImage> largeImageList = new ArrayList<>(); |
| | | List<SendCircleImage> smallImageList = new ArrayList<>(); |
| | | for (SendCircleImage image : content.getImgList()) { |
| | | if (image.isLarge()) |
| | | largeImageList.add(image); |
| | | else |
| | | smallImageList.add(image); |
| | | } |
| | | //兼容每行2个图片的情况 |
| | | if (smallImageList.size() > 0 && content.getLineNum() == 2) { |
| | | int smallCount = smallImageList.size(); |
| | | int oldSmallCount = smallCount; |
| | | int line = smallImageList.size() % 2 == 0 ? smallImageList.size() / 2 : smallImageList.size() / 2 + 1; |
| | | for (int i = 0; i < line; i++) { |
| | | if (2 + 3 * i < smallCount) { |
| | | smallImageList.add(2 + 3 * i, null); |
| | | smallCount++; |
| | | } |
| | | } |
| | | if (oldSmallCount % 2 != 0) { |
| | | smallImageList.add(null); |
| | | smallImageList.add(null); |
| | | } |
| | | |
| | | } |
| | | largeImageList.addAll(smallImageList); |
| | | content.setImgList(largeImageList); |
| | | } |
| | | } |
| | | mContentList.addAll(circleContentList); |
| | | } |
| | | } |
| | | if (adapter == null) { |
| | | adapter = new SendCircleAdapter(getActivity(), mBannerList, mContentList, BetterGoodsFragment.this); |
| | | rv_better_goods.setRecycledViewPool(new RecyclerView.RecycledViewPool()); |
| | | rv_better_goods.setAdapter(adapter); |
| | | initLoadingView(); |
| | | } else { |
| | | adapter.notifyDataSetChanged(); |
| | | } |
| | | count = data.optInt("count"); |
| | | |
| | | if (mContentList.size() == count) { |
| | | bottom.setVisibility(View.VISIBLE); |
| | | iv_loading.setVisibility(View.GONE); |
| | | tv_loading.setText(getResources().getString(R.string.list_no_more)); |
| | | } |
| | | requestState((mContentList.size() == 0 && mBannerList.size() == 0) ? 1 : 0); |
| | | } else { |
| | | if (mContentList.size() == 0 && mBannerList.size() == 0) |
| | | requestState(2); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | srl_better_goods.setRefreshing(false); |
| | | isLoad = true; |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { |
| | | super.onFailure(statusCode, headers, responseString, throwable); |
| | | bottom.setVisibility(View.GONE); |
| | | if (NetUtils.getNetworkState(srl_better_goods.getContext()).equalsIgnoreCase(NetUtils.NETWORK_NONE)) { |
| | | requestState(3); |
| | | Toast.makeText(srl_better_goods.getContext(), "网络未连接,请检测网络设置", Toast.LENGTH_SHORT).show(); |
| | | } else { |
| | | requestState(2); |
| | | Toast.makeText(srl_better_goods.getContext(), "网络连接异常,请检测网络设置", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 请求状态 0 数据正常展示;1 返回数据为空;2 网络请求失败;3 没有连接网络 |
| | | * |
| | | * @param state |
| | | */ |
| | | private void requestState(int state) { |
| | | srl_better_goods.setVisibility(state == 0 ? View.VISIBLE : View.GONE); |
| | | rv_better_goods.setVisibility(state == 0 ? View.VISIBLE : View.GONE); |
| | | mAquery.id(R.id.ll_no_data).visibility(state == 1 ? View.VISIBLE : View.GONE); |
| | | mAquery.id(R.id.ll_request_failture).visibility(state == 2 ? View.VISIBLE : View.GONE); |
| | | mAquery.id(R.id.ll_no_net).visibility(state == 3 ? View.VISIBLE : View.GONE); |
| | | } |
| | | |
| | | |
| | | //防止当前Activity结束以后, handler依然继续循环浪费资源 |
| | | @Override |
| | | public void onDestroy() { |
| | | isCancel = true; |
| | | handler_timeCurrent.removeCallbacksAndMessages(null); |
| | | |
| | | //清除分享临时目录 |
| | | String path = Environment.getExternalStorageDirectory() |
| | | + "/rebateshare"; |
| | | File storageDir = new File(path); |
| | | if (storageDir.exists()) { |
| | | FileUtils.deleteDirectory(storageDir); |
| | | } |
| | | super.onDestroy(); |
| | | } |
| | | |
| | | |
| | | private void initLoadingView() { |
| | | bottom = LayoutInflater.from(getContext()).inflate(R.layout.item_recyclerview_bottom, null); |
| | | tv_loading = bottom.findViewById(R.id.tv_loading); |
| | | iv_loading = bottom.findViewById(R.id.iv_loading); |
| | | AnimationDrawable animationDrawable = (AnimationDrawable) getResources().getDrawable( |
| | | R.drawable.anim_list_loading); |
| | | iv_loading.setImageDrawable(animationDrawable); |
| | | animationDrawable.start(); |
| | | // Glide.with(this).load(R.drawable.gif_loading).into(iv_loading); |
| | | bottom.setVisibility(View.GONE); |
| | | adapter.addFooterView(bottom); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void copyComment(final SendCircleContent content, SendCircleCommment comment) { |
| | | actionParams = new ActionParams(content, comment); |
| | | actionParams.type = ActionParams.TYPE_COPY_COMMENT; |
| | | prepareAction(new IPrePareSuccessListener() { |
| | | @Override |
| | | public void onSuccess() { |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | ShoppingApi.evaluateCopyComment(getContext(), uid, actionParams.content.getId(), actionParams.comment.getId(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | | if (!filterResponse(jsonObject)) |
| | | return; |
| | | if (jsonObject.optInt("code") == 0) { |
| | | copyTypeMap.put(content.getId(), 2); |
| | | ClipboardUtil.copy(getContext(), jsonObject.optJSONObject("data").optString("text")); |
| | | Toast.makeText(getContext(), "复制成功", Toast.LENGTH_SHORT).show(); |
| | | } else { |
| | | Toast.makeText(getContext(), jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) { |
| | | super.onFailure(statusCode, headers, jsonObject, e); |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void createERCode(SendCircleContent content, List<SendCircleImage> imgList, SendCircleImage img, final int position) { |
| | | actionParams = new ActionParams(content, imgList, img, position); |
| | | actionParams.type = ActionParams.TYPE_CREATE_ERCODE; |
| | | prepareAction(new IPrePareSuccessListener() { |
| | | @Override |
| | | public void onSuccess() { |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | ShoppingApi.evaluateShare(getContext(), uid, 1, actionParams.content.getId(), actionParams.img.getGoods().getGoodsId(), actionParams.img.getGoods().getGoodsType(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | | if (!filterResponse(jsonObject)) |
| | | return; |
| | | if (jsonObject.optInt("code") == 0) { |
| | | JSONArray list = jsonObject.optJSONObject("data").optJSONArray("list"); |
| | | if (list != null && list.length() > 0) { |
| | | List<ImageShowEntity> imageEntityList = new ArrayList<>(); |
| | | for (int i = 0; i < list.length(); i++) { |
| | | imageEntityList.add(new ImageShowEntity(null, list.optString(i))); |
| | | } |
| | | getContext().startActivity(new Intent(getContext(), BigImageActivity.class).putExtra("imgList", new Gson().toJson(imageEntityList)).putExtra("position", actionParams.position)); |
| | | } |
| | | } else { |
| | | Toast.makeText(getContext(), jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) { |
| | | super.onFailure(statusCode, headers, jsonObject, e); |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void share(Long uid, final String copyText) { |
| | | |
| | | String id = actionParams.content.getId(); |
| | | ShoppingApi.evaluateShare(getContext(), uid, 3, id, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | | if (!filterResponse(jsonObject)) |
| | | return; |
| | | if (jsonObject.optInt("code") == 0) { |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | JSONArray array = data.optJSONArray("list"); |
| | | if (array != null && array.length() > 0) { |
| | | List<String> imgList = new ArrayList<>(); |
| | | for (int i = 0; i < array.length(); i++) { |
| | | imgList.add(array.optString(i)); |
| | | } |
| | | new SendCircleShareDialog.Builder(getActivity()).setCopyText(copyText).setShareImages(imgList).create().show(); |
| | | } |
| | | } else { |
| | | Toast.makeText(getContext(), jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) { |
| | | super.onFailure(statusCode, headers, jsonObject, e); |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void share(final SendCircleContent content) { |
| | | actionParams = new ActionParams(content); |
| | | actionParams.type = ActionParams.TYPE_SHARE; |
| | | if (mPermissionsChecker.lacksPermissions(getPermissions())) { |
| | | actionCode = ACTION_AUTH; |
| | | mPermissionsChecker.showNormalDialog(); |
| | | return; |
| | | } |
| | | prepareAction(new IPrePareSuccessListener() { |
| | | @Override |
| | | public void onSuccess() { |
| | | final Long uid = UserUtil.getUid(getContext()); |
| | | //没有点击复制按钮 |
| | | // if (copyType == null) { |
| | | //复制推荐语 |
| | | share(uid, content.getTitle()); |
| | | // } else { |
| | | // copyTypeMap.remove(content.getId()); |
| | | // share(uid, null); |
| | | // } |
| | | |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private MultiImageDownloadDialog.Builder downloadProgressDialogBuilder; |
| | | |
| | | @Override |
| | | public void saveImgs(SendCircleContent content) { |
| | | actionParams = new ActionParams(content); |
| | | actionParams.type = ActionParams.TYPE_SAVE_IMAGES; |
| | | if (mPermissionsChecker.lacksPermissions(getPermissions())) { |
| | | actionCode = ACTION_AUTH; |
| | | mPermissionsChecker.showNormalDialog(); |
| | | return; |
| | | } |
| | | prepareAction(new IPrePareSuccessListener() { |
| | | @Override |
| | | public void onSuccess() { |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | ShoppingApi.evaluateShare(getContext(), uid, 2, actionParams.content.getId(), null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | | if (!filterResponse(jsonObject)) |
| | | return; |
| | | if (jsonObject.optInt("code") == 0) { |
| | | JSONArray list = jsonObject.optJSONObject("data").optJSONArray("list"); |
| | | if (list.length() > 0) { |
| | | //保存图片 |
| | | String rootPath = android.os.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | File rootFile = new File(rootPath); |
| | | if (!rootFile.exists()) { |
| | | rootFile.mkdirs(); |
| | | } |
| | | List<String> urlList = new ArrayList<>(); |
| | | final List<String> filePathList = new ArrayList<>(); |
| | | for (int i = 0; i < list.length(); i++) { |
| | | urlList.add(list.optString(i)); |
| | | String fileName = rootPath + "/" + System.currentTimeMillis() + "_" + (long) (Math.random() * 10000000000L) + ".jpg"; |
| | | filePathList.add(fileName); |
| | | } |
| | | |
| | | new DownLoadFile().downloadMultiImages(urlList, filePathList, getContext(), new DownLoadFile.FileDownLoadListener() { |
| | | @Override |
| | | public void finish(List<File> fileList) { |
| | | rv_better_goods.post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | String[] strings = new String[filePathList.size()]; |
| | | filePathList.toArray(strings); |
| | | MediaScannerConnection.scanFile(getContext(), strings, null, null); |
| | | Toast.makeText(getContext(), "保存成功", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void process(int count) { |
| | | final int fcount = count; |
| | | rv_better_goods.post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | } else { |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | Toast.makeText(getContext(), jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) { |
| | | super.onFailure(statusCode, headers, jsonObject, e); |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void copyRecommendText(SendCircleContent content) { |
| | | ClipboardUtil.copy(getContext(), content.getTitle()); |
| | | Toast.makeText(getContext(), "复制成功", Toast.LENGTH_SHORT).show(); |
| | | copyTypeMap.put(content.getId(), 1); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void sendOrder(SendCircleContent content) { |
| | | final String id = content.getId(); |
| | | prepareAction(new IPrePareSuccessListener() { |
| | | @Override |
| | | public void onSuccess() { |
| | | //一键发单 |
| | | ShoppingApi.sendCircle(getContext(), UserUtil.getUid(getContext()), id, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | | if (!filterResponse(jsonObject)) |
| | | return; |
| | | if (jsonObject.optInt("code") == 0) { |
| | | Toast.makeText(getContext(), "添加成功", Toast.LENGTH_SHORT).show(); |
| | | } else { |
| | | Toast.makeText(getContext(), jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) { |
| | | super.onFailure(statusCode, headers, jsonObject, e); |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | int actionCode = ACTION_NONE; |
| | | |
| | | private final static int ACTION_NONE = 0;//无事件 |
| | | private final static int ACTION_LOGIN = 1;//登录 |
| | | private final static int ACTION_TBAUTH = 2;//淘宝授权 |
| | | private final static int ACTION_TBH5AUTH = 3;//淘宝H5授权 |
| | | private final static int ACTION_AUTH = 4;//存储权限 |
| | | |
| | | private ActionParams actionParams = null; |
| | | |
| | | private void prepareAction(final IPrePareSuccessListener listener) { |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | if (uid == null || uid == 0L) { |
| | | UserUtil.jumpLogin(getContext()); |
| | | actionCode = ACTION_LOGIN; |
| | | return; |
| | | } |
| | | listener.onSuccess(); |
| | | } |
| | | |
| | | |
| | | private boolean filterResponse(JSONObject root) { |
| | | if (root.optInt("code") == 3) { |
| | | Toast.makeText(getContext(), "请授权淘宝", Toast.LENGTH_SHORT).show(); |
| | | getTaoBaoH5AuthInfo(null); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | private void getTaoBaoH5AuthInfo(final IPrePareSuccessListener listener) { |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | ShoppingApi.getTaoBaoAuthInfo(getContext(), uid + "", null, "share", true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | | final String authLink = jsonObject.optJSONObject("data").getString("authLink"); |
| | | if (!StringUtils.isEmpty(authLink)) { |
| | | if (AlibcLogin.getInstance().isLogin()) { |
| | | bindTBInfo(authLink); |
| | | } else { |
| | | tbLogin(new IPrePareSuccessListener() { |
| | | @Override |
| | | public void onSuccess() { |
| | | bindTBInfo(authLink); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } else if (jsonObject.optInt("code") == 1) { |
| | | if (listener != null) |
| | | listener.onSuccess(); |
| | | } else { |
| | | pd.dismiss(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { |
| | | super.onFailure(statusCode, headers, responseString, throwable); |
| | | Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | private void bindTBInfo(String authLink) { |
| | | if (!StringUtils.isEmpty(authLink)) { |
| | | actionCode = ACTION_TBH5AUTH; |
| | | AlibcTradeUtil.openAuthLink(getActivity(), authLink); |
| | | } |
| | | } |
| | | |
| | | private void tbLogin(final IPrePareSuccessListener listener) { |
| | | actionCode = ACTION_TBAUTH; |
| | | final AlibcLogin alibcLogin = AlibcLogin.getInstance(); |
| | | alibcLogin.showLogin(new AlibcLoginCallback() { |
| | | @Override |
| | | public void onSuccess(int i, String s, String s1) { |
| | | listener.onSuccess(); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int code, String msg) { |
| | | Toast.makeText(getContext(), "淘宝登录失败,请稍候再试", |
| | | Toast.LENGTH_LONG).show(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | class ActionParams { |
| | | public final static int TYPE_COPY_COMMENT = 1;//复制评论 |
| | | public final static int TYPE_CREATE_ERCODE = 2;//生成二维码 |
| | | public final static int TYPE_SHARE = 3;//分享 |
| | | public final static int TYPE_SAVE_IMAGES = 4;//保存图片 |
| | | int type; |
| | | SendCircleContent content; |
| | | SendCircleImage img; |
| | | SendCircleCommment comment; |
| | | List<SendCircleImage> imgList; |
| | | int position; |
| | | |
| | | public ActionParams(SendCircleContent content, SendCircleCommment comment) { |
| | | this.content = content; |
| | | this.comment = comment; |
| | | } |
| | | |
| | | public ActionParams(SendCircleContent content, List<SendCircleImage> imgList, SendCircleImage img, int position) { |
| | | this.content = content; |
| | | this.img = img; |
| | | this.imgList = imgList; |
| | | this.position = position; |
| | | } |
| | | |
| | | public ActionParams(SendCircleContent content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 权限请求码 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int getPermissionsRequestCode() { |
| | | return 1001; |
| | | } |
| | | |
| | | /** |
| | | * 请求权限 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String[] getPermissions() { |
| | | return new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, |
| | | Manifest.permission.WRITE_EXTERNAL_STORAGE}; |
| | | } |
| | | |
| | | /** |
| | | * 权限请求成功 |
| | | */ |
| | | @Override |
| | | public void requestPermissionsSuccess() { |
| | | resumeAction(); |
| | | } |
| | | |
| | | /** |
| | | * 权限请求失败 |
| | | */ |
| | | @Override |
| | | public void requestPermissionsFail() { |
| | | // Toast.makeText(this, "你以拒绝权限", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | |
| | | |
| | | interface IPrePareSuccessListener { |
| | | public void onSuccess(); |
| | | } |
| | | |
New file |
| | |
| | | package com.tejia.lijin.app.ui.main; |
| | | |
| | | import android.annotation.SuppressLint; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.content.SharedPreferences; |
| | | import android.graphics.drawable.AnimationDrawable; |
| | | import android.os.Bundle; |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | | import android.provider.Settings; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.widget.FrameLayout; |
| | | import android.widget.ImageView; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.androidquery.AQuery; |
| | | import com.google.android.material.appbar.AppBarLayout; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.entity.TrendsCategory; |
| | | import com.tejia.lijin.app.entity.TrendsInfo; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.ui.recommend.SearchActivity; |
| | | import com.tejia.lijin.app.ui.trends.SendCircleAdapter; |
| | | import com.tejia.lijin.app.ui.trends.Trends2Adapter; |
| | | import com.tejia.lijin.app.ui.trends.Trends2Fragmet; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.tejia.lijin.app.util.user.LoginAndInviteStatusUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.wpc.library.util.RefreshLayout; |
| | | import com.wpc.library.util.cache.DiskLruCache; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import androidx.annotation.Nullable; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | import androidx.viewpager.widget.ViewPager; |
| | | |
| | | /** |
| | | * 热卖 |
| | | */ |
| | | |
| | | public class HotSalesFragment extends RetainViewFragment { |
| | | private String tag = "main/activity"; |
| | | private AQuery mAquery; |
| | | private RefreshLayout srl_hotsales; |
| | | private RecyclerView rv_hotsales; |
| | | private View bottom; |
| | | private TextView tv_loading; |
| | | private ImageView iv_loading; |
| | | private ConnectivityChangeHelper mChangeHelper; |
| | | |
| | | |
| | | private List<TrendsInfo> mList = new ArrayList<>(); |
| | | private int page = 1; |
| | | private int count = 0; |
| | | private Trends2Adapter adapter; |
| | | private boolean isLoad = false; |
| | | private TrendsCategory mCategory; |
| | | private int cId; |
| | | private String cate; |
| | | private boolean haveCache = false; |
| | | private String TYPE = "activity"; |
| | | private ShapeLoadingDialog pd; |
| | | |
| | | |
| | | public static HotSalesFragment newInstance(int cid, String cate, TrendsCategory category) { |
| | | HotSalesFragment fragment = new HotSalesFragment(); |
| | | Bundle bundle = new Bundle(); |
| | | bundle.putSerializable("category", category); |
| | | bundle.putInt("cid", cid); |
| | | bundle.putString("cate", cate); |
| | | fragment.setArguments(bundle); |
| | | return fragment; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void onCreate(@Nullable Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getContentResource() { |
| | | return R.layout.fragment_activity; |
| | | } |
| | | |
| | | |
| | | private void initView() { |
| | | srl_hotsales = (RefreshLayout) mAquery.id(R.id.srl_activity).getView(); |
| | | rv_hotsales = (RecyclerView) mAquery.id(R.id.rv_activity).getView(); |
| | | } |
| | | |
| | | private void init() { |
| | | ((FrameLayout) mAquery.id(R.id.fl_search).getView()).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | mAquery.id(R.id.tv_no_data_hint).text("哎呀,最近没有什么活动哦~"); |
| | | mAquery.id(R.id.iv_no_data).getImageView().setImageDrawable(null); |
| | | mAquery.id(R.id.iv_no_data).background(R.drawable.iv_no_doings); |
| | | pd = new ShapeLoadingDialog.Builder(getContext()).build(); |
| | | |
| | | float hRatio = 260 / 720f; |
| | | float wRatio = 23 / 720f; |
| | | int bottomPo = (int) (DimenUtils.getScreenWidth(getActivity()) * hRatio); |
| | | int rightPo = (int) (DimenUtils.getScreenWidth(getActivity()) * wRatio); |
| | | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(DimenUtils.dip2px(getActivity(), 40), DimenUtils.dip2px(getActivity(), 40)); |
| | | params.setMargins(0, 0, rightPo, bottomPo); |
| | | params.gravity = Gravity.BOTTOM | Gravity.RIGHT; |
| | | mAquery.id(R.id.iv_slid_top).getImageView().setLayoutParams(params); |
| | | mAquery.id(R.id.iv_slid_top).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | rv_hotsales.getLayoutManager().scrollToPosition(0); |
| | | mAquery.id(R.id.iv_slid_top).visibility(View.GONE); |
| | | } |
| | | }); |
| | | rv_hotsales.setLayoutManager(new LinearLayoutManager(getContext())); |
| | | |
| | | |
| | | mCategory = (TrendsCategory) getArguments().getSerializable("category"); |
| | | cId = getArguments().getInt("cid", 0); |
| | | cate = getArguments().getString("cate"); |
| | | |
| | | adapter = new Trends2Adapter(getActivity(), cate, mList, new SendCircleAdapter.CommentClickListener() { |
| | | @Override |
| | | public void onTagClick(int position) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onCopyClick(int position) { |
| | | if (LoginAndInviteStatusUtil.acessNext(getContext(), "" + UserUtil.getUid(getContext()), true)) { |
| | | //复制 |
| | | ShoppingApi.copySpecialComment(getContext(), UserUtil.getUid(getContext()), mList.get(position).getId(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (pd != null && !pd.isShowing()) |
| | | pd.show(); |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | | if (jsonObject.optInt("code") == 0) { |
| | | String text = jsonObject.optJSONObject("data").optString("text"); |
| | | ClipboardUtil.copy(getContext(), text); |
| | | Toast.makeText(getContext(), "复制成功", Toast.LENGTH_SHORT).show(); |
| | | } else { |
| | | Toast.makeText(getContext(), jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) { |
| | | super.onFailure(statusCode, headers, jsonObject, e); |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (pd != null && pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | rv_hotsales.setAdapter(adapter); |
| | | |
| | | bottom = LayoutInflater.from(getContext()).inflate(R.layout.item_recyclerview_bottom, null); |
| | | adapter.addFooterView(bottom); |
| | | bottom.setVisibility(View.GONE); |
| | | tv_loading = bottom.findViewById(R.id.tv_loading); |
| | | iv_loading = bottom.findViewById(R.id.iv_loading); |
| | | AnimationDrawable animationDrawable = (AnimationDrawable) getResources().getDrawable( |
| | | R.drawable.anim_list_loading); |
| | | iv_loading.setImageDrawable(animationDrawable); |
| | | animationDrawable.start(); |
| | | // Glide.with(this).load(R.drawable.gif_loading).into(iv_loading); |
| | | bottom.setVisibility(View.GONE); |
| | | srl_hotsales.setColorSchemeColors(getResources().getColor(R.color.theme)); |
| | | mAquery.id(R.id.tv_net_setting).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | getContext().startActivity(new Intent(Settings.ACTION_SETTINGS)); |
| | | } |
| | | }); |
| | | mAquery.id(R.id.tv_refresh).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View view) { |
| | | getContext().startActivity(new Intent(Settings.ACTION_SETTINGS)); |
| | | } |
| | | }); |
| | | mChangeHelper = new ConnectivityChangeHelper(getContext(), |
| | | new ConnectivityChangeHelper.OnConnectivityChangeListener() { |
| | | |
| | | @Override |
| | | public void onNetworkUnAvailable() { |
| | | if (mList.size() == 0) |
| | | requestState(3); |
| | | } |
| | | |
| | | @Override |
| | | public void onNetworkAvailable() { |
| | | if (mList.size() == 0 || haveCache) { |
| | | getTrendsList(); |
| | | } |
| | | } |
| | | }); |
| | | rv_hotsales.addOnScrollListener(new RecyclerView.OnScrollListener() { |
| | | @Override |
| | | public void onScrollStateChanged(RecyclerView recyclerView, int newState) { |
| | | super.onScrollStateChanged(recyclerView, newState); |
| | | LinearLayoutManager manager = (LinearLayoutManager) recyclerView.getLayoutManager(); |
| | | int first = manager.findFirstVisibleItemPosition(); |
| | | int last = manager.findLastVisibleItemPosition(); |
| | | int total = manager.getItemCount(); |
| | | if (newState == RecyclerView.SCROLL_STATE_IDLE) { |
| | | if (first == 0) { |
| | | mAquery.id(R.id.iv_slid_top).visibility(View.GONE); |
| | | } |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | getTrendsList(); |
| | | } |
| | | } |
| | | // else { |
| | | // iv_slid_top.setVisibility(View.GONE); |
| | | // } |
| | | } |
| | | |
| | | @Override |
| | | public void onScrolled(RecyclerView recyclerView, int dx, final int dy) { |
| | | super.onScrolled(recyclerView, dx, dy); |
| | | if (Math.abs(dy) > 10) { |
| | | if (dy > 0) { |
| | | mAquery.id(R.id.iv_slid_top).visibility(View.GONE); |
| | | } else { |
| | | mAquery.id(R.id.iv_slid_top).visibility(View.VISIBLE); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | srl_hotsales.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { |
| | | @Override |
| | | public void onRefresh() { |
| | | page = 1; |
| | | getTrendsList(); |
| | | } |
| | | }); |
| | | rv_hotsales.setAdapter(adapter); |
| | | srl_hotsales.setRefreshing(true); |
| | | |
| | | |
| | | mAquery.id(R.id.fl_search).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(new Intent(getContext(), SearchActivity.class)); |
| | | } |
| | | }); |
| | | |
| | | getAppPageNotification(); |
| | | } |
| | | |
| | | |
| | | private boolean isCancel = false;//来标识是fragment否退出 |
| | | //这里很重要,使用Handler的延时效果,每隔一秒刷新一下适配器,以此产生倒计时效果 |
| | | @SuppressLint("HandlerLeak") |
| | | private Handler handler_timeCurrent = new Handler() { |
| | | @Override |
| | | public void handleMessage(Message msg) { |
| | | //isCancel,防止界面销毁时,再一次改变UI |
| | | if (isCancel || handler_timeCurrent == null) { |
| | | return; |
| | | } |
| | | setCountdown();//计算倒计时 |
| | | if (msg.what == 1001) { |
| | | handler_timeCurrent.sendEmptyMessageDelayed(1001, 1000); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 计算倒计时 |
| | | */ |
| | | private void setCountdown() { |
| | | if (mList.size() > 0) { |
| | | for (int i = 0; i < mList.size(); i++) { |
| | | TrendsInfo tr = mList.get(i); |
| | | long time = tr.getCountDownTime(); |
| | | if (time > 0) { |
| | | long days = time / (24 * 60 * 60);//这个时间相差的天数整数,大于1天为前天的时间了,小于24小时则为昨天和今天的时间 |
| | | long hours = (time / (60 * 60) - days * 24);//这个时间相差的减去天数的小时数 |
| | | long min = ((time / (60)) - days * 24 * 60 - hours * 60);// |
| | | // long s = (time - days * 24 * 60 * 60 - hours * 60 * 60 - min * 60); |
| | | mList.get(i).setDays(setTimeSupplement(days)); |
| | | mList.get(i).setHours(setTimeSupplement(hours)); |
| | | mList.get(i).setMin(setTimeSupplement(min)); |
| | | mList.get(i).setCountDownTime((tr.getCountDownTime() - 1L)); |
| | | } else { |
| | | mList.get(i).setDays(setTimeSupplement(0)); |
| | | mList.get(i).setHours(setTimeSupplement(0)); |
| | | mList.get(i).setMin(setTimeSupplement(0)); |
| | | } |
| | | } |
| | | adapter.notifyDataSetChanged(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void onCreateView(View contentView, Bundle savedInstanceState) { |
| | | mAquery = new AQuery(contentView); |
| | | initView(); |
| | | init(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 时间添加0 |
| | | * |
| | | * @param time |
| | | * @return |
| | | */ |
| | | private String setTimeSupplement(long time) { |
| | | String t = ""; |
| | | if (time < 10 && time > 0) { |
| | | t = "0" + time; |
| | | } else if (time == 0 || time >= 10) { |
| | | t = "" + time; |
| | | } |
| | | return t; |
| | | } |
| | | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | mChangeHelper.registerReceiver(); |
| | | // if (adapter != null) |
| | | // adapter.onActivityResume(); |
| | | } |
| | | |
| | | @Override |
| | | public void onPause() { |
| | | super.onPause(); |
| | | mChangeHelper.unregisterReceiver(); |
| | | } |
| | | |
| | | private void getAppPageNotification() { |
| | | ShoppingApi.getAppPageNotification(rv_hotsales.getContext(), TYPE, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | | boolean isClose = jsonObject.optJSONObject("data").optBoolean("canClose"); |
| | | String content = jsonObject.optJSONObject("data").optString("content"); |
| | | final String contentUrl = jsonObject.optJSONObject("data").optString("contentUrl"); |
| | | final String md5 = jsonObject.optJSONObject("data").optString("md5"); |
| | | |
| | | mAquery.id(R.id.tv_notice_content).visibility(!StringUtils.isEmpty(content) ? View.VISIBLE : View.GONE); |
| | | mAquery.id(R.id.tv_notice_content).text(content); |
| | | final SharedPreferences sp = rv_hotsales.getContext().getSharedPreferences("notice", Context.MODE_PRIVATE); |
| | | if (!sp.getBoolean(md5, false)) {//false 展示,true不展示 |
| | | mAquery.id(R.id.ll_notice).visibility(View.VISIBLE); |
| | | } else { |
| | | mAquery.id(R.id.ll_notice).visibility(View.GONE); |
| | | } |
| | | |
| | | if (isClose) { |
| | | mAquery.id(R.id.iv_close).image(R.drawable.ic_notice_close); |
| | | mAquery.id(R.id.iv_close).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | mAquery.id(R.id.ll_notice).visibility(View.GONE); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.putBoolean(md5, true); |
| | | editor.commit(); |
| | | } |
| | | }); |
| | | } else { |
| | | mAquery.id(R.id.iv_close).image(getResources().getDrawable(R.drawable.ic_notice_input)); |
| | | } |
| | | mAquery.id(R.id.ll_notice).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (StringUtils.isEmpty(contentUrl)) |
| | | return; |
| | | Intent intent = new Intent(rv_hotsales.getContext(), ShareBrowserActivity.class); |
| | | intent.putExtra("url", contentUrl); |
| | | rv_hotsales.getContext().startActivity(intent); |
| | | } |
| | | }); |
| | | } else { |
| | | mAquery.id(R.id.ll_notice).visibility(View.GONE); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { |
| | | super.onFailure(statusCode, headers, responseString, throwable); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void onDestroy() { |
| | | super.onDestroy(); |
| | | OkHttpUtils.getInstance().cancelTag(tag); |
| | | } |
| | | |
| | | /** |
| | | * 动态 活动请求 |
| | | */ |
| | | private void getTrendsList() { |
| | | System.out.println("getTrendsList" + page); |
| | | ShoppingApi.getRecommendActivity(srl_hotsales.getContext(), page + "", cId + "", |
| | | mCategory != null ? mCategory.getId() + "" : "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (page > 0) { |
| | | bottom.setVisibility(View.VISIBLE); |
| | | } else { |
| | | bottom.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | mAquery.id(R.id.ll_request_failture).visibility(View.GONE); |
| | | bottom.setVisibility(View.GONE); |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | | haveCache = false; |
| | | Gson gson = new GsonBuilder().serializeNulls().create(); |
| | | List<TrendsInfo> list = gson.fromJson( |
| | | jsonObject.optJSONObject("data").optJSONArray("list").toString(), |
| | | new TypeToken<List<TrendsInfo>>() { |
| | | }.getType()); |
| | | if (page == 1) |
| | | mList.clear(); |
| | | mList.addAll(list); |
| | | adapter.notifyDataSetChanged(); |
| | | setCountdown();//计算倒计时 |
| | | // adapter.notifyItemRangeChanged(mList.size(), mList.size() - list.size() + 1);//倒序批量刷新列表 |
| | | count = Integer.parseInt(jsonObject.optJSONObject("data").optString("count")); |
| | | if (mList.size() == count) { |
| | | bottom.setVisibility(View.VISIBLE); |
| | | iv_loading.setVisibility(View.GONE); |
| | | tv_loading.setText(getResources().getString(R.string.list_no_more)); |
| | | } |
| | | |
| | | |
| | | requestState(mList.size() == 0 ? 1 : 0); |
| | | } else { |
| | | if (mList.size() == 0) |
| | | requestState(2); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | srl_hotsales.setRefreshing(false); |
| | | isLoad = true; |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { |
| | | super.onFailure(statusCode, headers, responseString, throwable); |
| | | bottom.setVisibility(View.GONE); |
| | | if (NetUtils.getNetworkState(srl_hotsales.getContext()).equalsIgnoreCase(NetUtils.NETWORK_NONE)) { |
| | | requestState(3); |
| | | Toast.makeText(srl_hotsales.getContext(), "网络未连接,请检测网络设置", Toast.LENGTH_SHORT).show(); |
| | | } else { |
| | | requestState(2); |
| | | Toast.makeText(srl_hotsales.getContext(), "网络连接异常,请检测网络设置", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 请求状态 0 数据正常展示;1 返回数据为空;2 网络请求失败;3 没有连接网络 |
| | | * |
| | | * @param state |
| | | */ |
| | | private void requestState(int state) { |
| | | srl_hotsales.setVisibility(state == 0 ? View.VISIBLE : View.GONE); |
| | | rv_hotsales.setVisibility(state == 0 ? View.VISIBLE : View.GONE); |
| | | mAquery.id(R.id.ll_no_data).visibility(state == 1 ? View.VISIBLE : View.GONE); |
| | | mAquery.id(R.id.ll_request_failture).visibility(state == 2 ? View.VISIBLE : View.GONE); |
| | | mAquery.id(R.id.ll_no_net).visibility(state == 3 ? View.VISIBLE : View.GONE); |
| | | } |
| | | |
| | | } |
| | |
| | | import android.view.MotionEvent; |
| | | import android.view.View; |
| | | import android.view.ViewTreeObserver; |
| | | import android.view.Window; |
| | | import android.view.WindowManager; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.RadioButton; |
| | | import android.widget.RadioGroup; |
| | | import android.widget.Toast; |
| | |
| | | import com.coloros.mcssdk.PushManager; |
| | | import com.huawei.android.hms.agent.HMSAgent; |
| | | import com.huawei.android.hms.agent.push.handler.GetTokenHandler; |
| | | import com.tejia.lijin.app.entity.TrendsCategory; |
| | | import com.tejia.lijin.app.ui.trends.SendCircleFragmet; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.vivo.push.PushClient; |
| | |
| | | super.onCreate(savedInstanceState); |
| | | getIntentParams(); |
| | | |
| | | findViewById(R.id.v_status_bar).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |
| | | try { |
| | |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | |
| | | setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);// 锁定竖屏 |
| | | setContentView(R.layout.activity_main); |
| | | |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { |
| | | Window window = getWindow(); |
| | | window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); |
| | | window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
| | | | View.SYSTEM_UI_FLAG_LAYOUT_STABLE ); |
| | | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); |
| | | window.setStatusBarColor(Color.TRANSPARENT); |
| | | int result = 0; |
| | | int resourceId = getResources().getIdentifier("status_bar_height", |
| | | "dimen", "android"); |
| | | if (resourceId > 0) { |
| | | result = getResources().getDimensionPixelSize(resourceId); |
| | | } |
| | | //设置状态栏文字颜色及图标为深色 |
| | | // getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, |
| | | result); |
| | | findViewById(R.id.v_status_bar).setLayoutParams(params); |
| | | findViewById(R.id.v_status_bar).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | } else { |
| | | findViewById(R.id.v_status_bar).setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | EventBus.getDefault().register(this); |
| | | sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | mFragmentSwitchHelper = FragmentSwitchHelper.create( |
| | | R.id.fl_main_fragment_container, getSupportFragmentManager(), |
| | | new RecommendTopFragment(), new BrandFragment(), new MessageFragment(), |
| | | new TrendsTopFragment(), new MineFragment()); |
| | | new RecommendTopFragment(), HotSalesFragment.newInstance(5, "全部", new TrendsCategory(0, "")), new MessageFragment(), |
| | | BetterGoodsFragment.newInstance(7 + "", "0"), new MineFragment()); |
| | | |
| | | rg_nav = findViewById(R.id.rg_nav); |
| | | rg_nav.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { |
| | |
| | | case R.id.rb_nav_hot_sale: {//热卖 |
| | | MainCustomEvent.mainActivity(MainActivity.this); |
| | | mFragmentSwitchHelper |
| | | .changeFragment(TrendsTopFragment.class); |
| | | .changeFragment(HotSalesFragment.class); |
| | | } |
| | | break; |
| | | case R.id.rb_nav_record://足迹 |
| | | mFragmentSwitchHelper.changeFragment(BrandFragment.class); |
| | | case R.id.rb_nav_better_goods://好物 |
| | | mFragmentSwitchHelper.changeFragment(BetterGoodsFragment.class); |
| | | break; |
| | | |
| | | case R.id.rb_nav_mine: {//我的 |
| | |
| | | ((RadioButton) findViewById(R.id.rb_nav_hot_sale)).setChecked(true); |
| | | break; |
| | | case 2: |
| | | ((RadioButton) findViewById(R.id.rb_nav_record)).setChecked(true); |
| | | ((RadioButton) findViewById(R.id.rb_nav_better_goods)).setChecked(true); |
| | | break; |
| | | case 3: |
| | | ((RadioButton) findViewById(R.id.rb_nav_mine)).setChecked(true); |
| | |
| | | import android.graphics.Color; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.viewpager.widget.PagerAdapter; |
| | | import androidx.viewpager.widget.ViewPager; |
| | | import androidx.appcompat.widget.LinearLayoutCompat; |
| | | |
| | | import android.text.Spannable; |
| | | import android.text.SpannableString; |
| | | import android.text.Spanned; |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.CircleBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.message.UserMessageActivity; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.viewpagerindicator.CirclePageIndicator; |
| | | import com.wpc.library.RetainViewFragment; |
| | |
| | | */ |
| | | |
| | | public class MineFragment extends RetainViewFragment implements View.OnClickListener, PermissionInterface { |
| | | private TextView tv_user_num, |
| | | tv_share_reward_hint, tv_fanli_reward_hint; |
| | | private TextView tv_user_num; |
| | | private ImageView iv_portrait; |
| | | private TextView tv_nickName, tv_mine_login; |
| | | private TextView tv_nickName; |
| | | |
| | | //用户昵称与邀请码 |
| | | private LinearLayout ll_nick_name_vip; |
| | | |
| | | private TextView tv_balance; |
| | | private FrameLayout fl_reward_today, fl_reward_yestoday, fl_reward_current_month, fl_reward_last_month; |
| | | private ImageView fl_reward_today_ic, fl_reward_yestoday_ic, fl_reward_current_month_ic, fl_reward_last_month_ic; |
| | | private TextView tv_reward_today, tv_reward_yestoday, tv_reward_current_month, tv_reward_last_month; |
| | | private TextView tv_share_estimate_reward, tv_fanli_reward; |
| | | |
| | | private LinearLayout ll_count; |
| | | private RelativeLayout ll_title_face; |
| | | private LinearLayout ll_title; |
| | | private ScListerScrollView sv_mine; |
| | | private DisplayImageOptions options; |
| | | |
| | | private LinearLayoutCompat tv_user_numlayout;//开启通知 |
| | |
| | | private CirclePageIndicator indicator_category; |
| | | private ImageView vp_close; |
| | | |
| | | //会员升级提醒 |
| | | private ImageView iv_icon; |
| | | private TextView tv_vip_upgrade_content, tv_vip_upgrade; |
| | | LinearLayout ll_top; |
| | | View view_mine_end_bg; |
| | | |
| | | FrameLayout fl_msg; |
| | | TextView tv_msg_count; |
| | | |
| | | //专属邀请码申请 |
| | | private LinearLayout ll_special_invitecode_apply; |
| | | |
| | | //云发单 |
| | | private LinearLayout ll_send_order; |
| | | |
| | | String tag1 = "help/getAppPageNotification"; |
| | | String tag2 = "integral/getTaskList"; |
| | |
| | | .considerExifParams(true) |
| | | .displayer(new CircleBitmapDisplayer(300)) |
| | | .build(); |
| | | |
| | | fl_msg = contentView.findViewById(R.id.fl_msg); |
| | | tv_msg_count = contentView.findViewById(R.id.tv_msg_count); |
| | | |
| | | |
| | | tv_user_num = contentView.findViewById(R.id.tv_user_num); |
| | | iv_portrait = contentView.findViewById(R.id.iv_portrait); |
| | | tv_nickName = contentView.findViewById(R.id.tv_nickname); |
| | | tv_mine_login = contentView.findViewById(R.id.tv_mine_login); |
| | | |
| | | ll_count = contentView.findViewById(R.id.ll_count); |
| | | tv_balance = contentView.findViewById(R.id.tv_balance); |
| | | ll_title_face = contentView.findViewById(R.id.ll_title_face); |
| | | ll_title = contentView.findViewById(R.id.ll_title); |
| | | ll_title_face.setVisibility(View.INVISIBLE); |
| | | ll_title.setVisibility(View.VISIBLE); |
| | | sv_mine = contentView.findViewById(R.id.sv_mine); |
| | | tv_notice_content = contentView.findViewById(R.id.tv_notice_content); |
| | | ll_notice = contentView.findViewById(R.id.ll_notice); |
| | | iv_close = contentView.findViewById(R.id.iv_close); |
| | | fl_reward_today = contentView.findViewById(R.id.fl_reward_today); |
| | | fl_reward_yestoday = contentView.findViewById(R.id.fl_reward_yestoday); |
| | | fl_reward_current_month = contentView.findViewById(R.id.fl_reward_current_month); |
| | | fl_reward_last_month = contentView.findViewById(R.id.fl_reward_last_month); |
| | | fl_reward_today_ic = contentView.findViewById(R.id.fl_reward_today_ic); |
| | | fl_reward_yestoday_ic = contentView.findViewById(R.id.fl_reward_yestoday_ic); |
| | | fl_reward_current_month_ic = contentView.findViewById(R.id.fl_reward_current_month_ic); |
| | | fl_reward_last_month_ic = contentView.findViewById(R.id.fl_reward_last_month_ic); |
| | | tv_reward_today = contentView.findViewById(R.id.tv_reward_today); |
| | | tv_reward_yestoday = contentView.findViewById(R.id.tv_reward_yestoday); |
| | | tv_reward_current_month = contentView.findViewById(R.id.tv_reward_current_month); |
| | | tv_reward_last_month = contentView.findViewById(R.id.tv_reward_last_month); |
| | | tv_share_estimate_reward = contentView.findViewById(R.id.tv_share_estimate_reward); |
| | | ll_top = contentView.findViewById(R.id.ll_top); |
| | | view_mine_end_bg = contentView.findViewById(R.id.view_mine_end_bg); |
| | | |
| | | |
| | | tv_fanli_reward = contentView.findViewById(R.id.tv_fanli_reward); |
| | | |
| | | tv_share_reward_hint = contentView.findViewById(R.id.tv_share_reward_hint); |
| | | tv_fanli_reward_hint = contentView.findViewById(R.id.tv_fanli_reward_hint); |
| | | ll_top.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | view_mine_end_bg.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | |
| | | |
| | | tv_user_numlayout = contentView.findViewById(R.id.tv_user_numlayout); |
| | |
| | | vp_close = contentView.findViewById(R.id.vp_close); |
| | | ll_nick_name_vip = contentView.findViewById(R.id.ll_nick_name_vip); |
| | | |
| | | iv_icon = contentView.findViewById(R.id.iv_icon); |
| | | tv_vip_upgrade_content = contentView.findViewById(R.id.tv_vip_upgrade_content); |
| | | tv_vip_upgrade = contentView.findViewById(R.id.tv_vip_upgrade); |
| | | |
| | | |
| | | ll_special_invitecode_apply = contentView.findViewById(R.id.ll_special_invitecode_apply); |
| | | |
| | | ll_send_order = contentView.findViewById(R.id.ll_send_order); |
| | | |
| | | getAppPageNotification(); |
| | | |
| | |
| | | |
| | | private List<Functions> getFunctions() { |
| | | List<Functions> list = new ArrayList<>(); |
| | | list.add(new Functions("订单", R.drawable.icon_mine_order, "jumpOrder")); |
| | | list.add(new Functions("找回订单", R.drawable.icon_mine_find_order, "jumpFindOrder")); |
| | | list.add(new Functions("收藏", R.drawable.icon_mine_collect, "jumpCollect")); |
| | | list.add(new Functions("足迹", R.drawable.icon_mine_footmark, "jumpFootMark")); |
| | | list.add(new Functions("转链", R.drawable.icon_mine_convert_link, "jumpConvertLink")); |
| | | list.add(new Functions("规范", R.drawable.icon_mine_rule, "jumpPlatformRule")); |
| | | list.add(new Functions("帮助中心", R.drawable.icon_mine_help, "jumpHelp")); |
| | | list.add(new Functions("客服", R.drawable.icon_mine_kefu, "jumpKeFu")); |
| | | list.add(new Functions("设置", R.drawable.icon_mine_settings, "jumpSettings")); |
| | | return list; |
| | |
| | | |
| | | private LinearLayout ll_balance;//余额布局 |
| | | |
| | | private LinearLayout ll_share_reward; |
| | | private LinearLayout ll_fanli; |
| | | |
| | | private void listener(View contentView) { |
| | | ll_balance = contentView.findViewById(R.id.ll_balance); |
| | | ll_balance.setOnClickListener(this); |
| | | contentView.findViewById(R.id.ll_share_history).setOnClickListener(this); |
| | | contentView.findViewById(R.id.ll_order).setOnClickListener(this); |
| | | contentView.findViewById(R.id.ll_find_order).setOnClickListener(this); |
| | | contentView.findViewById(R.id.ll_send_order).setOnClickListener(this); |
| | | |
| | | tv_nickName.setOnClickListener(this); |
| | | tv_mine_login.setOnClickListener(this); |
| | | ll_share_reward = contentView.findViewById(R.id.ll_share_reward); |
| | | ll_fanli = contentView.findViewById(R.id.ll_fanli); |
| | | |
| | | |
| | | ll_share_reward.setOnClickListener(this); |
| | | ll_fanli.setOnClickListener(this); |
| | | |
| | | |
| | | iv_portrait.setOnClickListener(this); |
| | | fl_reward_today.setOnClickListener(this); |
| | | fl_reward_yestoday.setOnClickListener(this); |
| | | fl_reward_current_month.setOnClickListener(this); |
| | | fl_reward_last_month.setOnClickListener(this); |
| | | |
| | | tv_user_num.setOnClickListener(this); |
| | | vp_close.setOnClickListener(this);//关闭热门广告 |
| | | ll_special_invitecode_apply.setOnClickListener(this); |
| | | sv_mine.setOnScollChangedListener(new ScListerScrollView.OnScollChangedListener() { |
| | | @Override |
| | | public void onScrollChanged(ScListerScrollView scrollView, int x, int y, int oldx, int oldy) { |
| | | if (y > 0 && y < DimenUtils.dip2px(tv_nickName.getContext(), 40)) { |
| | | if (oldy > y) { |
| | | ll_title.setVisibility(View.VISIBLE); |
| | | } else { |
| | | ll_title.setVisibility(View.INVISIBLE); |
| | | } |
| | | ll_title_face.setVisibility(View.VISIBLE); |
| | | float alpha = (y + 0.0f) / DimenUtils.dip2px(tv_nickName.getContext(), 40); |
| | | // Log.e("mResult", "" + y + "---" + oldy); |
| | | ll_title_face.setAlpha(alpha); |
| | | } else { |
| | | ll_title_face.setAlpha(1); |
| | | if (y == 0) { |
| | | ll_title.setVisibility(View.VISIBLE); |
| | | ll_title_face.setVisibility(View.INVISIBLE); |
| | | } else { |
| | | ll_title.setVisibility(View.INVISIBLE); |
| | | ll_title_face.setVisibility(View.VISIBLE); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | fl_msg.setOnClickListener(this); |
| | | } |
| | | |
| | | @Override |
| | | public void onResume() { |
| | | super.onResume(); |
| | | getUserConfig(); |
| | | getUnReadMsgCount(UserUtil.getUid(getContext()) + ""); |
| | | MobclickAgent.onPageStart("我的"); |
| | | SharedPreferences sp = tv_nickName.getContext().getSharedPreferences("user", MODE_PRIVATE); |
| | | if (sp.getBoolean("isLogin", false)) { |
| | |
| | | tv_user_num.setVisibility(View.VISIBLE); |
| | | ll_nick_name_vip.setVisibility(View.VISIBLE); |
| | | tv_nickName.setVisibility(View.VISIBLE); |
| | | tv_mine_login.setVisibility(View.GONE); |
| | | String uid = sp.getString("uid", "0"); |
| | | if (lastTime > 0 && (System.currentTimeMillis() - lastTime > 30 * 1000)) { |
| | | clickState = 0; |
| | |
| | | } |
| | | } |
| | | String rewardInfo = sp.getString("estimatereward", ""); |
| | | if (!StringUtils.isEmpty(rewardInfo)) { |
| | | try { |
| | | JSONObject jsonObject = new JSONObject(rewardInfo); |
| | | showRewardInfo(jsonObject); |
| | | } catch (JSONException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | getUserInfo(uid); |
| | | } |
| | | } else { |
| | |
| | | } |
| | | ImageLoader.getInstance().displayImage(info.getPortrait(), iv_portrait, options); |
| | | tv_nickName.setText(info.getNickName()); |
| | | |
| | | |
| | | String balance = "¥ " + info.getMyHongBao(); |
| | | Spannable span = new SpannableString(balance); |
| | | span.setSpan(new RelativeSizeSpan(1.5f), 1, balance.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | tv_balance.setText(span); |
| | | String balance = info.getMyHongBao(); |
| | | tv_balance.setText(balance); |
| | | tv_user_num.setText("ID:" + info.getId()); |
| | | } |
| | | |
| | | /** |
| | | * 展示奖金信息 |
| | | */ |
| | | private void showRewardInfo(JSONObject jsonObject) { |
| | | |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | final MineRewardStatistic statistic = new Gson().fromJson(data.toString(), MineRewardStatistic.class); |
| | | |
| | | tv_share_estimate_reward.setText("¥ " + statistic.getShareMoney()); |
| | | tv_fanli_reward.setText("¥ " + statistic.getSelfMoney()); |
| | | } |
| | | |
| | | private void clearRewardInfo() { |
| | | tv_share_estimate_reward.setText("¥ 0.00"); |
| | | tv_fanli_reward.setText("¥ 0.00"); |
| | | } |
| | | |
| | | private void noLogin() { |
| | | tv_user_numlayout.setVisibility(View.GONE); |
| | | tv_user_num.setVisibility(View.GONE); |
| | | ll_nick_name_vip.setVisibility(View.GONE); |
| | | tv_nickName.setVisibility(View.GONE); |
| | | tv_mine_login.setVisibility(View.VISIBLE); |
| | | tv_mine_login.setText("登录"); |
| | | ll_nick_name_vip.setVisibility(View.VISIBLE); |
| | | tv_nickName.setVisibility(View.VISIBLE); |
| | | tv_nickName.setText("点击登录"); |
| | | tv_user_num.setText(""); |
| | | // tv_mine_invite.setText("邀请激活"); |
| | | String balance = "¥ 0.00"; |
| | | Spannable span = new SpannableString(balance); |
| | | span.setSpan(new RelativeSizeSpan(1.5f), 2, balance.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | tv_balance.setText(span); |
| | | String balance = "0.00"; |
| | | tv_balance.setText(balance); |
| | | ImageLoader.getInstance().displayImage("drawable://" + R.drawable.ic_mine_default_portrait, iv_portrait, options); |
| | | ll_special_invitecode_apply.setVisibility(View.GONE); |
| | | clearRewardInfo(); |
| | | fl_msg.setVisibility(View.INVISIBLE); |
| | | } |
| | | |
| | | /***小黄条*/ |
| | |
| | | |
| | | private int rewardState = 1; |
| | | |
| | | private String getRewardStateDesc(int state) { |
| | | switch (state) { |
| | | case 1: |
| | | return "今日预估"; |
| | | case 2: |
| | | return "昨日预估"; |
| | | case 3: |
| | | return "本月预估"; |
| | | case 4: |
| | | return "上月"; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | private void initMoneyStatisticName() { |
| | | tv_share_reward_hint.setText("佣金"); |
| | | tv_fanli_reward_hint.setText("返利"); |
| | | } |
| | | |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | case R.id.tv_user_num: |
| | | break; |
| | | |
| | | case R.id.fl_msg: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | startActivity(new Intent(getContext(), UserMessageActivity.class)); |
| | | break; |
| | | |
| | | case R.id.tv_nickname: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | if (!isLogin) {//登录淘宝 |
| | | // loginHint(); |
| | | UserUtil.jumpLogin(tv_nickName.getContext()); |
| | | } else { |
| | | startActivity(new Intent(tv_nickName.getContext(), MyInfoActivity.class)); |
| | | } |
| | | break; |
| | | case R.id.tv_mine_login: |
| | | |
| | | if (!isLogin) {//登录淘宝 |
| | | UserUtil.jumpLogin(tv_nickName.getContext()); |
| | | } else { |
| | |
| | | return; |
| | | UserCustomEvent.userMyInfo(ll_notice.getContext()); |
| | | if (!isLogin) {//登录 |
| | | // loginHint(); |
| | | clickState = 10; |
| | | UserUtil.jumpLogin(tv_nickName.getContext()); |
| | | } else { |
| | | startActivity(new Intent(tv_nickName.getContext(), MyInfoActivity.class)); |
| | | } |
| | | break; |
| | | |
| | | case R.id.ll_order://订单 |
| | | mineFunctionsManager.jumpOrder(); |
| | | break; |
| | | //账户余额 |
| | | case R.id.ll_balance: |
| | |
| | | break; |
| | | |
| | | |
| | | case R.id.fl_reward_today://今日奖金 |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | rewardState = 1; |
| | | initMoneyStatisticName(); |
| | | |
| | | showRewardStatisticsView(); |
| | | getRewardInfo(); |
| | | break; |
| | | case R.id.fl_reward_yestoday://昨日奖金 |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | rewardState = 2; |
| | | initMoneyStatisticName(); |
| | | showRewardStatisticsView(); |
| | | getRewardInfo(); |
| | | break; |
| | | case R.id.fl_reward_current_month://当月奖金 |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | rewardState = 3; |
| | | initMoneyStatisticName(); |
| | | showRewardStatisticsView(); |
| | | getRewardInfo(); |
| | | break; |
| | | case R.id.fl_reward_last_month://上月奖金 |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | rewardState = 4; |
| | | initMoneyStatisticName(); |
| | | showRewardStatisticsView(); |
| | | getRewardInfo(); |
| | | break; |
| | | //分享记录 |
| | | case R.id.ll_share_history: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | UserCustomEvent.userShareHistory(ll_count.getContext()); |
| | | if (isLogin) { |
| | | Intent intent8 = new Intent(tv_nickName.getContext(), ShareHistoryActivity31.class); |
| | | startActivity(intent8); |
| | | } else { |
| | | clickState = 12; |
| | | |
| | | } |
| | | break; |
| | | |
| | | |
| | | case R.id.iv_vip: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | //跳转到vip |
| | | if (userInviteLevel != null && !StringUtils.isEmpty(userInviteLevel.getLink())) |
| | | startActivity(new Intent(getContext(), ShareBrowserActivity.class).putExtra("url", userInviteLevel.getLink())); |
| | | break; |
| | | |
| | | case R.id.ll_special_invitecode_apply://专属邀请码申请入口 |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | startActivity(new Intent(getContext(), ShareBrowserActivity.class).putExtra("url", SystemParamsUtil.getParam(getContext(), "invite_code_apply"))); |
| | | break; |
| | | |
| | | case R.id.ll_fanli: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | if (isLogin) { |
| | | Intent intent115 = new Intent(tv_nickName.getContext(), RewardStatisticsOrderActivity33.class); |
| | | intent115.putExtra("type", 1 + ""); |
| | | intent115.putExtra("title", getRewardStateDesc(rewardState) + "自购返利"); |
| | | |
| | | intent115.putExtra("needCount", true); |
| | | intent115.putExtra("dateType", rewardState); |
| | | startActivity(intent115); |
| | | } else { |
| | | UserUtil.jumpLogin(tv_nickName.getContext()); |
| | | Toast.makeText(tv_nickName.getContext(), String.format("请先登录%s账号", getResources().getString(R.string.app_name)), Toast.LENGTH_LONG).show(); |
| | | } |
| | | break; |
| | | |
| | | case R.id.ll_share_reward: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | return; |
| | | if (isLogin) { |
| | | Intent intent5 = new Intent(tv_nickName.getContext(), RewardStatisticsOrderActivity33.class); |
| | | intent5.putExtra("type", 2 + ""); |
| | | intent5.putExtra("title", getRewardStateDesc(rewardState) + "分享奖金"); |
| | | intent5.putExtra("needCount", true); |
| | | intent5.putExtra("dateType", rewardState); |
| | | startActivity(intent5); |
| | | } else { |
| | | clickState = 13; |
| | | UserUtil.jumpLogin(tv_nickName.getContext()); |
| | | } |
| | | break; |
| | | case R.id.ll_find_order: |
| | | mineFunctionsManager.jumpFindOrder(); |
| | | break; |
| | | case R.id.ll_send_order: |
| | | mineFunctionsManager.jumpCloud(); |
| | | break; |
| | | |
| | | default: |
| | |
| | | if (clickState == 1) { |
| | | if (!StringUtils.isEmpty(trolleyType) && trolleyType.equalsIgnoreCase("baichuan")) { |
| | | if (Tools.isTaobaoAvilible(ll_notice.getContext()) == 0) { |
| | | // startActivity(new Intent(ll_novice.getContext(), ShoppingTrolleyActivity.class)); |
| | | AlibcShowParams alibcShowParams = new AlibcShowParams(); |
| | | alibcShowParams.setOpenType(OpenType.Native); |
| | | Map<String, String> exParams = new HashMap<>(); |
| | |
| | | exParams.put("alibaba", "阿里巴巴");//自定义参数部分,可任意增删改 |
| | | |
| | | AlibcBasePage alibcBasePage = new AlibcMyCartsPage(); |
| | | // AlibcTrade.show(getActivity(), alibcBasePage, alibcShowParams, null, null, new MiDuoTradeCallback("")); |
| | | jumpNoLink(alibcBasePage, alibcShowParams); |
| | | } else { |
| | | Toast.makeText(tv_nickName.getContext(), "未安装淘宝App,该功能无法使用", Toast.LENGTH_LONG).show(); |
| | |
| | | private Long bindPhonetime = 0L; |
| | | private Dialog dialog; |
| | | private int redPackLock = 0;//1: 红包功能关闭 0:开启 |
| | | private boolean applySpecialInviteCode;//是否可以申请专属邀请码 |
| | | private UserInviteLevel userInviteLevel;//用户邀请等级 |
| | | |
| | | /****用户信息*/ |
| | |
| | | moduleState = data.optJSONObject("moduleState"); |
| | | if (mineFunctionsManager != null) |
| | | mineFunctionsManager.setModuleState(moduleState); |
| | | applySpecialInviteCode = data.optBoolean("tailor"); |
| | | //专属邀请码是否显示 |
| | | if (applySpecialInviteCode) { |
| | | ll_special_invitecode_apply.setVisibility(View.VISIBLE); |
| | | } else |
| | | ll_special_invitecode_apply.setVisibility(View.GONE); |
| | | |
| | | |
| | | ll_count.setVisibility(View.VISIBLE); |
| | | |
| | | |
| | | redPackLock = data.optInt("redPackLock");// 红包功能关闭开启 |
| | | Gson gson = new GsonBuilder().serializeNulls().create(); |
| | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | getRewardInfo(); |
| | | // getUserConfig();//获取邀请链接 |
| | | if (clickState == 1) { |
| | | if (!AlibcLogin.getInstance().isLogin()) { |
| | | tbLogin(); |
| | |
| | | clickState = 0; |
| | | if (!StringUtils.isEmpty(trolleyType) && trolleyType.equalsIgnoreCase("baichuan")) { |
| | | if (Tools.isTaobaoAvilible(ll_notice.getContext()) == 0) { |
| | | // Log.e("mResult", "onFinish---淘宝已登录"); |
| | | // startActivity(new Intent(ll_novice.getContext(), ShoppingTrolleyActivity.class)); |
| | | AlibcShowParams alibcShowParams = new AlibcShowParams(); |
| | | alibcShowParams.setOpenType(OpenType.Native); |
| | | Map<String, String> exParams = new HashMap<>(); |
| | |
| | | exParams.put("alibaba", "阿里巴巴");//自定义参数部分,可任意增删改 |
| | | |
| | | AlibcBasePage alibcBasePage = new AlibcMyCartsPage(); |
| | | // AlibcTrade.show(getActivity(), alibcBasePage, alibcShowParams, null, null, new MiDuoTradeCallback("")); |
| | | jumpNoLink(alibcBasePage, alibcShowParams); |
| | | } else { |
| | | Toast.makeText(tv_nickName.getContext(), "未安装淘宝App,该功能无法使用", Toast.LENGTH_LONG).show(); |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 获取奖金信息 |
| | | */ |
| | | private void getRewardInfo() { |
| | | String uid = tv_balance.getContext().getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getRewardStatistics(tv_balance.getContext(), uid, rewardState + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | | // tv_share_reward_num.setText(jsonObject.optJSONObject("data").optString("shareCount")); |
| | | showRewardInfo(jsonObject); |
| | | if (rewardState == 1) { |
| | | SharedPreferences sp = tv_mine_login.getContext().getSharedPreferences("user", MODE_PRIVATE); |
| | | sp.edit().putString("estimatereward", jsonObject.toString()).apply(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { |
| | | super.onFailure(statusCode, headers, responseString, throwable); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void onActivityResult(int requestCode, int resultCode, Intent data) { |
| | |
| | | mineFunctionsManager.setConvertLink(convertLinkUrl); |
| | | mineFunctionsManager.setCloudUrl(cloudSendOrderLink); |
| | | mineFunctionsManager.setpPlateformRule(platformRuleLink); |
| | | } |
| | | |
| | | if (StringUtils.isBlank(cloudSendOrderLink)) { |
| | | ll_send_order.setVisibility(View.GONE); |
| | | } else { |
| | | ll_send_order.setVisibility(View.VISIBLE); |
| | | } |
| | | |
| | | trolleyType = taoBaoCartInfo.getJumpDetail().getType(); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | }); |
| | |
| | | |
| | | private void closeDialogNotify(String id, int type) { |
| | | ShoppingApi.closeDialogNotify(getContext(), UserUtil.getUid(getContext()), id, null, type, null); |
| | | } |
| | | |
| | | /** |
| | | * 奖金选择时间变化对应View的状态变化 |
| | | * state==1 今日奖金 2昨日奖金 3本月奖金 4上月奖金 |
| | | */ |
| | | private void showRewardStatisticsView() { |
| | | fl_reward_today.setBackground(rewardState == 1 ? getResources().getDrawable(R.drawable.shape_mine_share_top) |
| | | : null); |
| | | tv_reward_today.setTextColor(rewardState == 1 ? getResources().getColor(R.color.white) : |
| | | getResources().getColor(R.color.theme)); |
| | | fl_reward_today_ic.setVisibility(rewardState == 1 ? View.VISIBLE : View.INVISIBLE);//小箭头 |
| | | // tv_reward_today.setTextSize(TypedValue.COMPLEX_UNIT_SP, rewardState == 1 ? 17 : 15); |
| | | |
| | | fl_reward_yestoday.setBackground(rewardState == 2 ? getResources().getDrawable(R.drawable.shape_mine_share_top) |
| | | : null); |
| | | tv_reward_yestoday.setTextColor(rewardState == 2 ? getResources().getColor(R.color.white) : |
| | | getResources().getColor(R.color.theme)); |
| | | fl_reward_yestoday_ic.setVisibility(rewardState == 2 ? View.VISIBLE : View.INVISIBLE);//小箭头 |
| | | // tv_reward_yestoday.setTextSize(TypedValue.COMPLEX_UNIT_SP, rewardState == 2 ? 17 : 15); |
| | | |
| | | fl_reward_current_month.setBackground(rewardState == 3 ? getResources().getDrawable(R.drawable.shape_mine_share_top) |
| | | : null); |
| | | tv_reward_current_month.setTextColor(rewardState == 3 ? getResources().getColor(R.color.white) : |
| | | getResources().getColor(R.color.theme)); |
| | | fl_reward_current_month_ic.setVisibility(rewardState == 3 ? View.VISIBLE : View.INVISIBLE);//小箭头 |
| | | // tv_reward_current_month.setTextSize(TypedValue.COMPLEX_UNIT_SP, rewardState == 3 ? 17 : 15); |
| | | |
| | | fl_reward_last_month.setBackground(rewardState == 4 ? getResources().getDrawable(R.drawable.shape_mine_share_top) |
| | | : null); |
| | | tv_reward_last_month.setTextColor(rewardState == 4 ? getResources().getColor(R.color.white) : |
| | | getResources().getColor(R.color.theme)); |
| | | fl_reward_last_month_ic.setVisibility(rewardState == 4 ? View.VISIBLE : View.INVISIBLE);//小箭头 |
| | | // tv_reward_last_month.setTextSize(TypedValue.COMPLEX_UNIT_SP, rewardState == 4 ? 17 : 15); |
| | | } |
| | | |
| | | /** |
| | | * 启动美洽客服 |
| | | */ |
| | | private void conversation() { |
| | | KeFuUtil.jumpKeFu(tv_user_num.getContext(), "我的"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | return v; |
| | | } |
| | | } |
| | | |
| | | int totalMsgCount = 0; |
| | | |
| | | /** |
| | | * 消息 未读数量 |
| | | * |
| | | * @param uid |
| | | */ |
| | | private void getUnReadMsgCount(String uid) { |
| | | ShoppingApi.getUnReadMsgCount(getContext(), uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | | if (jsonObject.optJSONObject("data").optInt("totalCount") > 0) { |
| | | totalMsgCount = jsonObject.optJSONObject("data").optInt("totalCount"); |
| | | } else { |
| | | totalMsgCount = 0; |
| | | } |
| | | } else { |
| | | totalMsgCount = 0; |
| | | } |
| | | if (totalMsgCount > 0) { |
| | | tv_msg_count.setVisibility(View.VISIBLE); |
| | | tv_msg_count.setText(totalMsgCount > 99 ? "99+" : (totalMsgCount + "")); |
| | | } else { |
| | | tv_msg_count.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.tejia.lijin.app.updateApp.UpdateApp; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.tejia.lijin.app.util.ToolUtil; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.CategoryCustomEvent; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.MainCustomEvent; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.SearchCustomEvent; |
| | |
| | | contentView.findViewById(R.id.v_status_bar).setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | | recommend_top_img = contentView.findViewById(R.id.recommend_top_img);//热门功能 |
| | | fl_search_content = contentView.findViewById(R.id.fl_search_content); |
| | | fl_search_content.setOnClickListener(this); |
| | |
| | | } |
| | | }, false);//强制检测更新-否. |
| | | |
| | | //设置背景色 |
| | | contentView.findViewById(R.id.apl_search).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | magic_indicator.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | |
| | | } |
| | | |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.util.downutil.StringUtils; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | srl_user_message.setColorSchemeColors(getResources().getColor(R.color.theme)); |
| | | |
| | | String title = getIntent().getStringExtra("title"); |
| | | title= StringUtils.isNullOrEmpty(title)?"消息":title; |
| | | tv_middle.setText(title); |
| | | |
| | | if (title.equals("邀请消息")) { |
| | |
| | | } else if (title.equals("其它消息") || title.equals("账号消息")) { |
| | | tv_no_data_hint.setText("主人,我这里空空如也~"); |
| | | iv_no_data.setImageDrawable(getResources().getDrawable(R.drawable.ic_msg_other_null)); |
| | | }else{ |
| | | tv_no_data_hint.setText("暂无消息"); |
| | | } |
| | | |
| | | MessageCustomEvent.msgItemClick(UserMessageActivity.this, title); |
| | |
| | | tv_no_data_hint.setText("我是你的账户小管家,赶快去省钱吧~"); |
| | | iv_no_data.setImageResource(R.drawable.ic_account_desc_null); |
| | | tv_middle.setText("账户明细"); |
| | | tv_right.setText("筛选"); |
| | | tv_right.setVisibility(View.VISIBLE); |
| | | // tv_right.setText("筛选"); |
| | | tv_right.setVisibility(View.GONE); |
| | | initTopRightPopupWindow(); |
| | | } |
| | | |
| | |
| | | |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | |
| | | import androidx.recyclerview.widget.GridLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.graphics.Color; |
| | | import android.text.Spannable; |
| | | import android.text.SpannableString; |
| | | import android.text.style.RelativeSizeSpan; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | |
| | | } |
| | | ((ContentHolder) holder).tv_title.setText(info.getDetail().getTitle()); |
| | | BigDecimal money = new BigDecimal(info.getDetail().getMoney()); |
| | | String moneyDesc = ""; |
| | | if (money.compareTo(new BigDecimal(0)) < 0) { |
| | | money = money.abs(); |
| | | ((ContentHolder) holder).tv_money_info.setText("- ¥ " + money); |
| | | moneyDesc = "- ¥" + money; |
| | | ((ContentHolder) holder).tv_money_info.setTextColor(mContext.getResources().getColor(R.color.black)); |
| | | } else { |
| | | ((ContentHolder) holder).tv_money_info.setText("+ ¥ " + money); |
| | | ((ContentHolder) holder).tv_money_info.setTextColor(mContext.getResources().getColor(R.color.main_text_color)); |
| | | moneyDesc = "+ ¥" + money; |
| | | ((ContentHolder) holder).tv_money_info.setTextColor(Color.parseColor("#FF2B51")); |
| | | } |
| | | |
| | | |
| | | SpannableString spannableString = new SpannableString(moneyDesc); |
| | | spannableString.setSpan(new RelativeSizeSpan(2.0f), 0, 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | spannableString.setSpan(new RelativeSizeSpan(2.4f), moneyDesc.indexOf("¥") + 1, moneyDesc.indexOf(".") > -1 ? moneyDesc.indexOf(".") : moneyDesc.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | |
| | | ((ContentHolder) holder).tv_money_info.setText(spannableString); |
| | | |
| | | |
| | | if (StringUtils.isEmpty(info.getDetail().getDescInfo())) { |
| | | ((ContentHolder) holder).tv_desc_info.setVisibility(View.GONE); |
| | | } else { |
| | |
| | | if (!StringUtils.isEmpty(info.getDetail().getSubTitle())) { |
| | | ((ContentHolder) holder).tv_sub_title.setVisibility(View.VISIBLE); |
| | | ((ContentHolder) holder).tv_sub_title.setText(info.getDetail().getSubTitle()); |
| | | }else{ |
| | | } else { |
| | | ((ContentHolder) holder).tv_sub_title.setVisibility(View.GONE); |
| | | } |
| | | } |
| | |
| | | import android.content.DialogInterface; |
| | | import android.content.Intent; |
| | | import android.content.SharedPreferences; |
| | | |
| | | import androidx.databinding.BindingAdapter; |
| | | import androidx.databinding.DataBindingUtil; |
| | | |
| | | import android.graphics.Bitmap; |
| | | import android.graphics.drawable.BitmapDrawable; |
| | | import android.net.Uri; |
| | |
| | | import android.os.Bundle; |
| | | import android.os.Environment; |
| | | import android.provider.MediaStore; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import android.util.Log; |
| | | import android.view.Gravity; |
| | | import android.view.View; |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.entity.common.GoodsConvertLinkJumpLink; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.util.GoodsBuyJumpUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.tencent.mm.opensdk.modelmsg.SendAuth; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | |
| | | |
| | | private String fansCountLink; |
| | | |
| | | //拼多多是否备案 |
| | | private Boolean pddBuyBind; |
| | | private Boolean pddShareBind; |
| | | |
| | | protected ShapeLoadingDialog loading = null; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | |
| | | // tv_middle.setText("我的信息"); |
| | | binding.includeTopBar.tvTopBarLeft.setOnClickListener(this); |
| | | binding.llInfoSex.setOnClickListener(this); |
| | | binding.llInfoWchatNum.setOnClickListener(this); |
| | | binding.llInfoPortrait.setOnClickListener(this); |
| | | binding.llInfoNickname.setOnClickListener(this); |
| | | binding.llInfoRelativeQq.setOnClickListener(this); |
| | |
| | | binding.llInfoRelativeWechat.setOnClickListener(this); |
| | | binding.llInfoRelativeMobile.setOnClickListener(this); |
| | | binding.llInfoInviteCode.setOnClickListener(this); |
| | | binding.llInfoVip.setOnClickListener(this); |
| | | binding.llInfoFans.setOnClickListener(this); |
| | | binding.llInfoPddBuy.setOnClickListener(this); |
| | | binding.llInfoPddShare.setOnClickListener(this); |
| | | |
| | | |
| | | binding.tvInfoUid.setOnLongClickListener(new View.OnLongClickListener() { |
| | | @Override |
| | | public boolean onLongClick(View v) { |
| | |
| | | return false; |
| | | } |
| | | }); |
| | | binding.llVipAction.setOnClickListener(this); |
| | | mPermissionsChecker = new PermissionHelper(this, this);//权限 |
| | | |
| | | loading = new ShapeLoadingDialog.Builder(this).build(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public void onClick(View view) { |
| | | Boolean buy = null; |
| | | switch (view.getId()) { |
| | | case R.id.tv_top_bar_left: |
| | | finish(); |
| | | break; |
| | | case R.id.ll_info_relative_wechat: |
| | | if(info==null) |
| | | case R.id.ll_info_relative_wechat: { |
| | | if (info == null) |
| | | return; |
| | | String title = "更换微信帐号"; |
| | | String message = "确定更换微信账号"; |
| | |
| | | } |
| | | }).create().show(); |
| | | break; |
| | | } |
| | | |
| | | case R.id.ll_info_relative_qq: { |
| | | if (info == null) |
| | | return; |
| | | String title = "更换QQ帐号"; |
| | | String message = "确定更换QQ帐号"; |
| | | String positive = "更换"; |
| | | if (StringUtils.isEmpty(info.getQqOpenId())) {//QQ |
| | | title = "绑定QQ帐号"; |
| | | message = "确定绑定QQ账号"; |
| | | positive = "绑定"; |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(phoneNum)) { |
| | | title = "更换提醒"; |
| | | message = "该帐号没有绑定手机号,需绑定手机号才能完成QQ更换。"; |
| | | positive = "绑定手机号"; |
| | | } |
| | | AddZFBInfoDialog2.Builder builder1 = new AddZFBInfoDialog2.Builder(MyInfoActivity.this); |
| | | builder1.setTitle(title).setMessage(message) |
| | | .setPositiveButton(positive, new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface dialog, int which) { |
| | | dialog.dismiss(); |
| | | if (StringUtils.isEmpty(phoneNum)) { |
| | | bindMobile(); |
| | | } else { |
| | | bindQQ(); |
| | | } |
| | | } |
| | | }).setNegativeButton("不了", new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface dialog, int which) { |
| | | dialog.dismiss(); |
| | | } |
| | | }).create().show(); |
| | | break; |
| | | } |
| | | |
| | | case R.id.ll_info_tbaccount: |
| | | String title1 = "更换淘宝账号"; |
| | | String message1 = "确定更换淘宝账号"; |
| | |
| | | message1 = "确定绑定淘宝账号"; |
| | | positive1 = "绑定"; |
| | | } |
| | | |
| | | if (info != null && StringUtils.isEmpty(phoneNum)) { |
| | | title1 = "更换提醒"; |
| | | positive1 = "绑定手机号"; |
| | | message1 = "该帐号没有绑定手机号,需绑定手机号才能完成淘宝更换。"; |
| | | } |
| | | AddZFBInfoDialog2.Builder builder2 = new AddZFBInfoDialog2.Builder(MyInfoActivity.this); |
| | | builder2.setTitle(title1).setMessage(message1) |
| | | .setPositiveButton(positive1, new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface dialog, int which) { |
| | | dialog.dismiss(); |
| | | if (StringUtils.isEmpty(phoneNum)) { |
| | | bindMobile(); |
| | | } else { |
| | | bindTB(); |
| | | } |
| | | } |
| | | }).setNegativeButton("不了", new DialogInterface.OnClickListener() { |
| | | @Override |
| | |
| | | case R.id.ll_info_sex://设置性别 |
| | | popwindow_sex();//选择相册 |
| | | break; |
| | | case R.id.ll_info_wchat_num://设置微信号 |
| | | startActivity(new Intent(this, MyWXNumActivity.class) |
| | | .putExtra("weixin", StringUtils.isEmpty(weixin) ? "" : weixin) |
| | | .putExtra("weixintip", weixintip).putExtra("erCode", info.getErCode())); |
| | | break; |
| | | case R.id.ll_info_vip://超级会员信息 |
| | | Intent intent = new Intent(this, ShareBrowserActivity.class); |
| | | intent.putExtra("url", vipLink); |
| | | startActivity(intent); |
| | | break; |
| | | case R.id.ll_info_invite_code://邀请码 |
| | | if (info == null) |
| | | return; |
| | | if (invitCodeUpdated || StringUtils.isEmpty(inviteCode) || !info.isVip()) |
| | | return; |
| | | Intent intent2 = new Intent(this, MyInviteCodeActivity.class); |
| | |
| | | case R.id.ll_info_fans: |
| | | startActivity(new Intent(this, ShareBrowserActivity.class).putExtra("url", fansCountLink)); |
| | | break; |
| | | case R.id.ll_vip_action: |
| | | if (vipAction != null) |
| | | JumpActivityUtil.jumpPage(this, vipAction.getJumpDetail(), vipAction.getParams()); |
| | | |
| | | case R.id.ll_info_pdd_buy: |
| | | buy = true; |
| | | case R.id.ll_info_pdd_share: |
| | | if (buy == null) |
| | | buy = false; |
| | | ShoppingApi.getPDDAuthInfo(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", buy, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | | if (loading != null && !loading.isShowing()) |
| | | loading.show(); |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | | if (jsonObject.optInt("code") == 0) { |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | GoodsConvertLinkJumpLink pddJumpLink = new Gson().fromJson(data.toString(), GoodsConvertLinkJumpLink.class); |
| | | GoodsBuyJumpUtil.jumpPDD(getApplicationContext(), pddJumpLink); |
| | | } else { |
| | | Toast.makeText(MyInfoActivity.this, jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) { |
| | | super.onFailure(statusCode, headers, jsonObject, e); |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (loading != null && loading.isShowing()) |
| | | loading.dismiss(); |
| | | } |
| | | }); |
| | | |
| | | break; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | private void bindQQ() { |
| | | if (ShoppingApplication.application.mWxApi.isWXAppInstalled()) { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.putBoolean("closeHint", false); |
| | | editor.putBoolean("bindqq", true); |
| | | editor.commit(); |
| | | SendAuth.Req req = new SendAuth.Req(); |
| | | req.scope = "snsapi_userinfo"; |
| | | req.state = "rebate"; |
| | | ShoppingApplication.application.mWxApi.sendReq(req); |
| | | } else { |
| | | // SingleToast.showToast(MyInfoActivity.this, "请先安装微信客户端"); |
| | | Toast.makeText(MyInfoActivity.this, "请先安装QQ客户端", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | 绑定淘宝授权 |
| | | */ |
| | |
| | | if (data.optJSONObject("vipAction") != null) { |
| | | vipAction = new Gson().fromJson(data.optJSONObject("vipAction").toString(), VIPActionInfo.class); |
| | | } |
| | | pddBuyBind = data.optBoolean("pddBuyBind"); |
| | | pddShareBind = data.optBoolean("pddShareBind"); |
| | | |
| | | |
| | | String json = data.optJSONObject("user").toString(); |
| | |
| | | } else { |
| | | binding.tvInfoRelativeWechat.setText(info.getWxName()); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(info.getQqOpenId())) {//QQ |
| | | binding.tvInfoRelativeQq.setText("去绑定"); |
| | | } else { |
| | | binding.tvInfoRelativeQq.setText(info.getQqNickName()); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(info.getOpenid())) {//淘宝 |
| | | binding.tvInfoTbaccount.setText("去绑定"); |
| | | } else { |
| | |
| | | binding.tvInfoRelativeMobile.setText(info.getPhone()); |
| | | } |
| | | |
| | | //信息设置 |
| | | // if (info.isVip()) { |
| | | binding.tvInfoVip.setVisibility(View.GONE); |
| | | // } else { |
| | | // binding.tvInfoVip.setVisibility(View.VISIBLE); |
| | | // } |
| | | |
| | | //邀请码设置 |
| | | if (StringUtils.isEmpty(inviteCode) || !info.isVip()) |
| | | binding.llInfoInviteCode.setVisibility(View.GONE); |
| | | else { |
| | | binding.llInfoInviteCode.setVisibility(View.VISIBLE); |
| | | binding.tvInfoInviteCode.setText(inviteCode); |
| | | if (invitCodeUpdated || !info.isVip()) { |
| | | binding.ivInfoInviteCodeEdit.setVisibility(View.GONE); |
| | | ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) binding.tvInfoInviteCode.getLayoutParams(); |
| | | params.setMargins(0, 0, DimenUtils.dip2px(this, 20), 0); |
| | | binding.tvInfoInviteCode.requestLayout(); |
| | | if (pddBuyBind != null) { |
| | | if (pddBuyBind) { |
| | | binding.tvInfoPddBuy.setText("去更改"); |
| | | } else { |
| | | binding.ivInfoInviteCodeEdit.setVisibility(View.VISIBLE); |
| | | ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) binding.tvInfoInviteCode.getLayoutParams(); |
| | | params.setMargins(0, 0, DimenUtils.dip2px(this, 10), 0); |
| | | binding.tvInfoInviteCode.requestLayout(); |
| | | binding.tvInfoPddBuy.setText("去备案"); |
| | | } |
| | | } else { |
| | | binding.tvInfoPddBuy.setText(""); |
| | | } |
| | | |
| | | binding.llInfoInviteCode.setVisibility(View.GONE); |
| | | if (pddShareBind != null) { |
| | | if (pddShareBind) { |
| | | binding.tvInfoPddShare.setText("去更改"); |
| | | } else { |
| | | binding.tvInfoPddShare.setText("去备案"); |
| | | } |
| | | } else { |
| | | binding.tvInfoPddShare.setText(""); |
| | | } |
| | | |
| | | |
| | | //邀请码设置 |
| | | // if (StringUtils.isEmpty(inviteCode) || !info.isVip()) |
| | | // binding.llInfoInviteCode.setVisibility(View.GONE); |
| | | // else { |
| | | // binding.llInfoInviteCode.setVisibility(View.VISIBLE); |
| | | // binding.tvInfoInviteCode.setText(inviteCode); |
| | | // if (invitCodeUpdated || !info.isVip()) { |
| | | // binding.ivInfoInviteCodeEdit.setVisibility(View.GONE); |
| | | // ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) binding.tvInfoInviteCode.getLayoutParams(); |
| | | // params.setMargins(0, 0, DimenUtils.dip2px(this, 20), 0); |
| | | // binding.tvInfoInviteCode.requestLayout(); |
| | | // } else { |
| | | // binding.ivInfoInviteCodeEdit.setVisibility(View.VISIBLE); |
| | | // ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) binding.tvInfoInviteCode.getLayoutParams(); |
| | | // params.setMargins(0, 0, DimenUtils.dip2px(this, 10), 0); |
| | | // binding.tvInfoInviteCode.requestLayout(); |
| | | // } |
| | | // } |
| | | |
| | | //是否显示邀请人 |
| | | // if (StringUtils.isEmpty(fansCountLink)) { |
| | |
| | | // binding.ivInfoFansEdit.setVisibility(View.VISIBLE); |
| | | // } |
| | | |
| | | //设置会员动作 |
| | | if (vipAction != null) { |
| | | binding.llVipAction.setVisibility(View.VISIBLE); |
| | | binding.tvVipActionName.setText(vipAction.getName()); |
| | | if (vipAction.getContent() != null) |
| | | binding.tvVipActionContent.setText(vipAction.getContent()); |
| | | } else { |
| | | binding.llVipAction.setVisibility(View.GONE); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | tv_middle = findViewById(R.id.tv_top_bar_middle); |
| | | tv_middle.setText("订单找回"); |
| | | tv_left.setOnClickListener(this); |
| | | iv_top_bar_right = findViewById(R.id.iv_top_bar_right); |
| | | iv_top_bar_right.setVisibility(View.VISIBLE); |
| | | iv_top_bar_right.setImageDrawable(getResources().getDrawable(R.drawable.ic_order_appeal_history)); |
| | | iv_top_bar_right.setOnClickListener(this); |
| | | // iv_top_bar_right = findViewById(R.id.iv_top_bar_right); |
| | | // iv_top_bar_right.setVisibility(View.GONE); |
| | | // iv_top_bar_right.setImageDrawable(getResources().getDrawable(R.drawable.ic_order_appeal_history)); |
| | | // iv_top_bar_right.setOnClickListener(this); |
| | | getLostOrderConfig();//获取订单配置文件 |
| | | orderappeal_tab = findViewById(R.id.orderappeal_tab); |
| | | orderappeal_vp = findViewById(R.id.orderappeal_vp); |
| | |
| | | trendsType.setId(1); |
| | | trendsType.setName("淘宝"); |
| | | mTypeList.add(trendsType); |
| | | TrendsType trendsType2 = new TrendsType(); |
| | | trendsType2.setId(2); |
| | | trendsType2.setName("京东"); |
| | | mTypeList.add(trendsType2); |
| | | TrendsType trendsType3 = new TrendsType(); |
| | | trendsType3.setId(3); |
| | | trendsType3.setName("拼多多"); |
| | | mTypeList.add(trendsType3); |
| | | |
| | | TrendsType trendsType4 = new TrendsType(); |
| | | trendsType4.setId(4); |
| | | trendsType4.setName("唯品会"); |
| | | mTypeList.add(trendsType4); |
| | | |
| | | TrendsType trendsType5 = new TrendsType(); |
| | | trendsType5.setId(5); |
| | | trendsType5.setName("苏宁"); |
| | | mTypeList.add(trendsType5); |
| | | // TrendsType trendsType2 = new TrendsType(); |
| | | // trendsType2.setId(2); |
| | | // trendsType2.setName("京东"); |
| | | // mTypeList.add(trendsType2); |
| | | // TrendsType trendsType3 = new TrendsType(); |
| | | // trendsType3.setId(3); |
| | | // trendsType3.setName("拼多多"); |
| | | // mTypeList.add(trendsType3); |
| | | // |
| | | // TrendsType trendsType4 = new TrendsType(); |
| | | // trendsType4.setId(4); |
| | | // trendsType4.setName("唯品会"); |
| | | // mTypeList.add(trendsType4); |
| | | // |
| | | // TrendsType trendsType5 = new TrendsType(); |
| | | // trendsType5.setId(5); |
| | | // trendsType5.setName("苏宁"); |
| | | // mTypeList.add(trendsType5); |
| | | |
| | | |
| | | orderappeal_vp.setAdapter(adapter); |
| | |
| | | import android.widget.LinearLayout; |
| | | import android.widget.TextView; |
| | | |
| | | import com.tejia.lijin.app.presenter.SearchFgPresenter; |
| | | import com.tejia.lijin.app.util.FlowLayout; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.SearchCustomEvent; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.widget.MyListView; |
| | |
| | | |
| | | private AutoCompleteTextView et_search; |
| | | private TextView tv_clear_history, tv_cancel; |
| | | private MyListView lv_search_history; |
| | | private HistoryAdapter adapter; |
| | | private List<String> mList = new ArrayList<>(); |
| | | private LinearLayout ll_no_data; |
| | | private TextView tv_no_data_hint; |
| | | private ImageView iv_no_data; |
| | | private FlowLayout fl_search_history; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | |
| | | } else { |
| | | ll_no_data.setVisibility(View.GONE); |
| | | } |
| | | adapter = new HistoryAdapter(mList); |
| | | lv_search_history.setAdapter(adapter); |
| | | |
| | | } |
| | | |
| | | private void setSearchHistoryData() { |
| | | //设置历史搜索数据 |
| | | SearchFgPresenter.fillFlowData(getApplicationContext(), mList, fl_search_history, new SearchFgPresenter.ISearchItemClick() { |
| | | @Override |
| | | public void onClick(String text, int position) { |
| | | Intent intent = new Intent(OrderFormNumSearchActivity33.this, OrderSearchResultActivity.class); |
| | | intent.putExtra("orderNo", mList.get(position)); |
| | | startActivity(intent); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | private void initView() { |
| | | et_search = findViewById(R.id.et_search); |
| | | tv_clear_history = findViewById(R.id.tv_clear_history); |
| | | tv_cancel = findViewById(R.id.tv_cancel); |
| | | lv_search_history = findViewById(R.id.lv_search_history); |
| | | fl_search_history = findViewById(R.id.fl_search_history); |
| | | ll_no_data = findViewById(R.id.ll_no_data); |
| | | tv_no_data_hint = findViewById(R.id.tv_no_data_hint); |
| | | iv_no_data = findViewById(R.id.iv_no_data); |
| | |
| | | editor.clear(); |
| | | editor.commit(); |
| | | mList.clear(); |
| | | adapter.notifyDataSetChanged(); |
| | | setSearchHistoryData(); |
| | | if (mList.size() == 0) { |
| | | ll_no_data.setVisibility(View.VISIBLE); |
| | | } else { |
| | |
| | | protected void onResume() { |
| | | super.onResume(); |
| | | MobclickAgent.onResume(this); |
| | | setSearchHistoryData(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | MobclickAgent.onPause(this); |
| | | } |
| | | |
| | | class HistoryAdapter extends BaseAdapter { |
| | | List<String> mList; |
| | | |
| | | public HistoryAdapter(List<String> list) { |
| | | mList = list; |
| | | } |
| | | |
| | | @Override |
| | | public int getCount() { |
| | | return mList == null ? 0 : mList.size(); |
| | | } |
| | | |
| | | @Override |
| | | public Object getItem(int position) { |
| | | return mList.get(position); |
| | | } |
| | | |
| | | @Override |
| | | public long getItemId(int position) { |
| | | return position; |
| | | } |
| | | |
| | | @Override |
| | | public View getView(final int position, View view, ViewGroup parent) { |
| | | view = LayoutInflater.from(OrderFormNumSearchActivity33.this) |
| | | .inflate(R.layout.item_search_history, null); |
| | | final TextView tv_content = view.findViewById(R.id.tv_search_content); |
| | | tv_content.setText(mList.get(position)); |
| | | ImageView iv_close = view.findViewById(R.id.iv_search_content_close); |
| | | tv_content.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = new Intent(OrderFormNumSearchActivity33.this, OrderSearchResultActivity.class); |
| | | intent.putExtra("orderNo", mList.get(position)); |
| | | startActivity(intent); |
| | | } |
| | | }); |
| | | iv_close.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | mList.remove(position); |
| | | notifyDataSetChanged(); |
| | | |
| | | SharedPreferences sp = getSharedPreferences("orderFormNumHistory", MODE_PRIVATE); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.clear(); |
| | | editor.putInt("formNums", mList.size()); |
| | | for (int i = 0; i < mList.size(); i++) { |
| | | editor.putString("item_" + (mList.size() - 1 - i), mList.get(mList.size() - 1 - i)); |
| | | } |
| | | editor.commit(); |
| | | if (mList.size() == 0) { |
| | | ll_no_data.setVisibility(View.VISIBLE); |
| | | } else { |
| | | ll_no_data.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | }); |
| | | return view; |
| | | } |
| | | } |
| | | } |
| | |
| | | import android.graphics.drawable.GradientDrawable; |
| | | import android.os.Bundle; |
| | | import android.provider.Settings; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.BaseAdapter; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.RelativeLayout; |
| | | import android.widget.ScrollView; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.contract.SearchFgContract; |
| | | import com.tejia.lijin.app.entity.HotSearch; |
| | | import com.tejia.lijin.app.presenter.SearchFgPresenter; |
| | | import com.tejia.lijin.app.ui.dialog.OrderAppealHistoryDeleteHintDialog; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.FlowLayout; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | | import com.tejia.lijin.app.util.RecordImageTextVideo; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.SearchCustomEvent; |
| | | import com.tejia.lijin.app.view.BaseFragment; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.wpc.library.util.cache.DiskLruCache; |
| | | import com.wpc.library.util.common.StorageUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.widget.MyListView; |
| | | import com.tejia.lijin.app.contract.SearchFgContract; |
| | | import com.tejia.lijin.app.presenter.SearchFgPresenter; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.view.BaseFragment; |
| | | import com.tejia.lijin.app.entity.HotSearch; |
| | | import com.tejia.lijin.app.ui.dialog.OrderAppealHistoryDeleteHintDialog; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.FlowLayout; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | | import com.tejia.lijin.app.util.RecordImageTextVideo; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.SearchCustomEvent; |
| | | |
| | | import org.json.JSONObject; |
| | | |
| | |
| | | */ |
| | | |
| | | public class FragmentSearch extends BaseFragment<SearchFgContract.SearchView, SearchFgPresenter> implements SearchFgContract.SearchView, View.OnClickListener { |
| | | private FlowLayout fl_hot_search; |
| | | private HistoryAdapter adapter; |
| | | private MyListView lv_history; |
| | | // private AutoCompleteTextView et_search; |
| | | private TextView tv_clear_history; |
| | | private FlowLayout fl_hot_search, fl_search_history; |
| | | private ConnectivityChangeHelper mChangeHelper; |
| | | private LinearLayout ll_no_net, ll_no_data, ll_request_failture, |
| | | ll_search_history_hint; |
| | | private ScrollView sv_search; |
| | | // public String Searchtxt;//搜索关键词 |
| | | private DiskLruCache cache; |
| | | private RelativeLayout ll_guidevideo;//优惠券视频教程 |
| | | private RelativeLayout ll_guidevideo2;//优惠券视频教程 更多 |
| | |
| | | ll_guidevideo2 = contentView.findViewById(R.id.ll_guidevideo2); |
| | | ll_guidevideoimg = contentView.findViewById(R.id.ll_guidevideoimg); |
| | | fl_hot_search = contentView.findViewById(R.id.fl_hot_search); |
| | | fl_search_history = contentView.findViewById(R.id.fl_search_history); |
| | | ll_no_net = contentView.findViewById(R.id.ll_no_net); |
| | | ll_no_data = contentView.findViewById(R.id.ll_no_data); |
| | | ll_request_failture = contentView.findViewById(R.id.ll_request_failture); |
| | | contentView.findViewById(R.id.tv_net_setting).setOnClickListener(this); |
| | | contentView.findViewById(R.id.tv_refresh).setOnClickListener(this); |
| | | sv_search = contentView.findViewById(R.id.sv_search); |
| | | lv_history = contentView.findViewById(R.id.lv_search_history); |
| | | ll_search_history_hint = contentView.findViewById(R.id.ll_search_history_hint); |
| | | tv_clear_history = contentView.findViewById(R.id.tv_clear_history); |
| | | tv_clear_history.setOnClickListener(this); |
| | | contentView.findViewById(R.id.iv_delete_history).setOnClickListener(this); |
| | | ll_guidevideo2.setOnClickListener(this); |
| | | ll_guidevideoimg.setOnClickListener(this); |
| | | |
| | | mPresenter.initCacheData(cache, fl_hot_search, mBundle.getInt("id"), hList);//热门搜索缓存 |
| | | adapter = new HistoryAdapter(mList); |
| | | lv_history.setAdapter(adapter); |
| | | setSearchHistoryData(); |
| | | |
| | | mChangeHelper = new ConnectivityChangeHelper(getContext(), |
| | | new ConnectivityChangeHelper.OnConnectivityChangeListener() { |
| | | |
| | | @Override |
| | | public void onNetworkUnAvailable() { |
| | | if (mList.size()==0) |
| | | if (mList.size() == 0) |
| | | requestState(3); |
| | | } |
| | | |
| | |
| | | }); |
| | | |
| | | //编辑完之后点击软键盘上的回车键 |
| | | // setHotData(); |
| | | // setHotData(); |
| | | |
| | | //改变 shape 背景色 |
| | | GradientDrawable p = (GradientDrawable) ll_guidevideoimg.getBackground(); |
| | |
| | | .transform(new GlideRoundTransform(getContext(), 8)) |
| | | .into(ll_guidevideoimg); |
| | | } |
| | | } |
| | | |
| | | |
| | | private void setSearchHistoryData() { |
| | | //设置历史搜索数据 |
| | | mPresenter.fillFlowData(mList, fl_search_history, new SearchFgPresenter.ISearchItemClick() { |
| | | @Override |
| | | public void onClick(String text, int position) { |
| | | mPresenter.addSearchHistory(text, mBundle.getInt("id")); |
| | | SearchCustomEvent.searchHistory(getContext()); |
| | | mPresenter.addSearchResultActivity(text, mBundle.getInt("id")); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | |
| | | super.setUserVisibleHint(isVisibleToUser); |
| | | if (isVisibleToUser && (getActivity()) != null) { |
| | | //TODO now it's visible to user对用户可见 |
| | | mPresenter.setHistoricalRecords(mBundle.getInt("id"), mList, adapter, ll_search_history_hint, null, ll_guidevideo, videoPicture); |
| | | mPresenter.setHistoricalRecords(mBundle.getInt("id"), mList, ll_search_history_hint, null, ll_guidevideo, videoPicture); |
| | | setSearchHistoryData(); |
| | | Random random = new Random(); |
| | | String key = getActivity().getIntent().getStringExtra("key"); |
| | | // if (mBundle.getInt("id") != 1) { |
| | |
| | | super.onResume(); |
| | | mChangeHelper.registerReceiver(); |
| | | MobclickAgent.onPageStart("搜索页"); |
| | | mPresenter.setHistoricalRecords(mBundle.getInt("id"), mList, adapter, ll_search_history_hint, null, ll_guidevideo, videoPicture);//显示历史记录 |
| | | mPresenter.setHistoricalRecords(mBundle.getInt("id"), mList, ll_search_history_hint, null, ll_guidevideo, videoPicture);//显示历史记录 |
| | | setSearchHistoryData(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | switch (v.getId()) { |
| | | case R.id.tv_clear_history: |
| | | case R.id.iv_delete_history: |
| | | // clearHistory(); |
| | | OrderAppealHistoryDeleteHintDialog.Builder builder = new OrderAppealHistoryDeleteHintDialog.Builder(getContext()); |
| | | builder.setMessage("是否要清空搜索记录?").setNegativeButton("不了", new DialogInterface.OnClickListener() { |
| | |
| | | SharedPreferences sp; |
| | | if (mBundle.getInt("id") == Constant.GOODS_TYPE_TB) { |
| | | sp = getContext().getSharedPreferences("searchHistory", Context.MODE_PRIVATE); |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_JD) { |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_JD) { |
| | | sp = getContext().getSharedPreferences("searchHistory_jd", Context.MODE_PRIVATE); |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_PDD) { |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_PDD) { |
| | | sp = getContext().getSharedPreferences("searchHistory_pdd", Context.MODE_PRIVATE); |
| | | }else if (mBundle.getInt("id") == Constant.GOODS_TYPE_VIP) { |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_VIP) { |
| | | sp = getContext().getSharedPreferences("searchHistory_vip", Context.MODE_PRIVATE); |
| | | }else if (mBundle.getInt("id") == Constant.GOODS_TYPE_SUNING) { |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_SUNING) { |
| | | sp = getContext().getSharedPreferences("searchHistory_suning", Context.MODE_PRIVATE); |
| | | } else { |
| | | sp = getContext().getSharedPreferences("searchHistory", Context.MODE_PRIVATE); |
| | |
| | | editor.clear(); |
| | | editor.apply(); |
| | | mList.clear(); |
| | | adapter.notifyDataSetChanged(); |
| | | setSearchHistoryData(); |
| | | ll_search_history_hint.setVisibility(View.GONE); |
| | | if (videoPicture == null || videoPicture.length() == 0 || videoPicture.equals(" ")) {//视频图片为空 隐藏视频 |
| | | ll_guidevideo.setVisibility(View.GONE); |
| | |
| | | } catch (PackageManager.NameNotFoundException e) { |
| | | e.printStackTrace(); |
| | | return 1; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 历史记录 |
| | | */ |
| | | public class HistoryAdapter extends BaseAdapter { |
| | | List<String> mList; |
| | | |
| | | public HistoryAdapter(List<String> list) { |
| | | mList = list; |
| | | } |
| | | |
| | | @Override |
| | | public int getCount() { |
| | | return mList == null ? 0 : mList.size(); |
| | | } |
| | | |
| | | @Override |
| | | public Object getItem(int position) { |
| | | return mList.get(position); |
| | | } |
| | | |
| | | @Override |
| | | public long getItemId(int position) { |
| | | return position; |
| | | } |
| | | |
| | | @Override |
| | | public View getView(final int position, View view, ViewGroup parent) { |
| | | view = LayoutInflater.from(getContext()).inflate(R.layout.item_search_history, null); |
| | | final TextView tv_search_content = view.findViewById(R.id.tv_search_content); |
| | | final ImageView iv_search_content_close = view.findViewById(R.id.iv_search_content_close); |
| | | tv_search_content.setText(mList.get(position)); |
| | | tv_search_content.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | mPresenter.addSearchHistory(tv_search_content.getText().toString(), mBundle.getInt("id")); |
| | | SearchCustomEvent.searchHistory(getContext()); |
| | | mPresenter.addSearchResultActivity(tv_search_content.getText().toString(), mBundle.getInt("id")); |
| | | } |
| | | }); |
| | | iv_search_content_close.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | mList.remove(position); |
| | | notifyDataSetChanged(); |
| | | if (mList.size() == 0) { |
| | | ll_search_history_hint.setVisibility(View.GONE); |
| | | if (videoPicture == null || videoPicture.length() == 0 || videoPicture.equals(" ")) {//视频图片为空 隐藏视频 |
| | | ll_guidevideo.setVisibility(View.GONE); |
| | | } else { |
| | | ll_guidevideo.setVisibility(View.VISIBLE); |
| | | } |
| | | } |
| | | SharedPreferences sp; |
| | | if (mBundle.getInt("id") == Constant.GOODS_TYPE_TB) { |
| | | sp = getContext().getSharedPreferences("searchHistory", Context.MODE_PRIVATE); |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_JD) { |
| | | sp = getContext().getSharedPreferences("searchHistory_jd", Context.MODE_PRIVATE); |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_PDD) { |
| | | sp = getContext().getSharedPreferences("searchHistory_pdd", Context.MODE_PRIVATE); |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_VIP) { |
| | | sp = getContext().getSharedPreferences("searchHistory_vip", Context.MODE_PRIVATE); |
| | | } else if (mBundle.getInt("id") == Constant.GOODS_TYPE_SUNING) { |
| | | sp = getContext().getSharedPreferences("searchHistory_suning", Context.MODE_PRIVATE); |
| | | } else { |
| | | sp = getContext().getSharedPreferences("searchHistory", Context.MODE_PRIVATE); |
| | | } |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.clear(); |
| | | editor.putInt("searchNums", mList.size()); |
| | | for (int i = 0; i < mList.size(); i++) { |
| | | editor.putString("searchItem_" + (mList.size() - 1 - i), mList.get(mList.size() - 1 - i)); |
| | | } |
| | | editor.apply(); |
| | | } |
| | | }); |
| | | return view; |
| | | } |
| | | } |
| | | } |
| | |
| | | } else if (viewType == TYPE_HEADER) { |
| | | return new ViewHolder(VIEW_HEADER); |
| | | } else { |
| | | View view = LayoutInflater.from(mContext).inflate(R.layout.item_recomend_category_goods, parent, false); |
| | | View view = LayoutInflater.from(mContext).inflate(R.layout.item_goods, parent, false); |
| | | ViewHolder holder = new ViewHolder(view); |
| | | return holder; |
| | | } |
| | |
| | | import android.graphics.drawable.AnimationDrawable; |
| | | import android.os.Bundle; |
| | | import android.provider.Settings; |
| | | |
| | | import androidx.viewpager.widget.PagerAdapter; |
| | | import androidx.viewpager.widget.ViewPager; |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.util.Log; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.entity.RecommendGoods; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.viewpagerindicator.CirclePageIndicator; |
| | | import com.wpc.library.RetainViewFragment; |
| | |
| | | private SwipeRefreshLayout srl_second_category; |
| | | private RecyclerView lv_second_category; |
| | | private MyGridView gv_category_top; |
| | | private RecommendCategoryAdapter adapter;//淘宝商品适配 |
| | | private RecommendGoodsAdapter adapter;//淘宝商品适配 |
| | | |
| | | private ViewPager vp_banner; |
| | | private CirclePageIndicator indicator_category; |
| | |
| | | } |
| | | lv_second_category.setLayoutManager(new LinearLayoutManager(lv_second_category.getContext())); |
| | | // lv_second_category.setBackgroundColor(getResources().getColor(R.color.white)); |
| | | adapter = new RecommendCategoryAdapter(lv_second_category.getContext(), mList, |
| | | firstCategory == null ? null : firstCategory.getName(), "firstclass"); |
| | | adapter.isFirst = true; |
| | | // adapter = new RecommendCategoryAdapter(lv_second_category.getContext(), mList, |
| | | // firstCategory == null ? null : firstCategory.getName(), "firstclass"); |
| | | |
| | | adapter = new RecommendGoodsAdapter(lv_second_category.getContext(), mList, "firstclass"); |
| | | |
| | | // adapter.isFirst = true; |
| | | lv_second_category.setAdapter(adapter); |
| | | adapter.addFooterView(bottom); |
| | | |
| | |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.SpecialOffer2; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.MainCustomEvent; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.common.StringUtils; |
| | |
| | | |
| | | @Override |
| | | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { |
| | | return new Holder(inflater.inflate(R.layout.item_special_offer, parent, false)); |
| | | return new Holder(inflater.inflate(R.layout.item_home_special_circle, parent, false)); |
| | | } |
| | | |
| | | @Override |
| | | public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) { |
| | | final SpecialOffer2 info = mList.get(position); |
| | | info.setBgColor("#8B4CFF"); |
| | | Holder holder = (Holder) viewHolder; |
| | | holder.tv_name.setText(mList.get(position).getName() + ""); |
| | | Glide.with(mContext).load(mList.get(position).getPicture()).into(holder.iv_special_offer); |
| | | if (!StringUtils.isEmpty(mList.get(position).getIcon())) { |
| | | holder.iv_hot.setVisibility(View.VISIBLE); |
| | | Glide.with(mContext).load(mList.get(position).getIcon()).into(holder.iv_hot); |
| | | holder.tv_name.setText(info.getName() + ""); |
| | | Glide.with(mContext).load(info.getPicture()).transform(new GlideRoundTransform(mContext, 18)).into(holder.iv_icon); |
| | | if (!StringUtils.isEmpty(info.getIcon())) { |
| | | holder.iv_tag.setVisibility(View.VISIBLE); |
| | | Glide.with(mContext).load(info.getIcon()).into(holder.iv_tag); |
| | | } else { |
| | | holder.iv_hot.setVisibility(View.GONE); |
| | | holder.iv_tag.setVisibility(View.GONE); |
| | | } |
| | | |
| | | int itemWidth = (int) (SystemCommon.getScreenWidth(mContext) / 5); |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(itemWidth, |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
| | | ViewGroup.LayoutParams.WRAP_CONTENT); |
| | | holder.ll_item.setLayoutParams(params); |
| | | holder.view.setLayoutParams(params); |
| | | |
| | | // ImageLoader.getInstance().displayImage(mList.get(position).getPicture(), iv_special_offer); |
| | | holder.ll_item.setOnClickListener(new View.OnClickListener() { |
| | | if (!StringUtils.isNullOrEmpty(info.getBgColor())) { |
| | | holder.view.setBackground(HomeUIUtil.getCircleSpecialBg(mContext, info.getBgColor())); |
| | | } |
| | | |
| | | holder.view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | MainCustomEvent.rmdSpecial(mContext, mList.get(position).getName()); |
| | | if (mList.get(position).getJumpDetail() == null) |
| | | MainCustomEvent.rmdSpecial(mContext, info.getName()); |
| | | if (info.getJumpDetail() == null) |
| | | return; |
| | | JumpActivityUtil.jumpPage(mContext, mList.get(position).getJumpDetail(), mList.get(position).getParams()); |
| | | JumpActivityUtil.jumpPage(mContext, info.getJumpDetail(), info.getParams()); |
| | | clickTime = System.currentTimeMillis(); |
| | | clickId = mList.get(position).getId(); |
| | | clickId = info.getId(); |
| | | } |
| | | }); |
| | | } |
| | |
| | | class Holder extends RecyclerView.ViewHolder { |
| | | |
| | | TextView tv_name; |
| | | ImageView iv_special_offer; |
| | | ImageView iv_hot; |
| | | LinearLayout ll_item; |
| | | ImageView iv_icon; |
| | | ImageView iv_tag; |
| | | View view; |
| | | |
| | | public Holder(View itemView) { |
| | | super(itemView); |
| | | view = itemView; |
| | | tv_name = itemView.findViewById(R.id.tv_name); |
| | | iv_special_offer = itemView.findViewById(R.id.iv_special_offer); |
| | | iv_hot = itemView.findViewById(R.id.iv_hot); |
| | | ll_item = itemView.findViewById(R.id.ll_item); |
| | | iv_icon = itemView.findViewById(R.id.iv_icon); |
| | | iv_tag = itemView.findViewById(R.id.iv_tag); |
| | | } |
| | | } |
| | | } |
| | |
| | | import android.content.SharedPreferences; |
| | | import android.content.pm.PackageInfo; |
| | | import android.content.pm.PackageManager; |
| | | import android.graphics.Canvas; |
| | | import android.graphics.Rect; |
| | | import android.graphics.drawable.AnimationDrawable; |
| | | import android.graphics.drawable.GradientDrawable; |
| | | import android.os.Bundle; |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | | import android.provider.Settings; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.annotation.Nullable; |
| | | import androidx.viewpager.widget.PagerAdapter; |
| | | import androidx.viewpager.widget.ViewPager; |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | import androidx.recyclerview.widget.GridLayoutManager; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.util.Log; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.lzj.gallery.library.views.BannerViewPager; |
| | | import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; |
| | | import com.viewpagerindicator.LinePageIndicator; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.cache.DiskLruCache; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StorageUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.widget.MyGridView; |
| | | import com.wpc.library.widget.RatioLayout; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | |
| | | import com.tejia.lijin.app.ui.timeLimitedSpike.TimeLimitedSpikeActivity; |
| | | import com.tejia.lijin.app.util.FlowLayout; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.MainCustomEvent; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.cache.DiskLruCache; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StorageUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.widget.MyGridView; |
| | | import com.wpc.library.widget.RatioLayout; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONException; |
| | |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.annotation.Nullable; |
| | | import androidx.recyclerview.widget.GridLayoutManager; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | import androidx.viewpager.widget.PagerAdapter; |
| | | import androidx.viewpager.widget.ViewPager; |
| | | |
| | | import static android.content.Context.MODE_PRIVATE; |
| | | |
| | | /** |
| | |
| | | */ |
| | | |
| | | public class RecommendFragment extends RetainViewFragment implements View.OnClickListener { |
| | | // private RecyclerView rv_first_page, rv_special_offer; |
| | | private LinearLayout ll_fragment_activity, ll_special_offer, ll_limit_time_buy, ll_jinbi_exchange_buy; |
| | | private MyGridView gv_limit_time_goods, gv_jinbi_exchange_goods; |
| | | private SwipeRefreshLayout rl_first_page; |
| | | private ImageView iv_activity_bg, iv_slid_top, iv_input; |
| | | // private MyScrollView sv_content; |
| | | private FrameLayout fl_fragment_activity; |
| | | private RatioLayout rl_recommend_activity2; |
| | | // private TextView tv_recommend_goods_hint; |
| | | private RecyclerView rv_recommend_goods, rv_special_offer; |
| | | private View v_divider; |
| | | private FlowLayout flow_hot; |
| | | private RatioLayout rl_top_banner; |
| | | ScrollView sv_hot; |
| | | private View bottom; |
| | | private ImageView iv_loading, iv_hot_img; |
| | | private TextView tv_loading; |
| | | |
| | | ViewPager vp_banner, vp_recommend_activity2; |
| | | private LinePageIndicator indicator_recommend; |
| | | com.lzj.gallery.library.views.BannerViewPager vp_banner; |
| | | ViewPager vp_recommend_activity2; |
| | | private LinearLayout ll_no_net, ll_no_data, ll_request_failture; |
| | | |
| | | private List<HomeBanner> mBanners = new ArrayList<>(); |
| | |
| | | private List<String> lList = new ArrayList<>(); |
| | | private List<String> lList2 = new ArrayList<>(); |
| | | |
| | | private RecommendTopAdapter bannerAdapter;//banner Adapter |
| | | private RecommendActivityAdapter activityAdapter; |
| | | private HotCategoryAdapter specialAdapter2; |
| | | private RecommendCircleSpecialAdapter specialAdapter2; |
| | | private RecommendGoodsAdapter goodsAdapter;//精选商品 Adapter |
| | | private LimitTimeBuyAdapter limitTimeBuyAdapter, jinbiExchangeAdapter; |
| | | private DiskLruCache cache; |
| | |
| | | |
| | | int visibilyNum = -1; |
| | | |
| | | |
| | | RecyclerView.ItemDecoration circleSpecialItemDecoration = new RecyclerView.ItemDecoration() { |
| | | @Override |
| | | public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) { |
| | | super.onDraw(c, parent, state); |
| | | } |
| | | |
| | | @Override |
| | | public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) { |
| | | super.onDrawOver(c, parent, state); |
| | | } |
| | | |
| | | @Override |
| | | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { |
| | | super.getItemOffsets(outRect, view, parent, state); |
| | | int index = parent.getChildAdapterPosition(view); |
| | | int total = parent.getAdapter().getItemCount(); |
| | | int minWidth = DimenUtils.dipToPixels(6, view.getContext()); |
| | | if (index % 4 == 0) { |
| | | outRect.left = 0; //第一列左边贴边 |
| | | outRect.right = minWidth * 3; |
| | | } else if (index % 4 == 1) { |
| | | outRect.left = minWidth * 1; |
| | | outRect.right = minWidth * 2; |
| | | } else if (index % 4 == 2) { |
| | | outRect.left = minWidth * 2; |
| | | outRect.right = minWidth * 1; |
| | | } else { |
| | | outRect.right = 0; //第一列左边贴边 |
| | | outRect.left = minWidth * 3; |
| | | } |
| | | |
| | | int lastRow = total / 4; |
| | | |
| | | if (lastRow != index / 4) { |
| | | outRect.bottom = minWidth * 4; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | private void init(View contentView) { |
| | | rv_recommend_goods = contentView.findViewById(R.id.rv_recommend_goods); |
| | | rl_first_page = contentView.findViewById(R.id.rl_first_page); |
| | | iv_slid_top = contentView.findViewById(R.id.iv_slid_top); |
| | | final View top = LayoutInflater.from(rv_recommend_goods.getContext()) |
| | | .inflate(R.layout.item_recommend_top, null); |
| | | rl_top_banner = top.findViewById(R.id.rl_top_banner); |
| | | top.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | ll_fragment_activity = top.findViewById(R.id.ll_fragment_activity); |
| | | ll_special_offer = top.findViewById(R.id.ll_special_offer); |
| | | ll_limit_time_buy = top.findViewById(R.id.ll_limit_time_buy); |
| | |
| | | fl_fragment_activity = top.findViewById(R.id.fl_fragment_activity); |
| | | rl_recommend_activity2 = top.findViewById(R.id.rl_recommend_activity2); |
| | | iv_activity_bg = top.findViewById(R.id.iv_activity_bg); |
| | | vp_banner = top.findViewById(R.id.vp_recommend); |
| | | indicator_recommend = top.findViewById(R.id.indicator_recommend); |
| | | vp_banner = top.findViewById(R.id.vp_banner); |
| | | rv_special_offer = top.findViewById(R.id.rv_special_offer); |
| | | flow_hot = top.findViewById(R.id.flow_hot); |
| | | iv_input = top.findViewById(R.id.iv_input); |
| | | vp_recommend_activity2 = top.findViewById(R.id.vp_recommend_activity2); |
| | | // tv_recommend_goods_hint = top.findViewById(R.id.tv_recommend_goods_hint); |
| | | v_divider = top.findViewById(R.id.v_divider); |
| | | tv_hour_1 = top.findViewById(R.id.tv_hour_1); |
| | | tv_hour_2 = top.findViewById(R.id.tv_hour_2); |
| | |
| | | getAppPageNotification(); |
| | | |
| | | //设置列表可以水平滑动,两行 |
| | | GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 2, GridLayoutManager.HORIZONTAL, false); |
| | | // mRecyclerView = new CustomeRecyclerView(this); |
| | | GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 4, GridLayoutManager.VERTICAL, false) { |
| | | @Override |
| | | public boolean canScrollVertically() { |
| | | return false; |
| | | } |
| | | }; |
| | | rv_special_offer.setLayoutManager(layoutManager); |
| | | specialAdapter2 = new HotCategoryAdapter(getActivity(), circleSpecials); |
| | | specialAdapter2 = new RecommendCircleSpecialAdapter(getActivity(), circleSpecials); |
| | | rv_special_offer.setAdapter(specialAdapter2); |
| | | |
| | | seekBar = top.findViewById(R.id.slide_indicator_point); |
| | | seekBar.setPadding(0, 0, 0, 0); |
| | | seekBar.setThumbOffset(0); |
| | | seekBar.setVisibility(View.GONE); |
| | | |
| | | rv_special_offer.addItemDecoration(circleSpecialItemDecoration); |
| | | |
| | | rv_special_offer.addOnScrollListener(new RecyclerView.OnScrollListener() { |
| | | @Override |
| | |
| | | } |
| | | }); |
| | | |
| | | vp_banner.setCurrentItem(0, true); |
| | | vp_recommend_activity2.setCurrentItem(0, true); |
| | | bannerAdapter = new RecommendTopAdapter(mBanners, getActivity(), false); |
| | | vp_banner.setAdapter(bannerAdapter); |
| | | activityAdapter = new RecommendActivityAdapter(mBanners2, getActivity()); |
| | | vp_recommend_activity2.setAdapter(activityAdapter); |
| | | rv_recommend_goods.setLayoutManager(new LinearLayoutManager(getContext())); |
| | | goodsAdapter = new RecommendGoodsAdapter(this, mList, "jingxuan"); |
| | | goodsAdapter = new RecommendGoodsAdapter(getContext(), mList, "jingxuan"); |
| | | rv_recommend_goods.setAdapter(goodsAdapter); |
| | | goodsAdapter.addFooterView(bottom); |
| | | goodsAdapter.addHeaderView(top); |
| | | initTimeHandle(); |
| | | setBannerData(); |
| | | } |
| | | |
| | | |
| | | private void setBannerData() { |
| | | |
| | | List<String> urlList = new ArrayList<>(); |
| | | for (HomeBanner ad : mBanners) |
| | | urlList.add(ad.getSrc()); |
| | | if (urlList.size() > 0) { |
| | | if (!vp_banner.hasAdapter()) { |
| | | vp_banner.initBanner(urlList, false, 0.4375f)//开启3D画廊效果 |
| | | .addPageMargin(10, 10)//参数1page之间的间距,参数2中间item距离边界的间距 |
| | | .addStartTimer(3)//自动轮播3秒间隔 |
| | | .addPointBottom(0)//底部间距 |
| | | .addPoint(5, R.drawable.shape_banner_indicator_highlight, R.drawable.shape_banner_indicator) |
| | | .addDefaultImg(R.drawable.shape_banner_default) |
| | | .addRoundCorners(DimenUtils.dip2px(getContext(), 10))//圆角 |
| | | .finishConfig()//这句必须加 |
| | | .addBannerListener(new BannerViewPager.OnClickBannerListener() { |
| | | @Override |
| | | public void onBannerClick(int position) { |
| | | if (position >= mBanners.size()) |
| | | return; |
| | | JumpActivityUtil.jumpPage(getActivity(), mBanners.get(position).getJumpDetail(), mBanners.get(position).getParams()); |
| | | } |
| | | }); |
| | | } else { |
| | | vp_banner.notifyDataSetChanged(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | private void addHot(final RecommendHot recommendHot) { |
| | | if (recommendHot == null) { |
| | |
| | | if (mBanners.size() > 0) { |
| | | mBanners.clear(); |
| | | } |
| | | float width = SystemCommon.getScreenWidth(getContext()); |
| | | indicator_recommend.setLineWidth((width - (DimenUtils.dip2px(getContext(), 30))) / list1.size()); |
| | | indicator_recommend.setGapWidth(0); |
| | | indicator_recommend.setSelectedColor(getResources().getColor(R.color.white)); |
| | | indicator_recommend.setUnselectedColor(getResources().getColor(R.color.transport_white3)); |
| | | indicator_recommend.setStrokeWidth(DimenUtils.dip2px(getContext(), 2)); |
| | | |
| | | if (list1 == null || list1.size() == 0) { |
| | | rl_top_banner.setVisibility(View.GONE); |
| | | } else { |
| | | rl_top_banner.setVisibility(View.VISIBLE); |
| | | } |
| | | |
| | | mBanners.clear(); |
| | | mBanners.addAll(list1); |
| | | bannerAdapter.notifyDataSetChanged(); |
| | | setBannerData(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | mChangeHelper.registerReceiver(); |
| | | indicator_recommend.setViewPager(vp_banner); |
| | | vp_banner.postDelayed(mAutoScroller, 2000); |
| | | vp_recommend_activity2.postDelayed(mAutoScroller2, 2000); |
| | | sv_hot.postDelayed(mAutoScroller3, 2000); |
| | | |
| | | scanSpecial(System.currentTimeMillis()); |
| | | } |
| | | |
| | | private void scanSpecial(Long curTime) { |
| | | long stayTime1 = curTime - bannerAdapter.clickTime; |
| | | long stayTime2 = curTime - specialAdapter2.clickTime; |
| | | long stayTime3 = curTime - activityAdapter.clickTime; |
| | | long stayTime4 = curTime - clickTime4; |
| | | if (bannerAdapter.clickTime > 0 && stayTime1 > 15 * 1000) { |
| | | PushEventData info = new PushEventData(); |
| | | info.setId(bannerAdapter.clickId); |
| | | Gson gson = new GsonBuilder().serializeNulls().create(); |
| | | String data = gson.toJson(info); |
| | | bannerAdapter.clickTime = 0; |
| | | bannerAdapter.clickId = ""; |
| | | } |
| | | |
| | | if (specialAdapter2.clickTime > 0 && stayTime2 > 15 * 1000) { |
| | | PushEventData info = new PushEventData(); |
| | | info.setId(specialAdapter2.clickId); |
| | |
| | | clickId4 = ""; |
| | | } |
| | | } |
| | | |
| | | private Runnable mAutoScroller = new Runnable() { |
| | | |
| | | @Override |
| | | public void run() { |
| | | PagerAdapter adapter = vp_banner.getAdapter(); |
| | | if (adapter != null && adapter.getCount() != 0) { |
| | | vp_banner.setCurrentItem((vp_banner.getCurrentItem() + 1) |
| | | % adapter.getCount(), true); |
| | | } |
| | | vp_banner.postDelayed(this, 5000); |
| | | } |
| | | }; |
| | | |
| | | private Runnable mAutoScroller2 = new Runnable() { |
| | | |
| | |
| | | public void onPause() { |
| | | super.onPause(); |
| | | mChangeHelper.unregisterReceiver(); |
| | | vp_banner.removeCallbacks(mAutoScroller); |
| | | vp_recommend_activity2.removeCallbacks(mAutoScroller2); |
| | | sv_hot.removeCallbacks(mAutoScroller3); |
| | | } |
| | |
| | | if (mBanners.size() > 0) { |
| | | mBanners.clear(); |
| | | } |
| | | float width = SystemCommon.getScreenWidth(getContext()); |
| | | indicator_recommend.setLineWidth((width - (DimenUtils.dip2px(getContext(), 30))) / list1.size()); |
| | | indicator_recommend.setGapWidth(0); |
| | | indicator_recommend.setSelectedColor(getResources().getColor(R.color.white)); |
| | | indicator_recommend.setUnselectedColor(getResources().getColor(R.color.transport_white3)); |
| | | indicator_recommend.setStrokeWidth(DimenUtils.dip2px(getContext(), 2)); |
| | | |
| | | mBanners.addAll(list1); |
| | | bannerAdapter.notifyDataSetChanged(); |
| | | if (list1 == null || list1.size() == 0) { |
| | | rl_top_banner.setVisibility(View.GONE); |
| | | } else { |
| | | rl_top_banner.setVisibility(View.VISIBLE); |
| | | } |
| | | setBannerData(); |
| | | |
| | | DiskLruCache.Editor editor0 = cache |
| | | .edit(getKey("BannerAd")); |
| | |
| | | package com.tejia.lijin.app.ui.recommend; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | |
| | |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.TaoBaoGoodsBrief; |
| | |
| | | private RecyclerView mRecyclerView; |
| | | |
| | | private List<TaoBaoGoodsBrief> mList; |
| | | private RecommendFragment mFragment; |
| | | private Context mContext; |
| | | |
| | | private View VIEW_FOOTER; |
| | |
| | | private int TYPE_HEADER = 1001; |
| | | public int TYPE_FOOTER = 1002; |
| | | |
| | | private DisplayImageOptions options; |
| | | private String mFrom; |
| | | int goodsType = 1; |
| | | |
| | | public RecommendGoodsAdapter(RecommendFragment fragment, List<TaoBaoGoodsBrief> list, String from) { |
| | | public RecommendGoodsAdapter(Context context, List<TaoBaoGoodsBrief> list, String from) { |
| | | this.mList = list; |
| | | this.mFragment = fragment; |
| | | this.mContext = fragment.getContext(); |
| | | this.mContext = context; |
| | | this.mFrom = from; |
| | | this.options = new DisplayImageOptions.Builder() |
| | | .showImageForEmptyUri(R.drawable.ic_goods_default) |
| | | .showImageOnFail(R.drawable.ic_goods_default) |
| | | .showImageOnLoading(R.drawable.ic_goods_default) |
| | | .resetViewBeforeLoading(true).cacheInMemory(true) |
| | | .cacheOnDisk(true).imageScaleType(ImageScaleType.EXACTLY) |
| | | .considerExifParams(true) |
| | | .displayer(new RoundedBitmapDisplayer(DimenUtils |
| | | .dip2px(mContext, 5))).build(); |
| | | } |
| | | |
| | | |
| | |
| | | } else if (viewType == TYPE_HEADER) { |
| | | return new ViewHolder(VIEW_HEADER); |
| | | } else { |
| | | View view = LayoutInflater.from(mContext).inflate(R.layout.item_category, parent, false); |
| | | View view = LayoutInflater.from(mContext).inflate(R.layout.item_goods, parent, false); |
| | | ViewHolder holder = new ViewHolder(view); |
| | | return holder; |
| | | } |
| | |
| | | public void onBindViewHolder(RecyclerView.ViewHolder holder1, int position) { |
| | | if (!isHeaderView(position) && !isFooterView(position)) { |
| | | final TaoBaoGoodsBrief info; |
| | | boolean showShadow = false; |
| | | if (haveHeaderView()) { |
| | | info = mList.get(position - 1); |
| | | if (position == 1) { |
| | | showShadow = true; |
| | | } |
| | | } else { |
| | | info = mList.get(position); |
| | | if (position == 0) { |
| | | showShadow = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | ViewHolder viewHolder = (ViewHolder) holder1; |
| | | |
| | | if ("jingxuan".equalsIgnoreCase(mFrom)) { |
| | | ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) viewHolder.ll_item1.getLayoutParams(); |
| | | params.leftMargin = DimenUtils.dipToPixels(10, mContext); |
| | | params.rightMargin = DimenUtils.dipToPixels(10, mContext); |
| | | viewHolder.ll_item1.setLayoutParams(params); |
| | | } |
| | | |
| | | viewHolder.ll_recommend_gv.setVisibility(View.GONE); |
| | | viewHolder.ll_item1.setVisibility(View.VISIBLE); |
| | | viewHolder.v_top.setVisibility(View.VISIBLE); |
| | | |
| | | if ((haveHeaderView() && position == 1) || (!haveHeaderView() && position == 0)) { |
| | | viewHolder.v_top.setVisibility(View.VISIBLE); |
| | | if (showShadow && "jingxuan".equalsIgnoreCase(mFrom)) { |
| | | viewHolder.fl_shadow.setVisibility(View.VISIBLE); |
| | | viewHolder.view_shadow.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | } else { |
| | | viewHolder.v_top.setVisibility(View.GONE); |
| | | viewHolder.fl_shadow.setVisibility(View.GONE); |
| | | } |
| | | |
| | | viewHolder.v_top.setVisibility(View.GONE); |
| | | viewHolder.v_top1.setVisibility(View.VISIBLE); |
| | | viewHolder.v_left.setVisibility(View.GONE); |
| | | |
| | | //商品详情填充 |
| | | GoodsDetailListUtil.setGoodsDetail(mContext, info, viewHolder.goodsDetail); |
| | | // 图片 |
| | | try { |
| | | Glide.with(mContext).load(info.getPicUrl()).apply(new RequestOptions().centerCrop()).transform(new GlideRoundTransform(mContext, 5)).transition(withCrossFade()).placeholder(R.drawable.ic_goods_default).diskCacheStrategy(DiskCacheStrategy.ALL).into(viewHolder.iv_pic1); |
| | | Glide.with(mContext).load(info.getPicUrl()).apply(new RequestOptions().centerCrop()).transform(new GlideRoundTransform(mContext, 5)).transition(withCrossFade()).placeholder(R.drawable.ic_goods_default).diskCacheStrategy(DiskCacheStrategy.ALL).into(viewHolder.iv_pic); |
| | | } catch (IllegalArgumentException e) { |
| | | } |
| | | |
| | | |
| | | viewHolder.ll_item1.setOnClickListener(new View.OnClickListener() { |
| | | viewHolder.view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(mContext, info.getGoodsType()); |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | // intent.putExtra("from", from); |
| | | mContext.startActivity(intent); |
| | | } |
| | | }); |
| | |
| | | } |
| | | } |
| | | |
| | | private boolean haveHeaderView() { |
| | | public boolean haveHeaderView() { |
| | | return VIEW_HEADER != null; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | class ViewHolder extends RecyclerView.ViewHolder { |
| | | TextView tv_name; |
| | | TextView tv_price; |
| | | TextView tv_coupon_price; |
| | | LinearLayout ll_coupon_bg; |
| | | TextView tv_shop_name; |
| | | LinearLayout ll_coupon; |
| | | LinearLayout ll_shop; |
| | | TextView tv_normal_price; |
| | | LinearLayout ll_recommend_gv; |
| | | TextView tv_favourable;//红包,券后价 |
| | | TextView tv_sale_num; |
| | | |
| | | View view; |
| | | //首页背景 |
| | | FrameLayout fl_shadow; |
| | | View view_shadow; |
| | | |
| | | /*********内容*********/ |
| | | ImageView iv_pic; |
| | | View v_top; |
| | | View v_top1; |
| | | View v_left; |
| | | LinearLayout ll_item1; |
| | | ImageView iv_pic1; |
| | | |
| | | |
| | | GoodsRightViewHolder goodsDetail; |
| | | |
| | |
| | | /* |
| | | 竖屏 |
| | | */ |
| | | view = convertView; |
| | | goodsDetail = new GoodsRightViewHolder(convertView); |
| | | iv_pic = convertView |
| | | .findViewById(R.id.iv_movie_cover); |
| | | tv_normal_price = convertView |
| | | .findViewById(R.id.tv_normal_price); |
| | | tv_shop_name = convertView |
| | | .findViewById(R.id.tv_shop_name); |
| | | tv_name = convertView |
| | | .findViewById(R.id.tv_movie_title); |
| | | tv_price = convertView.findViewById(R.id.tv_price); |
| | | ll_coupon_bg = convertView.findViewById(R.id.ll_coupon_bg); |
| | | tv_coupon_price = convertView.findViewById(R.id.tv_coupon_price); |
| | | ll_coupon = convertView.findViewById(R.id.ll_coupon); |
| | | ll_recommend_gv = convertView.findViewById(R.id.ll_recommend_gv); |
| | | tv_favourable = convertView.findViewById(R.id.tv_favourable); |
| | | tv_sale_num = convertView.findViewById(R.id.tv_sale_num); |
| | | ll_shop = convertView.findViewById(R.id.ll_shop); |
| | | /* |
| | | 横屏 |
| | | */ |
| | | v_top = convertView.findViewById(R.id.v_top); |
| | | v_top1 = convertView.findViewById(R.id.v_top1); |
| | | v_left = convertView.findViewById(R.id.v_left); |
| | | ll_item1 = convertView.findViewById(R.id.ll_horizontal_item); |
| | | iv_pic1 = convertView |
| | | .findViewById(R.id.iv_movie_cover1); |
| | | .findViewById(R.id.iv_pic); |
| | | |
| | | |
| | | fl_shadow = convertView |
| | | .findViewById(R.id.fl_shadow); |
| | | view_shadow = convertView |
| | | .findViewById(R.id.view_shadow); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | import android.graphics.drawable.Drawable; |
| | | import android.os.Bundle; |
| | | import android.provider.Settings; |
| | | |
| | | import androidx.fragment.app.Fragment; |
| | | import androidx.fragment.app.FragmentManager; |
| | | import androidx.fragment.app.FragmentPagerAdapter; |
| | | import androidx.viewpager.widget.ViewPager; |
| | | |
| | | import android.text.Editable; |
| | | import android.text.TextUtils; |
| | | import android.text.TextWatcher; |
| | |
| | | |
| | | findViewById(R.id.tv_net_setting).setOnClickListener(this); |
| | | findViewById(R.id.tv_refresh).setOnClickListener(this); |
| | | findViewById(R.id.tv_search_result_back).setOnClickListener(this); |
| | | findViewById(R.id.tv_search_result).setOnClickListener(this); |
| | | |
| | | |
| | | tv_search.setOnClickListener(this); |
| | | |
| | | // setHotData(); |
| | |
| | | public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) { |
| | | //点击搜索 或者 完成 并且值不为空 |
| | | if ((arg1 == EditorInfo.IME_ACTION_SEARCH || arg1 == EditorInfo.IME_ACTION_DONE) && !StringUtils.isEmpty(et_search.getText().toString())) { |
| | | mPresenter.addSearchHistory(et_search.getText().toString(), page);//添加搜索记录 |
| | | mPresenter.addSearchResultActivity(et_search.getText().toString(), page);//跳转搜索结果页 |
| | | startSearch(et_search.getText().toString()); |
| | | return true; |
| | | } |
| | | // //点击搜索 或者 完成 并且值为空 提示语不为空 |
| | | else if (et_search != null && et_search.getHint() != null && (arg1 == EditorInfo.IME_ACTION_SEARCH || arg1 == EditorInfo.IME_ACTION_DONE) && !StringUtils.isEmpty(et_search.getHint().toString())) { |
| | | mPresenter.addSearchHistory(et_search.getHint().toString(), page);//添加搜索记录 |
| | | mPresenter.addSearchResultActivity(et_search.getHint().toString(), page);//跳转搜索结果页 |
| | | startSearch(et_search.getHint().toString()); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | private void startSearch(String text) { |
| | | if (text == null) { |
| | | if (et_search.getText() != null && !StringUtils.isNullOrEmpty(et_search.getText().toString())) { |
| | | text = et_search.getText().toString().trim(); |
| | | } |
| | | |
| | | if (text == null) { |
| | | if (et_search.getHint() != null && !StringUtils.isNullOrEmpty(et_search.getHint().toString())) { |
| | | text = et_search.getHint().toString().trim(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | mPresenter.addSearchHistory(text, page);//添加搜索记录 |
| | | mPresenter.addSearchResultActivity(text, page);//跳转搜索结果页 |
| | | } |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | switch (v.getId()) { |
| | | case R.id.tv_search://取消 |
| | | finish(); |
| | | case R.id.tv_search_result_back://取消 |
| | | if (search_tv_list.getVisibility() == View.VISIBLE) { |
| | | search_tv_list.setVisibility(View.GONE); |
| | | } else |
| | | finish(); |
| | | break; |
| | | case R.id.tv_search_result://开始搜索 |
| | | startSearch(null); |
| | | break; |
| | | case R.id.tv_net_setting: |
| | | startActivity(new Intent(Settings.ACTION_SETTINGS)); |
| | |
| | | et_search.setCompoundDrawablesWithIntrinsicBounds(0, 0, |
| | | 0, 0); |
| | | } |
| | | |
| | | et_search.addTextChangedListener(new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | |
| | | import android.content.Intent; |
| | | import android.graphics.Paint; |
| | | import android.graphics.Rect; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.viewpager.widget.ViewPager; |
| | | import androidx.recyclerview.widget.GridLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.text.Layout; |
| | | import android.text.Spannable; |
| | | import android.text.SpannableString; |
| | |
| | | // holder.tv_type.setVisibility(View.VISIBLE); |
| | | // holder.tv_type.setText(comment.getType()); |
| | | // } else { |
| | | holder.tv_type.setVisibility(View.GONE); |
| | | holder.tv_type.setVisibility(View.GONE); |
| | | // } |
| | | |
| | | holder.tv_content.post(new Runnable() { |
| | |
| | | private ImageView iv_in; |
| | | private TextView tv_content; |
| | | private TextView tv_type; |
| | | private LinearLayout ll_content; |
| | | private LinearLayout ll_content; |
| | | private ImageView iv_comment_more; |
| | | |
| | | public CommentViewHolder(View view) { |
| | |
| | | public void onClick(int position); |
| | | } |
| | | |
| | | interface CommentClickListener { |
| | | public interface CommentClickListener { |
| | | //标签点击 |
| | | public void onTagClick(int position); |
| | | |
| | | //复制点击 |
| | | public void onCopyClick(int position); |
| | | } |
| | | |
| | | //adapter中的事件响应 |
| | | public interface AdapterEventActionListener { |
| | | //复制评论 |
| | | public void copyComment(SendCircleContent content, SendCircleCommment comment); |
| | | |
| | | //生成二维码 |
| | | public void createERCode(SendCircleContent content, List<SendCircleImage> imgList, SendCircleImage img, int position); |
| | | |
| | | //分享 |
| | | public void share(SendCircleContent content); |
| | | |
| | | //批量存图 |
| | | public void saveImgs(SendCircleContent content); |
| | | |
| | | //复制推荐语 |
| | | public void copyRecommendText(SendCircleContent content); |
| | | |
| | | public void sendOrder(SendCircleContent content); |
| | | } |
| | | } |
| | |
| | | * 动态--活动 |
| | | */ |
| | | |
| | | public class SendCircleFragmet extends RetainViewFragment implements AdapterEventActionListener, PermissionInterface { |
| | | public class SendCircleFragmet extends RetainViewFragment implements SendCircleAdapter.AdapterEventActionListener, PermissionInterface { |
| | | |
| | | |
| | | private RefreshLayout srl_send_circle; |
| | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 时间添加0 |
| | | * |
| | | * @param time |
| | | * @return |
| | | */ |
| | | private String setTimeSupplement(long time) { |
| | | String t = ""; |
| | | if (time < 10 && time > 0) { |
| | | t = "0" + time; |
| | | } else if (time == 0 || time >= 10) { |
| | | t = "" + time; |
| | | } |
| | | return t; |
| | | } |
| | | |
| | | private void resumeAction() { |
| | | if (actionParams != null) { |
| | |
| | | } |
| | | } |
| | | |
| | | //adapter中的事件响应 |
| | | interface AdapterEventActionListener { |
| | | //复制评论 |
| | | public void copyComment(SendCircleContent content, SendCircleCommment comment); |
| | | |
| | | //生成二维码 |
| | | public void createERCode(SendCircleContent content, List<SendCircleImage> imgList, SendCircleImage img, int position); |
| | | |
| | | //分享 |
| | | public void share(SendCircleContent content); |
| | | |
| | | //批量存图 |
| | | public void saveImgs(SendCircleContent content); |
| | | |
| | | //复制推荐语 |
| | | public void copyRecommendText(SendCircleContent content); |
| | | |
| | | public void sendOrder(SendCircleContent content); |
| | | } |
| | | |
| | | interface IPrePareSuccessListener { |
| | | public void onSuccess(); |
| | |
| | | |
| | | private SendCircleAdapter.CommentClickListener commentClickListener; |
| | | |
| | | Trends2Adapter(Activity context, String cate, List<TrendsInfo> list, SendCircleAdapter.CommentClickListener commentClickListener) { |
| | | public Trends2Adapter(Activity context, String cate, List<TrendsInfo> list, SendCircleAdapter.CommentClickListener commentClickListener) { |
| | | this.mList = list; |
| | | this.cate = cate; |
| | | this.mContext = context; |
New file |
| | |
| | | package com.tejia.lijin.app.util; |
| | | |
| | | import android.app.Dialog; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.net.Uri; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | |
| | | import com.kepler.jd.Listener.OpenAppAction; |
| | | import com.kepler.jd.login.KeplerApiManager; |
| | | import com.kepler.jd.sdk.bean.KeplerAttachParameter; |
| | | import com.tejia.lijin.app.entity.common.GoodsConvertLinkJumpLink; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.downutil.StringUtils; |
| | | |
| | | /** |
| | | * 去购买的跳转链接 |
| | | */ |
| | | public class GoodsBuyJumpUtil { |
| | | |
| | | public static void jumpPDD(Context context, GoodsConvertLinkJumpLink link) { |
| | | if (context == null) |
| | | return; |
| | | if (link == null) |
| | | return; |
| | | |
| | | //先检查是否安装了pddAPP |
| | | if (ApkUtil.checkAPP(context, "com.xunmeng.pinduoduo") && !StringUtils.isNullOrEmpty(link.getNativeJumpLink())) { |
| | | String goodsUrl = link.getNativeJumpLink(); |
| | | Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(goodsUrl)); |
| | | context.startActivity(intent); |
| | | return; |
| | | } |
| | | //然后检查是否安装了微信 |
| | | if (link.getWxxcxJumpInfo() != null) { |
| | | try { |
| | | WXUtil.jumpWXXCX(context, link.getWxxcxJumpInfo().getUserName(), link.getWxxcxJumpInfo().getPath()); |
| | | return; |
| | | } catch (Exception e) { |
| | | //最后跳转网页 |
| | | Intent intent = new Intent(context, ShareBrowserActivity.class); |
| | | intent.putExtra("url", link.getJumpLink()); |
| | | context.startActivity(intent); |
| | | } |
| | | } |
| | | |
| | | //最后跳转网页 |
| | | Intent intent = new Intent(context, ShareBrowserActivity.class); |
| | | intent.putExtra("url", link.getJumpLink()); |
| | | context.startActivity(intent); |
| | | } |
| | | |
| | | |
| | | public static void jumpJD(final View view, final Dialog dialog, GoodsConvertLinkJumpLink link) { |
| | | if (view == null) |
| | | return; |
| | | if (link == null) |
| | | return; |
| | | |
| | | Context context = view.getContext(); |
| | | |
| | | OpenAppAction mOpenAppAction = new OpenAppAction() { |
| | | @Override |
| | | public void onStatus(final int status, final String url) { |
| | | view.post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if (status == OpenAppAction.OpenAppAction_result_APP) { |
| | | //呼京东成功 |
| | | Log.e("mResult", "呼京东成功"); |
| | | dialog.dismiss(); |
| | | } else if (status == OpenAppAction.OpenAppAction_start) { |
| | | //开始状态未必一定执行, |
| | | Log.e("mResult", "开始呼起京东"); |
| | | } else { |
| | | //唤起京东失败 |
| | | Log.e("mResult", "唤起京东失败" + status); |
| | | Intent intent = new Intent(view.getContext(), ShareBrowserActivity.class); |
| | | intent.putExtra("url", url); |
| | | intent.putExtra("interceptGoodsDetail", false); |
| | | view.getContext().startActivity(intent); |
| | | dialog.dismiss(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | try { |
| | | |
| | | if (link.is_native() && !StringUtils.isNullOrEmpty(link.getNativeJumpLink())&&ApkUtil.checkAPP(context, "com.jingdong.app.mall")) { |
| | | KeplerApiManager.getWebViewService().openAppWebViewPage(context, link.getNativeJumpLink(), new KeplerAttachParameter(), mOpenAppAction); |
| | | return; |
| | | } |
| | | |
| | | if (link.getWxxcxJumpInfo() != null) { |
| | | try { |
| | | WXUtil.jumpWXXCX(context, link.getWxxcxJumpInfo().getUserName(), link.getWxxcxJumpInfo().getPath()); |
| | | return; |
| | | } catch (Exception e) { |
| | | //最后跳转网页 |
| | | Intent intent = new Intent(context, ShareBrowserActivity.class); |
| | | intent.putExtra("url", link.getJumpLink()); |
| | | intent.putExtra("interceptGoodsDetail", false); |
| | | context.startActivity(intent); |
| | | } |
| | | } |
| | | |
| | | |
| | | Intent intent = new Intent(context, ShareBrowserActivity.class); |
| | | intent.putExtra("url", link.getJumpLink()); |
| | | intent.putExtra("interceptGoodsDetail", false); |
| | | context.startActivity(intent); |
| | | } finally { |
| | | if (dialog != null && dialog.isShowing()) |
| | | dialog.dismiss(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public static void jumpVIPShop(Context context, GoodsConvertLinkJumpLink link) { |
| | | if (context == null) |
| | | return; |
| | | if (link == null) |
| | | return; |
| | | |
| | | |
| | | if (link.is_native() && !com.wpc.library.util.common.StringUtils.isEmpty(link.getNativeJumpLink()) && ApkUtil.checkAPP(context, "com.achievo.vipshop")) { |
| | | Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(link.getNativeJumpLink())); |
| | | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | context.startActivity(intent); |
| | | return; |
| | | } |
| | | |
| | | if (link.getWxxcxJumpInfo() != null) { |
| | | try { |
| | | WXUtil.jumpWXXCX(context, link.getWxxcxJumpInfo().getUserName(), link.getWxxcxJumpInfo().getPath()); |
| | | } catch (Exception e) { |
| | | //最后跳转网页 |
| | | Intent intent = new Intent(context, ShareBrowserActivity.class); |
| | | intent.putExtra("url", link.getJumpLink()); |
| | | intent.putExtra("interceptGoodsDetail", false); |
| | | context.startActivity(intent); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | Intent intent = new Intent(context, ShareBrowserActivity.class); |
| | | intent.putExtra("url", link.getJumpLink()); |
| | | intent.putExtra("interceptGoodsDetail", false); |
| | | context.startActivity(intent); |
| | | } |
| | | |
| | | |
| | | |
| | | public static void jumpSuning(Context context, GoodsConvertLinkJumpLink link) { |
| | | if (context == null) |
| | | return; |
| | | if (link == null) |
| | | return; |
| | | |
| | | |
| | | if (link.is_native() && !com.wpc.library.util.common.StringUtils.isEmpty(link.getNativeJumpLink()) && ApkUtil.checkAPP(context, "com.suning.mobile.ebuy")) { |
| | | Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(link.getNativeJumpLink())); |
| | | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | context.startActivity(intent); |
| | | return; |
| | | } |
| | | |
| | | if (link.getWxxcxJumpInfo() != null) { |
| | | try { |
| | | WXUtil.jumpWXXCX(context, link.getWxxcxJumpInfo().getUserName(), link.getWxxcxJumpInfo().getPath()); |
| | | } catch (Exception e) { |
| | | //最后跳转网页 |
| | | Intent intent = new Intent(context, ShareBrowserActivity.class); |
| | | intent.putExtra("url", link.getJumpLink()); |
| | | intent.putExtra("interceptGoodsDetail", false); |
| | | context.startActivity(intent); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | Intent intent = new Intent(context, ShareBrowserActivity.class); |
| | | intent.putExtra("url", link.getJumpLink()); |
| | | intent.putExtra("interceptGoodsDetail", false); |
| | | context.startActivity(intent); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import android.app.Activity; |
| | | import android.graphics.Color; |
| | | import android.os.Build; |
| | | import android.os.Environment; |
| | | import android.text.TextUtils; |
| | | import android.view.View; |
| | | import android.view.Window; |
| | | import android.view.WindowManager; |
| | |
| | | |
| | | import com.tejia.lijin.app.R; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.lang.reflect.Field; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Properties; |
| | | |
| | | /** |
| | | * Created by weikou2015 on 2018/9/13. |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改状态栏文字颜色,这里小米,魅族区别对待。 |
| | | */ |
| | | public static void setLightStatusBar(final Activity activity, final boolean dark) { |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { |
| | | switch (RomUtils.getLightStatusBarAvailableRomType()) { |
| | | case RomUtils.AvailableRomType.MIUI: |
| | | MIUISetStatusBarLightMode(activity, dark); |
| | | break; |
| | | |
| | | case RomUtils.AvailableRomType.FLYME: |
| | | setFlymeLightStatusBar(activity, dark); |
| | | |
| | | break; |
| | | |
| | | case RomUtils.AvailableRomType.ANDROID_NATIVE: |
| | | setAndroidNativeLightStatusBar(activity, dark); |
| | | break; |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public static boolean MIUISetStatusBarLightMode(Activity activity, boolean dark) { |
| | | boolean result = false; |
| | | Window window = activity.getWindow(); |
| | | if (window != null) { |
| | | Class clazz = window.getClass(); |
| | | try { |
| | | int darkModeFlag = 0; |
| | | Class layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams"); |
| | | Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE"); |
| | | darkModeFlag = field.getInt(layoutParams); |
| | | Method extraFlagField = clazz.getMethod("setExtraFlags", int.class, int.class); |
| | | if (dark) { |
| | | extraFlagField.invoke(window, darkModeFlag, darkModeFlag);//状态栏透明且黑色字体 |
| | | } else { |
| | | extraFlagField.invoke(window, 0, darkModeFlag);//清除黑色字体 |
| | | } |
| | | result = true; |
| | | |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && RomUtils.isMiUIV7OrAbove()) { |
| | | //开发版 7.7.13 及以后版本采用了系统API,旧方法无效但不会报错,所以两个方式都要加上 |
| | | if (dark) { |
| | | activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); |
| | | } else { |
| | | activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | private static boolean setFlymeLightStatusBar(Activity activity, boolean dark) { |
| | | boolean result = false; |
| | | if (activity != null) { |
| | | try { |
| | | WindowManager.LayoutParams lp = activity.getWindow().getAttributes(); |
| | | Field darkFlag = WindowManager.LayoutParams.class |
| | | .getDeclaredField("MEIZU_FLAG_DARK_STATUS_BAR_ICON"); |
| | | Field meizuFlags = WindowManager.LayoutParams.class |
| | | .getDeclaredField("meizuFlags"); |
| | | darkFlag.setAccessible(true); |
| | | meizuFlags.setAccessible(true); |
| | | int bit = darkFlag.getInt(null); |
| | | int value = meizuFlags.getInt(lp); |
| | | if (dark) { |
| | | value |= bit; |
| | | } else { |
| | | value &= ~bit; |
| | | } |
| | | meizuFlags.setInt(lp, value); |
| | | activity.getWindow().setAttributes(lp); |
| | | result = true; |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | private static void setAndroidNativeLightStatusBar(Activity activity, boolean dark) { |
| | | View decor = activity.getWindow().getDecorView(); |
| | | if (dark) { |
| | | decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); |
| | | } else { |
| | | decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); |
| | | } |
| | | } |
| | | |
| | | public static class RomUtils { |
| | | class AvailableRomType { |
| | | public static final int MIUI = 1; |
| | | public static final int FLYME = 2; |
| | | public static final int ANDROID_NATIVE = 3; |
| | | public static final int NA = 4; |
| | | } |
| | | |
| | | public static int getLightStatusBarAvailableRomType() { |
| | | //开发版 7.7.13 及以后版本采用了系统API,旧方法无效但不会报错 |
| | | if (isMiUIV7OrAbove()) { |
| | | return AvailableRomType.ANDROID_NATIVE; |
| | | } |
| | | |
| | | if (isMiUIV6OrAbove()) { |
| | | return AvailableRomType.MIUI; |
| | | } |
| | | |
| | | if (isFlymeV4OrAbove()) { |
| | | return AvailableRomType.FLYME; |
| | | } |
| | | |
| | | if (isAndroidMOrAbove()) { |
| | | return AvailableRomType.ANDROID_NATIVE; |
| | | } |
| | | |
| | | return AvailableRomType.NA; |
| | | } |
| | | |
| | | //Flyme V4的displayId格式为 [Flyme OS 4.x.x.xA] |
| | | //Flyme V5的displayId格式为 [Flyme 5.x.x.x beta] |
| | | private static boolean isFlymeV4OrAbove() { |
| | | String displayId = Build.DISPLAY; |
| | | if (!TextUtils.isEmpty(displayId) && displayId.contains("Flyme")) { |
| | | String[] displayIdArray = displayId.split(" "); |
| | | for (String temp : displayIdArray) { |
| | | //版本号4以上,形如4.x. |
| | | if (temp.matches("^[4-9]\\.(\\d+\\.)+\\S*")) { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | //Android Api 23以上 |
| | | private static boolean isAndroidMOrAbove() { |
| | | return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; |
| | | } |
| | | |
| | | private static final String KEY_MIUI_VERSION_CODE = "ro.miui.ui.version.code"; |
| | | |
| | | private static boolean isMiUIV6OrAbove() { |
| | | try { |
| | | final Properties properties = new Properties(); |
| | | properties.load(new FileInputStream(new File(Environment.getRootDirectory(), "build.prop"))); |
| | | String uiCode = properties.getProperty(KEY_MIUI_VERSION_CODE, null); |
| | | if (uiCode != null) { |
| | | int code = Integer.parseInt(uiCode); |
| | | return code >= 4; |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | } catch (final Exception e) { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | static boolean isMiUIV7OrAbove() { |
| | | try { |
| | | final Properties properties = new Properties(); |
| | | properties.load(new FileInputStream(new File(Environment.getRootDirectory(), "build.prop"))); |
| | | String uiCode = properties.getProperty(KEY_MIUI_VERSION_CODE, null); |
| | | if (uiCode != null) { |
| | | int code = Integer.parseInt(uiCode); |
| | | return code >= 5; |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | } catch (final Exception e) { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | public static void setGoodsDetail(Context mContext, TaoBaoGoodsBrief info, GoodsRightViewHolder viewHolder) { |
| | | |
| | | viewHolder.tv_sale_num2.setVisibility(View.GONE); |
| | | |
| | | if (viewHolder.ll_labels.getChildCount() > 0) { |
| | | viewHolder.ll_labels.removeAllViews(); |
| | | } |
| | |
| | | viewHolder.ll_labels.setVisibility(View.GONE); |
| | | } |
| | | |
| | | ImageUtil.showImageFace(mContext, info.getTitle(), info.getShopType(), viewHolder.tv_name1); |
| | | viewHolder.tv_normal_price1.setText("¥" + info.getZkPrice()); |
| | | viewHolder.tv_normal_price1.setPaintFlags(viewHolder.tv_normal_price1.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); |
| | | ImageUtil.showImageFace(mContext, info.getTitle(), info.getShopType(), viewHolder.tv_name); |
| | | viewHolder.tv_price.setText("¥" + info.getZkPrice()); |
| | | viewHolder.tv_price.setPaintFlags(viewHolder.tv_price.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); |
| | | |
| | | if (info.getGoodsType() != Constant.GOODS_TYPE_VIP) { |
| | | viewHolder.tv_sale_num1.setText(info.getSalesType() == 1 ? "月销 " + info.getSalesCount() : |
| | | viewHolder.tv_sale_num.setText(info.getSalesType() == 1 ? "月销 " + info.getSalesCount() : |
| | | info.getSalesType() == 2 ? "2小时销量 " + info.getSalesCount() : info.getSalesType() == 3 ? |
| | | "今日销量 " + info.getSalesCount() : "总销量 " + info.getSalesCount()); |
| | | viewHolder.ll_discount.setVisibility(View.GONE); |
| | | viewHolder.tv_discount.setText(""); |
| | | } else { |
| | | viewHolder.tv_sale_num1.setText(""); |
| | | viewHolder.ll_discount.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_discount.setText(info.getDiscount() + ""); |
| | | viewHolder.tv_sale_num.setText(""); |
| | | } |
| | | |
| | | info.setShopInfo(null); |
| | | // info.setShopInfo(null); |
| | | if (info.getShopInfo() != null) { |
| | | viewHolder.ll_shop1.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_shop_name1.setText(info.getShopInfo().getShopName()); |
| | | viewHolder.tv_shop_name.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_shop_name.setText(info.getShopInfo().getShopName()); |
| | | } else { |
| | | viewHolder.ll_shop1.setVisibility(View.GONE); |
| | | viewHolder.tv_shop_name.setVisibility(View.GONE); |
| | | } |
| | | viewHolder.tv_price1.setTextColor(mContext.getResources().getColor(R.color.theme)); |
| | | |
| | | viewHolder.tv_favourable1.setText((info.getMoneyInfo().getMoneyType() == 1 ? "返1 " : "奖 ") + info.getMoneyInfo().getFanliMoney()); |
| | | viewHolder.tv_favourable1.setVisibility(View.GONE); |
| | | //返利 |
| | | if (info.getMoneyInfo().getFanliMoney() != null) { |
| | | viewHolder.tv_fanli_amount.setText("-" + info.getMoneyInfo().getFanliMoney()); |
| | | viewHolder.tv_fanli_amount.setVisibility(View.VISIBLE); |
| | | } else { |
| | | viewHolder.tv_fanli_amount.setVisibility(View.GONE); |
| | | } |
| | | |
| | | String disCount; |
| | | if (info.isHasCoupon()) { |
| | | disCount = "¥ " + info.getCouponPrice(); |
| | | viewHolder.ll_coupon_bg1.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_coupon_price1.setText("¥ " + info.getCouponInfo().getAmount()); |
| | | viewHolder.tv_coupon_amount.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_coupon_amount.setText("-¥ " + info.getCouponInfo().getAmount()); |
| | | } else { |
| | | if (info.getGoodsType() == Constant.GOODS_TYPE_VIP) { |
| | | disCount = "¥ " + info.getCouponPrice(); |
| | | } else |
| | | disCount = "¥ " + info.getZkPrice(); |
| | | viewHolder.ll_coupon_bg1.setVisibility(View.GONE); |
| | | viewHolder.tv_coupon_amount.setVisibility(View.GONE); |
| | | } |
| | | Spannable span = new SpannableString(disCount); |
| | | span.setSpan(new RelativeSizeSpan(1.4f), 1, disCount.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | span.setSpan(new StyleSpan(Typeface.BOLD), 1, disCount.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | viewHolder.tv_price1.setText(span); |
| | | |
| | | viewHolder.tv_sale_num1.setTextColor((info.getSalesType() == 1 || info.getSalesType() == 4) ? |
| | | int startIndex = disCount.indexOf("."); |
| | | if (startIndex > -1) { |
| | | viewHolder.tv_actual_price1.setText(disCount.substring(0, startIndex + 1)); |
| | | viewHolder.tv_actual_price2.setText(disCount.substring(startIndex + 1)); |
| | | } else { |
| | | viewHolder.tv_actual_price2.setText(""); |
| | | viewHolder.tv_actual_price1.setText(disCount); |
| | | } |
| | | viewHolder.tv_sale_num.setTextColor((info.getSalesType() == 1 || info.getSalesType() == 4) ? |
| | | mContext.getResources().getColor(R.color.gray5) : info.getSalesType() == 2 ? |
| | | mContext.getResources().getColor(R.color.goods_sale_num_text_color_orange) : |
| | | mContext.getResources().getColor(R.color.goods_sale_num_text_color_blue)); |
| | |
| | | package com.tejia.lijin.app.util.ui; |
| | | |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.view.View; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.TextView; |
| | |
| | | import com.tejia.lijin.app.R; |
| | | |
| | | public class GoodsRightViewHolder extends RecyclerView.ViewHolder { |
| | | public LinearLayout ll_discount; |
| | | |
| | | public TextView tv_name; |
| | | public TextView tv_shop_name; |
| | | public TextView tv_sale_num; |
| | | public LinearLayout ll_labels; |
| | | public LinearLayout ll_coupon_bg1; |
| | | public TextView tv_name1; |
| | | public TextView tv_price1; |
| | | public TextView tv_coupon_price1; |
| | | public TextView tv_shop_name1; |
| | | public LinearLayout ll_shop1; |
| | | public TextView tv_normal_price1; |
| | | public TextView tv_favourable1;//红包,券后价 |
| | | public TextView tv_sale_num1; |
| | | public TextView tv_sale_num2; |
| | | public TextView tv_discount; |
| | | public TextView tv_coupon_amount; |
| | | public TextView tv_fanli_amount; |
| | | public TextView tv_hongbao_amount; |
| | | public TextView tv_price; |
| | | public TextView tv_actual_price1,tv_actual_price2; |
| | | |
| | | |
| | | public GoodsRightViewHolder(View convertView) { |
| | | super(convertView); |
| | | ll_labels = convertView.findViewById(R.id.ll_labels); |
| | | ll_coupon_bg1 = convertView.findViewById(R.id.ll_coupon_bg1); |
| | | |
| | | tv_normal_price1 = convertView |
| | | .findViewById(R.id.tv_normal_price1); |
| | | tv_shop_name1 = convertView |
| | | .findViewById(R.id.tv_shop_name1); |
| | | tv_name1 = convertView |
| | | .findViewById(R.id.tv_movie_title1); |
| | | tv_price1 = convertView.findViewById(R.id.tv_price1); |
| | | tv_coupon_price1 = convertView.findViewById(R.id.tv_coupon_price1); |
| | | tv_favourable1 = convertView.findViewById(R.id.tv_favourable1); |
| | | tv_sale_num1 = convertView.findViewById(R.id.tv_sale_num1); |
| | | tv_sale_num2 = convertView.findViewById(R.id.tv_sale_num2); |
| | | ll_shop1 = convertView.findViewById(R.id.ll_shop1); |
| | | ll_discount = convertView.findViewById(R.id.ll_discount_new); |
| | | tv_discount = convertView.findViewById(R.id.tv_discount_new); |
| | | tv_name = convertView.findViewById(R.id.tv_name); |
| | | tv_shop_name = convertView |
| | | .findViewById(R.id.tv_shop_name); |
| | | tv_sale_num = convertView |
| | | .findViewById(R.id.tv_sale_num); |
| | | tv_coupon_amount = convertView |
| | | .findViewById(R.id.tv_coupon_amount); |
| | | tv_fanli_amount = convertView.findViewById(R.id.tv_fanli_amount); |
| | | tv_hongbao_amount = convertView.findViewById(R.id.tv_hongbao_amount); |
| | | tv_price = convertView.findViewById(R.id.tv_price); |
| | | tv_actual_price1 = convertView.findViewById(R.id.tv_actual_price1); |
| | | tv_actual_price2 = convertView.findViewById(R.id.tv_actual_price2); |
| | | } |
| | | } |
| | |
| | | package com.tejia.lijin.app.util.ui; |
| | | |
| | | import android.content.Context; |
| | | import android.graphics.Color; |
| | | import android.graphics.drawable.GradientDrawable; |
| | | |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | |
| | | public class HomeUIUtil { |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取圆形专题背景 |
| | | * |
| | | * @param bgColor |
| | | * @return |
| | | */ |
| | | public static GradientDrawable getCircleSpecialBg(Context context, String bgColor) { |
| | | GradientDrawable gd = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, |
| | | new int[]{Color.parseColor(bgColor), Color.parseColor(bgColor)}); |
| | | gd.setCornerRadius(DimenUtils.dip2px(context, 20)); |
| | | return gd; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.tejia.lijin.app.ui.mine.ActivationInviteCodeAcitvity; |
| | | import com.tejia.lijin.app.ui.mine.LoginActivity; |
| | | import com.tejia.lijin.app.ui.mine.LoginSelectActivity; |
| | | import com.tejia.lijin.app.util.downutil.StringUtils; |
| | | |
| | | import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; |
| | |
| | | public static boolean acessNext(Context context, String uid, boolean mustLogin) { |
| | | |
| | | if (mustLogin && (StringUtils.isNullOrEmpty(uid) || "0".equalsIgnoreCase(uid))) { |
| | | context.startActivity(new Intent(context, LoginActivity.class).setFlags(FLAG_ACTIVITY_NEW_TASK)); |
| | | context.startActivity(new Intent(context, LoginSelectActivity.class).setFlags(FLAG_ACTIVITY_NEW_TASK)); |
| | | return false; |
| | | } |
| | | |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ui.mine.LoginSelectActivity; |
| | | import com.xiaomi.mipush.sdk.MiPushClient; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.UserInfo; |
| | |
| | | |
| | | |
| | | public static void jumpLogin(Context context) { |
| | | context.startActivity(new Intent(context, LoginActivity.class)); |
| | | context.startActivity(new Intent(context, LoginSelectActivity.class)); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <item android:drawable="@drawable/ic_nav_better_goods_highlight" android:state_checked="true"></item> |
| | | <item android:drawable="@drawable/ic_nav_better_goods" android:state_checked="false"></item> |
| | | |
| | | </selector> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <solid android:color="@color/theme_bg" /> |
| | | <solid android:color="#FFF8DA" /> |
| | | |
| | | <corners |
| | | android:bottomLeftRadius="10dp" |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <corners android:radius="10dp" /> |
| | | <solid android:color="@color/gray" /> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:shape="oval"> |
| | | <size |
| | | android:width="6dp" |
| | | android:height="6dp"></size> |
| | | |
| | | <solid android:color="#80FFFFFF"></solid> |
| | | |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:shape="oval"> |
| | | |
| | | <solid android:color="#FFFFFF"></solid> |
| | | <size android:width="6dp" android:height="6dp"></size> |
| | | |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <solid android:color="#FF2B4B" /> |
| | | <corners android:radius="50dp" /> |
| | | |
| | | <size |
| | | android:width="96dp" |
| | | android:height="96dp"></size> |
| | | |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <solid android:color="#fff3f3f3" /> |
| | | <corners android:radius="30dp" /> |
| | | |
| | | </shape> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <corners android:radius="20dp" /> |
| | | <corners android:radius="8dp" /> |
| | | |
| | | <solid android:color="@color/white"></solid> |
| | | |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <corners android:radius="20dp" /> |
| | | <stroke |
| | | android:width="3dp" |
| | | android:color="@color/theme" /> |
| | | <solid android:color="@color/white"></solid> |
| | | <solid android:color="#fffff8da" /> |
| | | <corners |
| | | android:bottomLeftRadius="8dp" |
| | | android:bottomRightRadius="8dp" |
| | | android:topLeftRadius="8dp" |
| | | android:topRightRadius="8dp" /> |
| | | |
| | | |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | |
| | | > |
| | | |
| | | <solid android:color="#ffffe762" /> |
| | | <corners android:radius="20dp" /> |
| | | <padding |
| | | android:bottom="1dp" |
| | | android:left="3.5dp" |
| | | android:right="3.5dp" |
| | | android:top="1dp"></padding> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:shape="rectangle"> |
| | | <solid android:color="#F3F3F3" /> |
| | | <corners android:radius="30dp" /> |
| | | |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:shape="rectangle"> |
| | | <padding |
| | | android:bottom="7dp" |
| | | android:left="12dp" |
| | | android:right="12dp" |
| | | android:top="7dp"></padding> |
| | | |
| | | <solid android:color="#ffffffff" /> |
| | | <stroke |
| | | android:width="1dp" |
| | | android:color="#59cecece" /> |
| | | <corners android:radius="20dp" /> |
| | | |
| | | |
| | | |
| | | |
| | | </shape> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | |
| | | <include layout="@layout/item_status_bar" /> |
| | | <FrameLayout |
| | | android:id="@+id/fl_main_fragment_container" |
| | | |
| | | <RelativeLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_above="@+id/trends_goods_lin" /> |
| | | |
| | | <View |
| | | android:id="@+id/trends_goods_lin" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_above="@+id/fl_bottom" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <include layout="@layout/navigation_bottom_bar" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/actionButton_img" |
| | | android:layout_width="120dp" |
| | | android:layout_height="120dp" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_alignParentBottom="true" |
| | | android:background="@drawable/ic_suspension" |
| | | android:visibility="invisible" /> |
| | | |
| | | <com.tejia.lijin.app.util.DragFloatActionButton |
| | | android:id="@+id/actionButton" |
| | | android:layout_width="68dp" |
| | | android:layout_height="68dp" |
| | | android:layout_alignParentTop="true" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_marginTop="110dp" |
| | | android:background="@drawable/ic_shopping" |
| | | android:visibility="invisible" /> |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1"> |
| | | |
| | | |
| | | </RelativeLayout> |
| | | <FrameLayout |
| | | android:id="@+id/fl_main_fragment_container" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_above="@+id/trends_goods_lin" /> |
| | | |
| | | <View |
| | | android:id="@+id/trends_goods_lin" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_above="@+id/fl_bottom" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <include layout="@layout/navigation_bottom_bar" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/actionButton_img" |
| | | android:layout_width="120dp" |
| | | android:layout_height="120dp" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_alignParentBottom="true" |
| | | android:background="@drawable/ic_suspension" |
| | | android:visibility="invisible" /> |
| | | |
| | | <com.tejia.lijin.app.util.DragFloatActionButton |
| | | android:id="@+id/actionButton" |
| | | android:layout_width="68dp" |
| | | android:layout_height="68dp" |
| | | android:layout_alignParentTop="true" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_marginTop="110dp" |
| | | android:background="@drawable/ic_shopping" |
| | | android:visibility="invisible" /> |
| | | |
| | | </RelativeLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | |
| | | <!-- <include--> |
| | | <!-- android:id="@+id/include_status_bar"--> |
| | | <!-- layout="@layout/item_status_bar_mvvm" />--> |
| | | <!-- <include--> |
| | | <!-- android:id="@+id/include_status_bar"--> |
| | | <!-- layout="@layout/item_status_bar_mvvm" />--> |
| | | |
| | | <include layout="@layout/item_status_bar" /> |
| | | |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_portrait" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:layout_marginTop="12dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="12dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_info_portrait" |
| | | android:layout_width="26dp" |
| | | android:layout_height="36dp" |
| | | android:layout_width="50dp" |
| | | android:layout_height="50dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="10dp" |
| | | bind:portraitUrl="@{userInfo.portrait}" /> |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_nickname" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_sex" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_uid" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center_vertical" |
| | | android:text="ID" |
| | | android:text="账号ID" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="16sp" /> |
| | | |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_fans" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:visibility="gone" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/trends_goods_bg" /> |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_invite_code" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:visibility="gone" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | </LinearLayout> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:layout_marginTop="12dp" |
| | | android:id="@+id/ll_info_vip" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | android:id="@+id/ll_info_tbaccount" |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="12dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:drawableLeft="@drawable/icon_my_info_tb" |
| | | android:drawablePadding="13dp" |
| | | android:gravity="center_vertical" |
| | | android:text="超级会员" |
| | | android:text="淘宝授权" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="16sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_info_vip" |
| | | android:id="@+id/tv_info_tbaccount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginRight="10dp" |
| | | android:gravity="center_vertical" |
| | | android:text="立即升级" /> |
| | | android:gravity="center_vertical" /> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | |
| | | android:layout_marginRight="20dp" |
| | | android:src="@mipmap/ic_input" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_vip_action" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:visibility="gone" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | android:id="@+id/ll_info_pdd_buy" |
| | | style="@style/myInfoItemStyle"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_vip_action_name" |
| | | android:drawableLeft="@drawable/icon_my_info_pdd" |
| | | android:drawablePadding="13dp" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center_vertical" |
| | | android:text="超级管理" |
| | | android:text="拼多多自购备案" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="16sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_vip_action_content" |
| | | android:id="@+id/tv_info_pdd_buy" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginRight="10dp" |
| | | android:gravity="center_vertical" |
| | | android:text="" /> |
| | | android:gravity="center_vertical" /> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | |
| | | android:layout_marginRight="20dp" |
| | | android:src="@mipmap/ic_input" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_relative_mobile" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:layout_marginTop="12dp" |
| | | android:background="@color/white" |
| | | android:visibility="gone" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="12dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:drawableLeft="@drawable/icon_my_info_mobile" |
| | | android:drawablePadding="13dp" |
| | | android:gravity="center_vertical" |
| | | android:text="手机号" |
| | | android:textColor="@color/text_black_1" |
| | |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:id="@+id/ll_info_wchat_num" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center_vertical" |
| | | android:text="微信号" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="16sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_info_wchat_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginRight="10dp" |
| | | android:gravity="center_vertical" |
| | | android:text='@{userInfo.weiXin==null?@string/no_add:userInfo.weiXin}' /> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="5dp" |
| | | android:layout_marginRight="20dp" |
| | | android:src="@mipmap/ic_input" /> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_tbaccount" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:drawablePadding="8dp" |
| | | android:gravity="center_vertical" |
| | | android:text="淘宝授权" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="16sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_info_tbaccount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginRight="10dp" |
| | | android:gravity="center_vertical" /> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="5dp" |
| | | android:layout_marginRight="20dp" |
| | | android:src="@mipmap/ic_input" /> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_relative_qq" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | style="@style/myInfoItemStyle" |
| | | android:visibility="visible"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:drawableLeft="@drawable/icon_my_info_qq" |
| | | android:drawablePadding="13dp" |
| | | android:gravity="center_vertical" |
| | | android:text="QQ账号" /> |
| | | android:text="QQ" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="16sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_info_relative_qq" |
| | |
| | | android:src="@mipmap/ic_input" /> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_relative_wechat" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:visibility="gone" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:drawableLeft="@drawable/icon_my_info_wx" |
| | | android:drawablePadding="13dp" |
| | | android:gravity="center_vertical" |
| | | android:text="微信授权" |
| | | android:text="微信" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="16sp" /> |
| | | |
| | |
| | | android:layout_marginRight="20dp" |
| | | android:src="@mipmap/ic_input" /> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_pdd_share" |
| | | style="@style/myInfoItemStyle" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center_vertical" |
| | | android:text="拼多多分享备案" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="16sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_info_pdd_share" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginRight="10dp" |
| | | android:gravity="center_vertical" /> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="5dp" |
| | | android:layout_marginRight="20dp" |
| | | android:src="@mipmap/ic_input" /> |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | | |
| | | |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="35dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:background="@drawable/shape_search" |
| | | android:background="@drawable/shape_search_order" |
| | | android:completionThreshold="1" |
| | | android:gravity="center_vertical" |
| | | android:hint=" 输入订单号或商品关键词" |
| | |
| | | android:paddingLeft="35dp" |
| | | android:paddingRight="8dp" |
| | | android:singleLine="true" |
| | | android:textColor="#A1A1A1" |
| | | android:textSize="14sp" /> |
| | | |
| | | <ImageView |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="15dp" |
| | | android:src="@drawable/ic_recommend_search" /> |
| | | android:src="@drawable/icon_search_gray" /> |
| | | </FrameLayout> |
| | | |
| | | </LinearLayout> |
| | |
| | | android:visibility="gone" /> |
| | | |
| | | <ImageView |
| | | android:visibility="gone" |
| | | android:id="@+id/iv_three_red_point" |
| | | android:layout_width="25dp" |
| | | android:layout_height="25dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="15dp" |
| | | android:layout_marginRight="15dp" |
| | | android:src="@drawable/ic_three_red_point" /> |
| | | android:src="@drawable/ic_three_red_point" |
| | | android:visibility="gone" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="40dp" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal"> |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_all_order" |
| | |
| | | </FrameLayout> |
| | | |
| | | <FrameLayout |
| | | android:visibility="gone" |
| | | android:id="@+id/fl_order_filter" |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1"> |
| | | android:layout_weight="1" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_order_filter" |
| | |
| | | |
| | | <include layout="@layout/navigation_top_bar" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:background="@color/page_bg_color"></View> |
| | | |
| | | |
| | | <RelativeLayout |
| | | android:layout_width="match_parent" |
| | |
| | | android:id="@+id/orderappeal_tab" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" /> |
| | | android:background="@color/white" |
| | | android:visibility="gone" /> |
| | | |
| | | <View |
| | | android:id="@+id/orderappeal_tabline" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0.5dp" |
| | | android:layout_below="@+id/orderappeal_tab" |
| | | android:background="#EBEBEB" /> |
| | | android:background="#EBEBEB" |
| | | android:visibility="gone" /> |
| | | |
| | | <androidx.viewpager.widget.ViewPager |
| | | |
| | |
| | | android:layout_weight="1"> |
| | | |
| | | <AutoCompleteTextView |
| | | android:textCursorDrawable="@drawable/shape_input_cursor" |
| | | android:id="@+id/et_search" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="35dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:background="@drawable/shape_search" |
| | | android:background="@drawable/shape_search_order" |
| | | android:completionThreshold="1" |
| | | android:hint=" 输入订单号或商品关键词" |
| | | android:imeOptions="actionSearch" |
| | |
| | | android:paddingLeft="45dp" |
| | | android:paddingRight="5dp" |
| | | android:singleLine="true" |
| | | android:textColor="#A1A1A1" |
| | | android:textCursorDrawable="@drawable/shape_input_cursor" |
| | | android:textSize="14sp" /> |
| | | |
| | | <ImageView |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:src="@drawable/ic_recommend_search" /> |
| | | android:src="@drawable/icon_search_gray" /> |
| | | </FrameLayout> |
| | | |
| | | <TextView |
| | |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_marginTop="4dp" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_marginTop="4dp" |
| | | android:background="#dddddd"></View> |
| | | |
| | | <ScrollView |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:text="历史搜索" |
| | | android:textColor="@color/gray2" /> |
| | | android:textColor="@color/search_title_text_color" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_clear_history" |
| | |
| | | </LinearLayout> |
| | | |
| | | |
| | | <com.wpc.library.widget.MyListView |
| | | android:id="@+id/lv_search_history" |
| | | <com.tejia.lijin.app.util.FlowLayout |
| | | android:id="@+id/fl_search_history" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginTop="16dp" |
| | | android:layout_marginRight="15dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:background="@color/white" |
| | | android:divider="@color/white" |
| | | android:dividerHeight="1dp"></com.wpc.library.widget.MyListView> |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="8dp" |
| | | android:layout_marginRight="8dp"></com.tejia.lijin.app.util.FlowLayout> |
| | | |
| | | </LinearLayout> |
| | | </ScrollView> |
| | |
| | | android:layout_weight="1"> |
| | | |
| | | <AutoCompleteTextView |
| | | android:textCursorDrawable="@drawable/shape_input_cursor" |
| | | android:id="@+id/et_search" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="30dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:background="@drawable/shape_search" |
| | | android:background="@drawable/shape_search_order" |
| | | android:completionThreshold="1" |
| | | android:hint="搜索:输入订单号" |
| | | android:imeOptions="actionSearch" |
| | |
| | | android:paddingLeft="40dp" |
| | | android:paddingRight="5dp" |
| | | android:singleLine="true" |
| | | android:textColor="#A1A1A1" |
| | | android:textCursorDrawable="@drawable/shape_input_cursor" |
| | | android:textSize="14sp" /> |
| | | |
| | | <ImageView |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="20dp" |
| | | android:src="@drawable/ic_recommend_search" /> |
| | | android:src="@drawable/icon_search_gray" /> |
| | | </FrameLayout> |
| | | |
| | | <TextView |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginRight="15dp" |
| | | android:padding="5dp" |
| | | android:background="@drawable/shape_search_order_btn" |
| | | android:text="搜索" |
| | | android:textColor="@color/black2" |
| | | android:textSize="15sp" /> |
| | | android:textColor="#FF2B4B" |
| | | android:textSize="16sp" /> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | |
| | | |
| | | <ScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="#F3F3F3"> |
| | | android:layout_height="match_parent"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="#FFFFFF" |
| | | |
| | | android:orientation="vertical" |
| | | android:paddingBottom="15dp"> |
| | | |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="账户余额" |
| | | android:textColor="@color/theme" |
| | | android:textColor="@color/capital_text_color" |
| | | android:textSize="17sp" /> |
| | | |
| | | <LinearLayout |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="¥" |
| | | android:textColor="@color/theme" |
| | | android:textColor="@color/capital_text_color" |
| | | android:textSize="15sp" /> |
| | | |
| | | <TextView |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="1.23" |
| | | android:textColor="@color/theme" |
| | | android:textColor="@color/capital_text_color" |
| | | android:textSize="36sp" |
| | | android:textStyle="bold" /> |
| | | |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginBottom="9dp" |
| | | android:text="123" |
| | | android:textColor="@color/theme" |
| | | android:textColor="@color/capital_text_light_color" |
| | | android:textSize="10sp" /> |
| | | |
| | | </LinearLayout> |
| | | <!--提现--> |
| | | <TextView |
| | | android:id="@+id/tv_mine_drawcash" |
| | | android:layout_width="78dp" |
| | | android:layout_height="25dp" |
| | | android:layout_width="100dp" |
| | | android:layout_height="32dp" |
| | | android:layout_gravity="right|center_vertical" |
| | | android:layout_marginRight="21dp" |
| | | android:background="@drawable/shape_go_search" |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical|left" |
| | | android:text="账户明细" |
| | | android:textColor="@color/theme" |
| | | android:textColor="@color/capital_text_color" |
| | | android:textSize="15sp"></TextView> |
| | | |
| | | <ImageView |
| | | android:layout_width="6dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical|right" |
| | | android:src="@drawable/ic_array_right_theme"> |
| | | android:src="@drawable/icon_capital_input_array"> |
| | | |
| | | |
| | | </ImageView> |
| | |
| | | android:background="@drawable/shape_balance_item_bg" |
| | | android:gravity="center_vertical" |
| | | android:paddingLeft="20dp" |
| | | android:paddingRight="15dp"> |
| | | android:paddingRight="15dp" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical|left" |
| | | android:text="提现记录" |
| | | android:textColor="@color/theme" |
| | | android:textColor="@color/capital_text_color" |
| | | android:textSize="15sp"></TextView> |
| | | |
| | | <ImageView |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:padding="15dp"> |
| | | android:padding="15dp" |
| | | android:visibility="gone"> |
| | | |
| | | <!-- 资金详情--> |
| | | <LinearLayout |
| | |
| | | android:layout_height="match_parent"> |
| | | <!--指示器--> |
| | | <FrameLayout |
| | | android:visibility="gone" |
| | | android:id="@+id/sv_search_tab" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="47dp" |
| | | android:background="@color/white" /> |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:id="@+id/sv_search_tabhint" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_person_info" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:layout_marginTop="8dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="8dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:id="@+id/ll_account_grade" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:layout_marginTop="10dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical"> |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="10dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:layout_marginTop="10dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical"> |
| | | android:gravity="center_vertical" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_marginLeft="12dp" |
| | | android:background="@color/trends_goods_bg" /> |
| | | android:background="@color/trends_goods_bg" |
| | | android:visibility="gone" /> |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical"> |
| | | |
| | | android:gravity="center_vertical" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_marginLeft="12dp" |
| | | android:background="@color/trends_goods_bg" /> |
| | | android:background="@color/trends_goods_bg" |
| | | android:visibility="gone" /> |
| | | |
| | | <!--<LinearLayout--> |
| | | <!--android:layout_width="match_parent"--> |
| | | <!--android:layout_height="48dp"--> |
| | | <!--android:background="@color/white"--> |
| | | <!--android:gravity="center_vertical">--> |
| | | <!--android:layout_width="match_parent"--> |
| | | <!--android:layout_height="48dp"--> |
| | | <!--android:background="@color/white"--> |
| | | <!--android:gravity="center_vertical">--> |
| | | |
| | | <!--<TextView--> |
| | | <!--android:layout_width="wrap_content"--> |
| | | <!--android:layout_height="wrap_content"--> |
| | | <!--android:layout_marginLeft="12dp"--> |
| | | <!--android:gravity="center_vertical"--> |
| | | <!--android:text="开启推广红包"--> |
| | | <!--android:textColor="@color/text_black_1"--> |
| | | <!--android:textSize="14sp" />--> |
| | | <!--<TextView--> |
| | | <!--android:layout_width="wrap_content"--> |
| | | <!--android:layout_height="wrap_content"--> |
| | | <!--android:layout_marginLeft="12dp"--> |
| | | <!--android:gravity="center_vertical"--> |
| | | <!--android:text="开启推广红包"--> |
| | | <!--android:textColor="@color/text_black_1"--> |
| | | <!--android:textSize="14sp" />--> |
| | | |
| | | <!--<View--> |
| | | <!--android:layout_width="0dp"--> |
| | | <!--android:layout_height="wrap_content"--> |
| | | <!--android:layout_weight="1" />--> |
| | | <!--<View--> |
| | | <!--android:layout_width="0dp"--> |
| | | <!--android:layout_height="wrap_content"--> |
| | | <!--android:layout_weight="1" />--> |
| | | |
| | | <!--<CheckBox--> |
| | | <!--android:id="@+id/cb_open_share_red_packet"--> |
| | | <!--android:layout_width="wrap_content"--> |
| | | <!--android:layout_height="wrap_content"--> |
| | | <!--android:layout_marginRight="12dp"--> |
| | | <!--android:button="@drawable/selector_msg_ischecked" />--> |
| | | <!--<CheckBox--> |
| | | <!--android:id="@+id/cb_open_share_red_packet"--> |
| | | <!--android:layout_width="wrap_content"--> |
| | | <!--android:layout_height="wrap_content"--> |
| | | <!--android:layout_marginRight="12dp"--> |
| | | <!--android:button="@drawable/selector_msg_ischecked" />--> |
| | | |
| | | <!--</LinearLayout>--> |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_marginLeft="12dp" |
| | | android:background="@color/trends_goods_bg" /> |
| | | android:background="@color/trends_goods_bg" |
| | | android:visibility="gone" /> |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical"> |
| | | android:gravity="center_vertical" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_marginLeft="12dp" |
| | | android:background="@color/trends_goods_bg" /> |
| | | android:background="@color/trends_goods_bg" |
| | | android:visibility="gone" /> |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical"> |
| | | android:gravity="center_vertical" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_clear_cache" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:layout_marginTop="8dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="1px"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_check_update" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:layout_marginTop="10dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical"> |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="1px"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_marginTop="10dp" |
| | | android:id="@+id/ll_evaluate" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="1px"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_about_us" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="48dp" |
| | | android:layout_marginTop="10dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical"> |
| | | style="@style/myInfoItemStyle" |
| | | android:layout_marginTop="10dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center_vertical" |
| | | android:text="退出当前账号" |
| | | android:text="退出登录" |
| | | android:textColor="@color/theme" /> |
| | | </LinearLayout> |
| | | </LinearLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:tools="http://schemas.android.com/tools" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/page_bg_color" |
| | | android:orientation="vertical"> |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_search" |
| | | android:layout_width="match_parent" |
| | | android:paddingBottom="8.5dp" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_search_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="38dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:background="@drawable/selector_search_bg"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_search_content" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:drawableLeft="@drawable/ic_recommend_search" |
| | | android:drawablePadding="9dp" |
| | | android:gravity="center" |
| | | android:hint="输入商品关键词搜索礼金" |
| | | android:paddingLeft="12dp" |
| | | android:textColor="#FF4455" |
| | | android:textColorHint="#FF4455" |
| | | android:textSize="14sp" /> |
| | | </FrameLayout> |
| | | |
| | | |
| | | </FrameLayout> |
| | | |
| | | <include layout="@layout/item_yellow_notice" /> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1" |
| | | android:focusable="true" |
| | | android:focusableInTouchMode="true"> |
| | | |
| | | <com.wpc.library.util.RefreshLayout |
| | | android:id="@+id/srl_activity" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:focusable="true" |
| | | android:focusableInTouchMode="true"> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rv_activity" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" /> |
| | | |
| | | </com.wpc.library.util.RefreshLayout> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_slid_top" |
| | | android:layout_width="40dp" |
| | | android:layout_height="40dp" |
| | | android:layout_gravity="bottom|right" |
| | | android:layout_marginRight="23dp" |
| | | android:layout_marginBottom="115dp" |
| | | android:src="@drawable/ic_slid_top" |
| | | android:visibility="gone" /> |
| | | |
| | | <include layout="@layout/item_no_data" /> |
| | | |
| | | <include layout="@layout/item_error_net" /> |
| | | |
| | | <include layout="@layout/item_no_net" /> |
| | | |
| | | |
| | | </FrameLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:background="#F3F3F3" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <androidx.swiperefreshlayout.widget.SwipeRefreshLayout |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="#F3F3F3"> |
| | | android:background="@color/page_bg_color" |
| | | android:orientation="vertical"> |
| | | |
| | | <com.wpc.library.widget.ScListerScrollView |
| | | android:id="@+id/sv_mine" |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_top" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | |
| | | <FrameLayout |
| | | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="#F3F3F3"> |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="172dp" |
| | | android:background="@color/theme" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | <FrameLayout |
| | | android:id="@+id/fl_msg" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/ic_mine_top_bg" /> |
| | | android:layout_gravity="right" |
| | | android:paddingTop="5dp" |
| | | android:paddingRight="2.5dp" |
| | | android:paddingBottom="5dp"> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="7dp" |
| | | android:layout_marginRight="12dp" |
| | | android:src="@drawable/icon_mine_msg"></ImageView> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_msg_count" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="right" |
| | | android:background="@drawable/shape_mine_msg_bg" |
| | | android:gravity="center" |
| | | android:text="99+" |
| | | android:textColor="#ffff2a59" |
| | | android:textSize="10sp" |
| | | android:visibility="gone" /> |
| | | |
| | | </FrameLayout> |
| | | |
| | | |
| | | </FrameLayout> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <!--小黄条--> |
| | | <LinearLayout |
| | | android:id="@+id/ll_notice" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="30dp" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="20dp" |
| | | android:background="@drawable/shape_yellow_notice_mine" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="12dp" |
| | | android:src="@drawable/ic_notice" /> |
| | | |
| | | <com.wpc.library.widget.MarqueeText |
| | | android:id="@+id/tv_notice_content" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="5dp" |
| | | android:layout_weight="1" |
| | | android:ellipsize="marquee" |
| | | android:focusable="true" |
| | | android:focusableInTouchMode="true" |
| | | android:marqueeRepeatLimit="marquee_forever" |
| | | android:scrollHorizontally="true" |
| | | android:singleLine="true" |
| | | android:textColor="@color/main_text_color" |
| | | android:textSize="12sp" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_close" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="12dp" |
| | | android:padding="5dp" |
| | | android:src="@drawable/ic_notice_input" /> |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
| | | |
| | | |
| | | <!--头像布局--> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="132dp" |
| | | android:layout_marginTop="30dp" |
| | | android:orientation="vertical"> |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal" |
| | | android:paddingLeft="22dp"> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content"> |
| | | <!--小黄条--> |
| | | <LinearLayout |
| | | android:id="@+id/ll_notice" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="30dp" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="20dp" |
| | | android:background="@drawable/shape_yellow_notice_mine" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="12dp" |
| | | android:src="@drawable/ic_notice" /> |
| | | <ImageView |
| | | android:id="@+id/iv_portrait" |
| | | android:layout_width="60dp" |
| | | android:layout_height="60dp" |
| | | android:layout_gravity="center" |
| | | |
| | | <com.wpc.library.widget.MarqueeText |
| | | android:id="@+id/tv_notice_content" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="5dp" |
| | | android:layout_weight="1" |
| | | android:ellipsize="marquee" |
| | | android:focusable="true" |
| | | android:focusableInTouchMode="true" |
| | | android:marqueeRepeatLimit="marquee_forever" |
| | | android:scrollHorizontally="true" |
| | | android:singleLine="true" |
| | | android:textColor="@color/main_text_color" |
| | | android:textSize="12sp" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_close" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="12dp" |
| | | android:padding="5dp" |
| | | android:src="@drawable/ic_notice_input" /> |
| | | </LinearLayout> |
| | | |
| | | <!--专题活动-福利中心-推广红包--> |
| | | <LinearLayout |
| | | android:id="@+id/ll_title" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="40dp" |
| | | android:layout_gravity="right" |
| | | android:gravity="right" |
| | | android:orientation="horizontal" |
| | | android:visibility="invisible"></LinearLayout> |
| | | android:src="@drawable/ic_mine_default_portrait" /> |
| | | |
| | | </FrameLayout> |
| | | |
| | | |
| | | <!--头像布局--> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="82dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_portrait" |
| | | android:layout_width="52dp" |
| | | android:layout_height="52dp" |
| | | android:layout_gravity="center" |
| | | android:layout_margin="10dp" |
| | | android:src="@drawable/ic_mine_default_portrait" /> |
| | | |
| | | </FrameLayout> |
| | | |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="start" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginTop="5dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center_vertical" |
| | | android:orientation="vertical"> |
| | | android:orientation="horizontal"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_nick_name_vip" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_nick_name_vip" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_nickname" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:ellipsize="end" |
| | | android:gravity="left" |
| | | android:maxWidth="130dp" |
| | | android:singleLine="true" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:visibility="gone" /> |
| | | </LinearLayout> |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal" |
| | | android:visibility="visible"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_mine_login" |
| | | android:id="@+id/tv_nickname" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="3dp" |
| | | android:background="@drawable/shape_mine_login_show" |
| | | android:gravity="center_vertical" |
| | | android:paddingLeft="20dp" |
| | | android:paddingTop="5dp" |
| | | android:paddingRight="20dp" |
| | | android:paddingBottom="5dp" |
| | | android:layout_gravity="center" |
| | | android:ellipsize="end" |
| | | android:gravity="left" |
| | | android:maxWidth="130dp" |
| | | android:singleLine="true" |
| | | android:text="昵称昵称昵称昵称" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:visibility="visible" /> |
| | | </LinearLayout> |
| | | |
| | | <androidx.appcompat.widget.LinearLayoutCompat |
| | | android:id="@+id/tv_user_numlayout" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="3dp"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_user_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="2dp" |
| | | android:gravity="center_vertical" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" /> |
| | | |
| | | </androidx.appcompat.widget.LinearLayoutCompat> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_red_packet_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:gravity="center_vertical" |
| | | android:text="奖金余额0.00元" |
| | | android:textColor="@color/white" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_help" |
| | | android:layout_width="23dp" |
| | | android:layout_height="23dp" |
| | | android:layout_gravity="left|center_vertical" |
| | | android:layout_marginLeft="5dp" |
| | | android:src="@mipmap/ic_doubt" /> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_special_invitecode_apply" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="72dp" |
| | | android:layout_marginTop="-7dp" |
| | | android:background="@drawable/shape_apply_special_invite_code_bg" |
| | | android:gravity="center" |
| | | android:paddingLeft="10dp" |
| | | android:paddingRight="10dp" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:layout_width="12dp" |
| | | android:layout_height="12dp" |
| | | android:src="@drawable/icon_special"> |
| | | |
| | | </ImageView> |
| | | |
| | | <TextView |
| | | <androidx.appcompat.widget.LinearLayoutCompat |
| | | android:id="@+id/tv_user_numlayout" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="2dp" |
| | | android:text="申请专属邀请码" |
| | | android:textColor="#FFBDD8" |
| | | android:textSize="12sp"></TextView> |
| | | android:layout_marginTop="3dp"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_user_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="2dp" |
| | | android:gravity="center_vertical" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" /> |
| | | |
| | | </androidx.appcompat.widget.LinearLayoutCompat> |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_balance" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="66dp" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="43dp" |
| | | android:layout_marginRight="10dp" |
| | | android:background="@drawable/shape_mine_money_bg" |
| | | android:gravity="center_vertical" |
| | | android:orientation="vertical"> |
| | | |
| | | <!--余额显示--> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:background="@drawable/shape_mine_money_bg" |
| | | android:orientation="vertical"> |
| | | android:layout_height="50dp" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal" |
| | | android:paddingLeft="24dp" |
| | | android:paddingRight="12dp"> |
| | | |
| | | |
| | | <!--余额显示--> |
| | | <TextView |
| | | android:id="@+id/tv_red_packet_no_open1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="left|center_vertical" |
| | | android:text="资金" |
| | | android:textColor="@color/theme" |
| | | android:textSize="15sp" /> |
| | | |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_balance" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="50dp" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="6dp" |
| | | android:layout_marginRight="10dp" |
| | | android:orientation="horizontal" |
| | | android:paddingLeft="15dp" |
| | | android:paddingRight="15dp"> |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="bottom"> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_red_packet_no_open1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="left|center_vertical" |
| | | android:text="余额" |
| | | android:textColor="@color/theme" |
| | | android:text="¥" |
| | | android:textColor="#ffff2b51" |
| | | android:textSize="15sp" /> |
| | | |
| | | |
| | |
| | | android:id="@+id/tv_balance" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="left|center_vertical" |
| | | android:layout_marginLeft="15dp" |
| | | android:text="0.00" |
| | | android:textColor="@color/theme" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="left|center_vertical" |
| | | android:drawableRight="@drawable/ic_mine_money_array" |
| | | android:drawablePadding="5dp" |
| | | android:text="明细" |
| | | android:textColor="#999999" |
| | | android:textSize="12sp" /> |
| | | android:drawablePadding="7.5dp" |
| | | android:text="88.88" |
| | | android:textColor="#ffff2b51" |
| | | android:textSize="30sp" /> |
| | | |
| | | </LinearLayout> |
| | | <!--奖金统计--> |
| | | <LinearLayout |
| | | android:id="@+id/ll_count" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:layout_marginBottom="10dp" |
| | | android:background="@drawable/shape_mine_share_bottom" |
| | | android:orientation="vertical" |
| | | android:visibility="visible"> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="30dp" |
| | | android:layout_marginLeft="5dp" |
| | | android:layout_marginTop="5dp" |
| | | android:layout_marginRight="5dp" |
| | | android:background="@drawable/shape_mine_item_bg" |
| | | android:orientation="horizontal" |
| | | android:padding="3dp"> |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_reward_today" |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1" |
| | | android:background="@drawable/shape_mine_share_top"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_reward_today" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:gravity="center" |
| | | android:text="今日" |
| | | android:textColor="@color/white" |
| | | android:textSize="15sp" /> |
| | | </FrameLayout> |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_reward_yestoday" |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_reward_yestoday" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:gravity="center" |
| | | android:text="昨日" |
| | | android:textColor="@color/theme" /> |
| | | </FrameLayout> |
| | | |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_reward_current_month" |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_reward_current_month" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:gravity="center" |
| | | android:text="本月" |
| | | android:textColor="@color/theme" /> |
| | | </FrameLayout> |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_reward_last_month" |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_reward_last_month" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:gravity="center" |
| | | android:text="上月" |
| | | android:textColor="@color/theme" /> |
| | | </FrameLayout> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="9dp" |
| | | android:layout_marginRight="10dp" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/fl_reward_today_ic" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:src="@drawable/fl_reward_current_top_ic" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/fl_reward_yestoday_ic" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:src="@drawable/fl_reward_current_top_ic" |
| | | android:visibility="invisible" /> |
| | | |
| | | |
| | | <ImageView |
| | | android:id="@+id/fl_reward_current_month_ic" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:src="@drawable/fl_reward_current_top_ic" |
| | | android:visibility="invisible" /> |
| | | |
| | | |
| | | <ImageView |
| | | android:id="@+id/fl_reward_last_month_ic" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:src="@drawable/fl_reward_current_top_ic" |
| | | android:visibility="invisible" /> |
| | | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | |
| | | android:orientation="vertical"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_fanli" |
| | | android:layout_width="0dp" |
| | | android:layout_height="75dp" |
| | | android:layout_gravity="center" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:layout_marginBottom="5dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="vertical"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_fanli_reward" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:drawablePadding="3dp" |
| | | android:gravity="center" |
| | | android:text="¥ 0.00" |
| | | android:textColor="@color/white" |
| | | android:textSize="17sp" /> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_fanli_reward_hint" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="返利" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" /> |
| | | |
| | | <ImageView |
| | | android:layout_width="5dp" |
| | | android:layout_height="8dp" |
| | | android:layout_marginLeft="15dp" |
| | | android:layout_marginTop="1dp" |
| | | android:src="@drawable/ic_mine_money_detail_array"></ImageView> |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="1dp" |
| | | android:layout_height="25dp" |
| | | android:layout_gravity="center" |
| | | android:background="@color/theme" |
| | | android:visibility="gone" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_share_reward" |
| | | android:layout_width="0dp" |
| | | android:layout_height="75dp" |
| | | android:layout_gravity="center" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="horizontal" |
| | | android:visibility="visible"> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:layout_marginBottom="5dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="vertical"> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_share_reward_hint" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="佣金" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_share_estimate_reward" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:drawablePadding="3dp" |
| | | android:layout_marginTop="5dp" |
| | | android:gravity="center" |
| | | android:text="¥ 0.00" |
| | | android:textColor="@color/white" |
| | | android:textSize="17sp" /> |
| | | |
| | | |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | <!-- 热门活动入口--> |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:id="@+id/vp_doings_ratio" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:visibility="gone" |
| | | app:ratio="0.2785"> |
| | | |
| | | <!--分享记录-分享库--> |
| | | <LinearLayout |
| | | android:id="@+id/ll_share_and_selection" |
| | | <androidx.cardview.widget.CardView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:background="@drawable/shape_mine_item_bg" |
| | | android:orientation="horizontal" |
| | | android:paddingTop="19dp" |
| | | android:paddingBottom="21dp"> |
| | | android:layout_height="match_parent" |
| | | app:cardBackgroundColor="#F3F3F3" |
| | | app:cardCornerRadius="10dp" |
| | | app:cardElevation="0dp"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_order" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="vertical"> |
| | | |
| | | <ImageView |
| | | android:layout_width="53dp" |
| | | android:layout_height="53dp" |
| | | android:src="@drawable/icon_mine_order" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="3.5dp" |
| | | android:text="订单" |
| | | android:textColor="#333333" |
| | | android:textSize="13sp" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_find_order" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="vertical"> |
| | | |
| | | <ImageView |
| | | android:layout_width="53dp" |
| | | android:layout_height="53dp" |
| | | android:src="@drawable/icon_mine_find_order" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="3.5dp" |
| | | android:text="订单找回" |
| | | android:textColor="#333333" |
| | | android:textSize="13sp" /> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_share_history" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="vertical"> |
| | | |
| | | <ImageView |
| | | android:layout_width="53dp" |
| | | android:layout_height="53dp" |
| | | android:src="@drawable/icon_mine_share_history" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="3.5dp" |
| | | android:gravity="center" |
| | | android:text="分享记录" |
| | | android:textColor="#333333" |
| | | android:textSize="13sp" /> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_send_order" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="vertical"> |
| | | |
| | | <ImageView |
| | | android:layout_width="53dp" |
| | | android:layout_height="53dp" |
| | | android:src="@drawable/icon_mine_send_order" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="3.5dp" |
| | | android:text="云发单" |
| | | android:textColor="#333333" |
| | | android:textSize="13sp" /> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | <!-- 热门活动入口--> |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:id="@+id/vp_doings_ratio" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:visibility="gone" |
| | | app:ratio="0.2785"> |
| | | |
| | | <androidx.cardview.widget.CardView |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/vp_recommend" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | app:cardBackgroundColor="#F3F3F3" |
| | | app:cardCornerRadius="10dp" |
| | | app:cardElevation="0dp"> |
| | | |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/vp_recommend" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:visibility="visible" /> |
| | | android:visibility="visible" /> |
| | | |
| | | |
| | | <com.viewpagerindicator.CirclePageIndicator |
| | | android:id="@+id/indicator_recommend" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:padding="5dip" |
| | | app:fillColor="@color/mine_top" |
| | | app:pageColor="@android:color/darker_gray" |
| | | app:radius="3dp" /> |
| | | <com.viewpagerindicator.CirclePageIndicator |
| | | android:id="@+id/indicator_recommend" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:padding="5dip" |
| | | app:fillColor="@color/mine_top" |
| | | app:pageColor="@android:color/darker_gray" |
| | | app:radius="3dp" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/vp_close" |
| | | android:layout_width="41.5dp" |
| | | android:layout_height="15dp" |
| | | android:layout_gravity="right" |
| | | android:layout_margin="4dp" |
| | | android:background="@drawable/ic_close" /> |
| | | <ImageView |
| | | android:id="@+id/vp_close" |
| | | android:layout_width="41.5dp" |
| | | android:layout_height="15dp" |
| | | android:layout_gravity="right" |
| | | android:layout_margin="4dp" |
| | | android:background="@drawable/ic_close" /> |
| | | |
| | | </androidx.cardview.widget.CardView> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | </androidx.cardview.widget.CardView> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | |
| | | |
| | | <com.wpc.library.widget.MyGridView |
| | | android:id="@+id/gv_functions" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="11dp" |
| | | android:background="@drawable/shape_mine_item_bg" |
| | | android:numColumns="3" |
| | | android:paddingTop="30dp" |
| | | android:paddingBottom="30dp" |
| | | android:verticalSpacing="35.5dp"></com.wpc.library.widget.MyGridView> |
| | | |
| | | |
| | | <!--邀请有奖--> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="10dp" /> |
| | | </LinearLayout> |
| | | </FrameLayout> |
| | | </com.wpc.library.widget.ScListerScrollView> |
| | | |
| | | |
| | | <!--浮动标题栏--> |
| | | <RelativeLayout |
| | | |
| | | android:id="@+id/ll_title_face" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="60dp" |
| | | android:background="@color/theme_bg" |
| | | android:orientation="horizontal" |
| | | android:visibility="visible"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="40dp" |
| | | |
| | | android:layout_alignParentBottom="true" |
| | | android:orientation="vertical"> |
| | | |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1px" |
| | | android:layout_weight="7" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:gravity="center" |
| | | android:text="我的" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" /> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1px" |
| | | android:layout_weight="3" /> |
| | | </LinearLayout> |
| | | |
| | | </RelativeLayout> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <View |
| | | android:id="@+id/view_mine_end_bg" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="136dp"></View> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="136dp" |
| | | android:layout_marginTop="24dp" |
| | | android:background="@drawable/ic_home_bg_end"></View> |
| | | |
| | | |
| | | </FrameLayout> |
| | | <com.wpc.library.widget.MyGridView |
| | | android:id="@+id/gv_functions" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="11dp" |
| | | android:background="@drawable/shape_mine_item_bg" |
| | | android:numColumns="4" |
| | | android:paddingLeft="10dp" |
| | | android:paddingTop="30dp" |
| | | android:paddingRight="10dp" |
| | | android:paddingBottom="30dp" |
| | | android:verticalSpacing="30dp"></com.wpc.library.widget.MyGridView> |
| | | |
| | | </FrameLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | android:orientation="vertical"> |
| | | |
| | | <ScrollView |
| | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="10dp" |
| | | android:background="@color/register_gray" /> |
| | | android:background="@color/transparent" /> |
| | | |
| | | <include layout="@layout/item_yellow_notice" /> |
| | | |
| | | <com.wpc.library.widget.ResizableImageView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="30dp" |
| | | android:layout_marginRight="30dp" |
| | | android:src="@drawable/ic_order_appeal_top" /> |
| | | |
| | | <androidx.appcompat.widget.LinearLayoutCompat |
| | | android:layout_width="match_parent" |
| | | android:layout_height="42dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginTop="40dp" |
| | | android:layout_marginRight="20dp" |
| | | android:orientation="horizontal"> |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | |
| | | <EditText |
| | | android:textCursorDrawable="@drawable/shape_input_cursor" |
| | | android:id="@+id/et_order_id" |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="45dp" |
| | | android:layout_weight="8" |
| | | android:background="@drawable/shape_category_fillter2" |
| | | android:digits="1234567890" |
| | | android:background="@drawable/shape_find_order_input" |
| | | android:digits="abcdefghijklmnopqrstuvwxyz1234567890-" |
| | | android:focusable="false" |
| | | android:focusableInTouchMode="true" |
| | | android:gravity="center_vertical" |
| | | android:hint="请输入或粘贴淘宝订单号" |
| | | android:gravity="center" |
| | | android:hint="请输入或粘贴订单号" |
| | | android:inputType="phone" |
| | | android:paddingStart="24dp" |
| | | android:paddingLeft="8dp" |
| | | android:paddingRight="8dp" |
| | | android:textSize="16sp" /> |
| | | android:textCursorDrawable="@drawable/shape_input_cursor" |
| | | android:textColor="#999999" |
| | | android:textSize="17sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_refer_appeal" |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="22.5dp" |
| | | android:layout_weight="2" |
| | | android:background="@drawable/shape_go_search3" |
| | | android:background="@drawable/shape_find_order_btn" |
| | | android:gravity="center" |
| | | android:text="提交" |
| | | android:textColor="@color/white" |
| | | android:textSize="16sp" /> |
| | | android:textSize="18sp" /> |
| | | </androidx.appcompat.widget.LinearLayoutCompat> |
| | | |
| | | |
| | |
| | | android:layout_marginLeft="30dp" |
| | | android:layout_marginTop="22dp" |
| | | android:layout_marginRight="30dp" |
| | | android:orientation="horizontal"> |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_order_appeal_aout" |
| | |
| | | android:layout_marginTop="50dp" |
| | | android:text="手机淘宝中复制订单号教程" |
| | | android:textColor="#ff333333" |
| | | android:textSize="17sp" /> |
| | | android:textSize="17sp" |
| | | android:visibility="gone" /> |
| | | |
| | | <com.wpc.library.widget.ResizableImageView |
| | | android:id="@+id/iv_order_course" |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="35dp" |
| | | android:layout_marginBottom="106dp" |
| | | android:src="@drawable/ic_order_appeal_buttom" /> |
| | | android:src="@drawable/ic_order_appeal_buttom" |
| | | android:visibility="gone" /> |
| | | </LinearLayout> |
| | | </ScrollView> |
| | | </LinearLayout> |
| | |
| | | android:layout_height="match_parent"> |
| | | |
| | | <com.google.android.material.appbar.AppBarLayout |
| | | android:id="@+id/apl_search" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/shape_recommend_search_bg" |
| | | android:paddingLeft="10dp" |
| | | android:paddingTop="25dp" |
| | | android:paddingRight="10dp" |
| | | app:elevation="0dp" |
| | | app:layout_behavior="com.tejia.lijin.app.util.appbarlayout.ScrollAppBarLayoutBehavior"> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | app:layout_scrollFlags="scroll|enterAlways"> |
| | | app:layout_scrollFlags="scroll|enterAlwaysCollapsed"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | |
| | | <ScrollView |
| | | android:id="@+id/sv_search" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | android:layout_height="wrap_content" |
| | | android:paddingLeft="23dp" |
| | | android:paddingRight="23dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="8dp" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:text="热门搜索" |
| | | android:textColor="@color/gray2" /> |
| | | android:textColor="@color/search_title_text_color" /> |
| | | |
| | | <com.tejia.lijin.app.util.FlowLayout |
| | | android:id="@+id/fl_hot_search" |
| | |
| | | android:id="@+id/ll_search_history_hint" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="8dp" |
| | | android:layout_marginTop="12dp" |
| | | android:layout_marginRight="8dp" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | android:visibility="visible"> |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="8dp" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:layout_weight="1" |
| | | android:text="历史搜索" |
| | | android:textColor="@color/gray2" /> |
| | | android:text="搜索记录" |
| | | android:textColor="@color/search_title_text_color" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_clear_history" |
| | | <ImageView |
| | | android:id="@+id/iv_delete_history" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="8dp" |
| | | android:layout_marginLeft="8dp" |
| | | android:layout_marginTop="1dp" |
| | | android:layout_marginRight="8dp" |
| | | android:layout_marginBottom="5dp" |
| | | android:background="@color/white" |
| | | android:gravity="right" |
| | | android:padding="5dp" |
| | | android:text="清空" /> |
| | | android:paddingLeft="5dp" |
| | | android:paddingTop="5dp" |
| | | android:paddingBottom="5dp" |
| | | android:src="@drawable/icon_search_record_delete"></ImageView> |
| | | |
| | | </LinearLayout> |
| | | |
| | | |
| | | <com.wpc.library.widget.MyListView |
| | | android:id="@+id/lv_search_history" |
| | | <com.tejia.lijin.app.util.FlowLayout |
| | | android:id="@+id/fl_search_history" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginBottom="8dp" |
| | | android:background="@color/white" |
| | | android:divider="@color/white" /> |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="8dp" |
| | | android:layout_marginRight="8dp"></com.tejia.lijin.app.util.FlowLayout> |
| | | |
| | | <!--优惠券视频教程--> |
| | | <RelativeLayout |
| | | android:id="@+id/ll_guidevideo" |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="15dp" |
| | | android:text="查看优惠券视频教程" |
| | | android:textColor="@color/black" |
| | | android:textSize="15sp" /> |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginRight="28dp" |
| | | android:layout_marginRight="10dp" |
| | | android:paddingBottom="1dp" |
| | | android:text="更多" |
| | | android:textColor="@color/gray2" |
| | |
| | | android:layout_height="12dp" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginRight="15dp" |
| | | android:background="@drawable/ic_other_login_close" |
| | | android:paddingTop="1dp" /> |
| | | </RelativeLayout> |
| | |
| | | android:id="@+id/ll_guidevideoimg" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginLeft="15dp" |
| | | android:layout_marginRight="15dp" |
| | | android:background="@drawable/shape_order_statistics_today_bg" |
| | | android:scaleType="fitXY" /> |
| | | |
| | |
| | | </RelativeLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </ScrollView> |
| | | |
| | | <include layout="@layout/item_no_net" /> |
| | |
| | | android:id="@+id/fl_search_bar_common" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <include layout="@layout/item_search_result_bar" /> |
| | | </FrameLayout> |
| | | |
| | | <FrameLayout |
| | | android:visibility="gone" |
| | | android:id="@+id/fl_search_bar_vip" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | android:layout_height="wrap_content" |
| | | android:visibility="gone"> |
| | | |
| | | <include layout="@layout/item_search_result_bar_vip" /> |
| | | </FrameLayout> |
| | | |
| | |
| | | <androidx.swiperefreshlayout.widget.SwipeRefreshLayout |
| | | android:id="@+id/rl_search" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp"> |
| | | android:layout_height="wrap_content"> |
| | | |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | |
| | | android:layout_weight="1" |
| | | android:gravity="right|center_vertical" |
| | | android:textColor="@color/main_text_color" |
| | | android:textSize="17sp" /> |
| | | android:textSize="10sp" /> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:baselineAligned="false" |
| | | android:orientation="vertical"> |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <View |
| | | android:id="@+id/v_top" |
| | | <FrameLayout |
| | | android:id="@+id/fl_shadow" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="6dp" /> |
| | | |
| | | <View |
| | | android:id="@+id/v_top1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="10dp" /> |
| | | |
| | | <include layout="@layout/item_recommend_gv" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_horizontal_item" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="150dp" |
| | | android:background="@drawable/shape_addzfb_hint2" |
| | | android:baselineAligned="false" |
| | | android:orientation="horizontal" |
| | | android:padding="10dp"> |
| | | android:layout_height="136dp" |
| | | android:visibility="gone"> |
| | | |
| | | <View |
| | | android:id="@+id/v_left" |
| | | android:layout_width="2dp" |
| | | android:layout_height="match_parent" |
| | | android:visibility="visible" /> |
| | | android:id="@+id/view_shadow" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/theme"></View> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="130dp" |
| | | android:layout_height="130dp"> |
| | | <ImageView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:scaleType="fitXY" |
| | | android:src="@drawable/ic_home_bg_end"></ImageView> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@drawable/shape_img_bg" /> |
| | | </FrameLayout> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_movie_cover1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_gravity="center" |
| | | android:scaleType="centerCrop" /> |
| | | </FrameLayout> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:baselineAligned="false" |
| | | android:orientation="vertical"> |
| | | |
| | | <View |
| | | android:id="@+id/v_top" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="6dp" /> |
| | | |
| | | <View |
| | | android:id="@+id/v_top1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="10dp" /> |
| | | |
| | | <include layout="@layout/item_recommend_gv" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_horizontal_item" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="130dp" |
| | | android:layout_marginLeft="10dp" |
| | | android:orientation="vertical"> |
| | | android:layout_height="150dp" |
| | | android:background="@drawable/shape_addzfb_hint2" |
| | | android:baselineAligned="false" |
| | | android:orientation="horizontal" |
| | | android:padding="10dp"> |
| | | |
| | | <include layout="@layout/item_goods_right"></include> |
| | | <View |
| | | android:id="@+id/v_left" |
| | | android:layout_width="2dp" |
| | | android:layout_height="match_parent" |
| | | android:visibility="visible" /> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="130dp" |
| | | android:layout_height="130dp"> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@drawable/shape_img_bg" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_movie_cover1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_gravity="center" |
| | | android:scaleType="centerCrop" /> |
| | | </FrameLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="130dp" |
| | | android:layout_marginLeft="10dp" |
| | | android:orientation="vertical"> |
| | | |
| | | <include layout="@layout/item_goods_right"></include> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/shape_item_goods_bg" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="130dp"> |
| | | android:id="@+id/fl_shadow" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="136dp" |
| | | android:visibility="gone"> |
| | | |
| | | <View |
| | | android:id="@+id/view_shadow" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/theme"></View> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_picture" |
| | | android:layout_width="130dp" |
| | | android:layout_height="match_parent"></ImageView> |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:scaleType="fitXY" |
| | | android:src="@drawable/ic_home_bg_end"></ImageView> |
| | | |
| | | </FrameLayout> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="130dp" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_weight="1"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | |
| | | <View |
| | | android:id="@+id/v_top" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="8.5dp" /> |
| | | |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:background="@drawable/shape_item_goods_bg" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="130dp"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:ellipsize="end" |
| | | android:maxLines="2" |
| | | android:text="牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款123123牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款123123" |
| | | android:textColor="#ff333333" |
| | | android:textSize="15sp" /> |
| | | <ImageView |
| | | android:id="@+id/iv_pic" |
| | | android:layout_width="130dp" |
| | | android:layout_height="match_parent"></ImageView> |
| | | </FrameLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="8dp" |
| | | android:gravity="center_vertical"> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_shop" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | |
| | | android:layout_weight="1" |
| | | android:drawableLeft="@drawable/ic_item_goods_shop" |
| | | android:drawablePadding="5dp" |
| | | android:ellipsize="end" |
| | | android:gravity="center_vertical" |
| | | android:lines="1" |
| | | android:text="三只松鼠官方旗舰店" |
| | | android:textColor="#ffa1a0a0" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_sales_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="5dp" |
| | | android:text="月销 8968" |
| | | android:textColor="#ffaaaaaa" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="1dp" |
| | | android:layout_height="0dp" |
| | | <FrameLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="130dp" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_weight="1"> |
| | | |
| | | </View> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_coupon_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_coupon" |
| | | android:drawablePadding="3dp" |
| | | android:gravity="center_vertical" |
| | | android:text="-¥100" |
| | | android:textColor="#ffffac00" |
| | | android:textSize="12sp"></TextView> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_fanli_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_fanli" |
| | | android:drawablePadding="3dp" |
| | | android:text="-¥10" |
| | | android:textColor="#ff55be00" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_hongbao_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_hongbao" |
| | | android:drawablePadding="3dp" |
| | | android:text="-¥10" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="12sp" |
| | | android:visibility="gone" /> |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:ellipsize="end" |
| | | android:maxLines="2" |
| | | android:text="牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款123123牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款123123" |
| | | android:textColor="#ff333333" |
| | | android:textSize="15sp" /> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="8dp" |
| | | android:gravity="center_vertical"> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_shop_name" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:drawableLeft="@drawable/ic_item_goods_shop" |
| | | android:drawablePadding="5dp" |
| | | android:ellipsize="end" |
| | | android:gravity="center_vertical" |
| | | android:lines="1" |
| | | android:text="三只松鼠官方旗舰店" |
| | | android:textColor="#ffa1a0a0" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_sale_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="5dp" |
| | | android:text="月销 8968" |
| | | android:textColor="#ffaaaaaa" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_labels" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="2dp" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"></LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="1dp" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1"> |
| | | |
| | | </View> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_coupon_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_coupon_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_coupon" |
| | | android:drawablePadding="3dp" |
| | | android:gravity="center_vertical" |
| | | android:text="-¥100" |
| | | android:textColor="#ffffac00" |
| | | android:textSize="12sp"></TextView> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_fanli_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_fanli_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_fanli" |
| | | android:drawablePadding="3dp" |
| | | android:text="-¥10" |
| | | android:textColor="#ff55be00" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_hongbao_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_hongbao_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_hongbao" |
| | | android:drawablePadding="3dp" |
| | | android:text="-¥10" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="12sp" |
| | | android:visibility="gone" /> |
| | | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="right|bottom" |
| | | android:gravity="right|bottom" |
| | | android:layout_marginBottom="-4dp" |
| | | android:padding="0dp" |
| | | android:orientation="vertical"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="¥128.9" |
| | | android:textColor="#ffa1a0a0" |
| | | android:textSize="12sp" /> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_actual_price1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:padding="0dp" |
| | | android:text="¥28" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="23sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_actual_price2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:padding="0dp" |
| | | android:text="" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="13sp" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="right|bottom" |
| | | android:gravity="right" |
| | | android:orientation="vertical"> |
| | | </FrameLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="¥128.9" |
| | | android:textColor="#ffa1a0a0" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_actual_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="¥28.9" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="23sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
| | | |
| | | </LinearLayout> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_movie_title1" |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:ellipsize="end" |
| | | android:lineSpacingMultiplier="1.2" |
| | | android:lines="2" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="12sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_labels" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="3dp" |
| | | android:layout_marginBottom="2dp" |
| | | android:orientation="horizontal"></LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_shop1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:layout_marginTop="3dp" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:layout_width="13.5dp" |
| | | android:layout_height="12dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="3.5dp" |
| | | android:background="@drawable/ic_shopci" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_shop_name1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:ellipsize="end" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:textColor="@color/contents_text" |
| | | android:textSize="12sp" /> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1" /> |
| | | <!--金额 月销--> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="2dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_sale_num1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:gravity="center_vertical|left" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_normal_price1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:ellipsize="end" |
| | | android:gravity="center_vertical|left" |
| | | android:lines="1" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_sale_num2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:gravity="center_vertical|left" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:gravity="bottom" |
| | | android:layout_marginTop="-3dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_price1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:ellipsize="end" |
| | | android:lines="1" |
| | | android:textColor="@color/theme" |
| | | android:textSize="13sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | |
| | | <include layout="@layout/item_coupon_common"></include> |
| | | android:maxLines="2" |
| | | android:text="牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款123123牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款123123" |
| | | android:textColor="#ff333333" |
| | | android:textSize="15sp" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_discount_new" |
| | | android:layout_width="wrap_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="8dp" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | android:layout_marginTop="8dp" |
| | | android:gravity="center_vertical"> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_discount_new" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="18dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:background="@drawable/shape_goods_discount" |
| | | android:gravity="center" |
| | | android:paddingLeft="8dp" |
| | | android:paddingRight="8dp" |
| | | android:text="" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_shop_name" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:drawableLeft="@drawable/ic_item_goods_shop" |
| | | android:drawablePadding="5dp" |
| | | android:ellipsize="end" |
| | | android:gravity="center_vertical" |
| | | android:lines="1" |
| | | android:text="三只松鼠官方旗舰店" |
| | | android:textColor="#ffa1a0a0" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_sale_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="5dp" |
| | | android:text="月销 8968" |
| | | android:textColor="#ffaaaaaa" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_labels" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="2dp" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"></LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="1dp" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1"> |
| | | |
| | | </View> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_coupon_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_coupon_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_coupon" |
| | | android:drawablePadding="3dp" |
| | | android:gravity="center_vertical" |
| | | android:text="-¥100" |
| | | android:textColor="#ffffac00" |
| | | android:textSize="12sp"></TextView> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_fanli_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_fanli_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_fanli" |
| | | android:drawablePadding="3dp" |
| | | android:text="-¥10" |
| | | android:textColor="#ff55be00" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_hongbao_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_hongbao_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_hongbao" |
| | | android:drawablePadding="3dp" |
| | | android:text="-¥10" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="12sp" |
| | | android:visibility="gone" /> |
| | | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="right|bottom" |
| | | android:gravity="right|bottom" |
| | | android:layout_marginBottom="-4dp" |
| | | android:padding="0dp" |
| | | android:orientation="vertical"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="¥128.9" |
| | | android:textColor="#ffa1a0a0" |
| | | android:textSize="12sp" /> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_actual_price1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:padding="0dp" |
| | | android:text="¥28" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="23sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_actual_price2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:padding="0dp" |
| | | android:text="" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="13sp" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_favourable1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="match_parent" |
| | | android:layout_gravity="center_vertical" |
| | | android:background="@drawable/shape_goods_list_price_fan" |
| | | android:ellipsize="end" |
| | | android:gravity="center_vertical" |
| | | android:lines="1" |
| | | android:paddingLeft="5dp" |
| | | android:paddingRight="9dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" /> |
| | | |
| | | |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_margin="3dp" |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | |
| | | |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | app:ratio="0.8254"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_icon" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_alignParentStart="true" |
| | | android:layout_alignParentLeft="true" |
| | | android:layout_alignParentTop="true" |
| | | android:scaleType="centerCrop" /> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:text="1元购" |
| | | android:lines="1" |
| | | android:ellipsize="end" |
| | | android:textColor="#ffffffff" |
| | | android:textSize="12sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_tag" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="20dp" |
| | | android:layout_gravity="right|top" |
| | | android:layout_marginTop="-3dp" |
| | | android:layout_marginRight="-5dp"></ImageView> |
| | | |
| | | |
| | | </FrameLayout> |
| | |
| | | <ImageView |
| | | android:id="@+id/iv_icon" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="31dp"></ImageView> |
| | | android:layout_height="36dp"></ImageView> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="14.5dp" |
| | | android:layout_marginTop="7.5dp" |
| | | android:text="收藏" |
| | | android:textColor="#ff333333" |
| | | android:textSize="11sp" /> |
| | | android:textColor="#333333" |
| | | android:textSize="10sp" /> |
| | | |
| | | </LinearLayout> |
| | |
| | | android:id="@+id/ll_no_data" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/register_gray" |
| | | android:background="@color/page_bg_color" |
| | | android:gravity="center" |
| | | android:orientation="vertical" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_no_data" |
| | | <FrameLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@drawable/ic_no_data" /> |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_no_data_hint" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp" |
| | | android:text="暂无数据哟~~" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="15sp" /> |
| | | <ImageView |
| | | android:id="@+id/iv_no_data" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@drawable/ic_empty" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_no_data_hint" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom|center_horizontal" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginBottom="30dp" |
| | | android:text="哎呀,这里什么都没有~" |
| | | android:textColor="#999999" |
| | | android:textSize="15sp" /> |
| | | |
| | | </FrameLayout> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_invite_player" |
| | |
| | | |
| | | <include layout="@layout/item_yellow_notice" /> |
| | | |
| | | |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:id="@+id/rl_top_banner" |
| | | android:id="@+id/rl_recommend_top" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:visibility="gone" |
| | | app:ratio="0.4375"> |
| | | android:layout_marginBottom="10dp" |
| | | app:ratio="0.4475"> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | |
| | | |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/vp_recommend" |
| | | <com.lzj.gallery.library.views.BannerViewPager |
| | | android:id="@+id/vp_banner" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" /> |
| | | android:layout_height="match_parent"></com.lzj.gallery.library.views.BannerViewPager> |
| | | |
| | | <com.viewpagerindicator.LinePageIndicator |
| | | android:id="@+id/indicator_recommend" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:layout_marginLeft="15dp" |
| | | android:layout_marginRight="15dp" |
| | | android:padding="10dip" /> |
| | | </FrameLayout> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/white" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:orientation="vertical"> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rv_special_offer" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:numColumns="5" |
| | | android:visibility="visible"></androidx.recyclerview.widget.RecyclerView> |
| | | |
| | | <SeekBar |
| | | android:id="@+id/slide_indicator_point" |
| | | android:layout_width="50dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_horizontal" |
| | | android:layout_marginBottom="10dp" |
| | | android:focusable="true" |
| | | android:maxHeight="4dp" |
| | | android:minHeight="4dp" |
| | | android:progressDrawable="@drawable/bg_fast_scroll_bar_track" |
| | | android:thumb="@drawable/bg_fast_scroll_bar_thumb" |
| | | android:visibility="gone" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_fragment_activity" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginBottom="10dp" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_activity_bg" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:scaleType="centerCrop" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_fragment_activity" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rv_special_offer" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:numColumns="4" |
| | | android:visibility="visible"></androidx.recyclerview.widget.RecyclerView> |
| | | |
| | | <SeekBar |
| | | android:id="@+id/slide_indicator_point" |
| | | android:layout_width="50dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_horizontal" |
| | | android:layout_marginBottom="10dp" |
| | | android:focusable="true" |
| | | android:maxHeight="4dp" |
| | | android:minHeight="4dp" |
| | | android:progressDrawable="@drawable/bg_fast_scroll_bar_track" |
| | | android:thumb="@drawable/bg_fast_scroll_bar_thumb" |
| | | android:visibility="gone" /> |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/white" |
| | | android:orientation="horizontal" |
| | | android:paddingLeft="20dp" |
| | | android:paddingTop="15dp" |
| | | android:paddingRight="20dp" |
| | | android:paddingBottom="15dp"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_hot_img" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="20dp" |
| | | android:layout_marginTop="2dp" |
| | | android:layout_marginBottom="2dp" /> |
| | | |
| | | <FrameLayout |
| | | |
| | | android:layout_width="0dp" |
| | | android:id="@+id/fl_fragment_activity" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:layout_gravity="center" |
| | | android:layout_weight="1"> |
| | | |
| | | <ScrollView |
| | | android:id="@+id/sv_hot" |
| | | android:layout_width="wrap_content" |
| | | android:layout_marginBottom="10dp" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_activity_bg" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:scrollbars="none"> |
| | | android:scaleType="centerCrop" /> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <com.tejia.lijin.app.util.FlowLayout |
| | | android:id="@+id/flow_hot" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="left" /> |
| | | </FrameLayout> |
| | | </ScrollView> |
| | | <LinearLayout |
| | | android:id="@+id/ll_fragment_activity" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"></LinearLayout> |
| | | </FrameLayout> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_input" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:padding="5dp" |
| | | android:src="@drawable/ic_recommend_doscover_input" /> |
| | | </LinearLayout> |
| | | |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:id="@+id/rl_recommend_activity2" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/white" |
| | | android:visibility="gone" |
| | | app:ratio="0.2426"> |
| | | |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/vp_recommend_activity2" |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" /> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_special_offer" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginBottom="10dp" |
| | | android:background="@color/white" |
| | | android:orientation="vertical" |
| | | android:visibility="gone"></LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_limit_time_and_exchange" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_limit_time_buy" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:background="@color/white" |
| | | android:orientation="vertical" |
| | | android:visibility="visible"> |
| | | android:orientation="horizontal" |
| | | android:paddingLeft="20dp" |
| | | android:paddingTop="15dp" |
| | | android:paddingRight="20dp" |
| | | android:paddingBottom="15dp" |
| | | android:visibility="gone"> |
| | | |
| | | <LinearLayout |
| | | <ImageView |
| | | android:id="@+id/iv_hot_img" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="20dp" |
| | | android:layout_marginTop="2dp" |
| | | android:layout_marginBottom="2dp" /> |
| | | |
| | | <FrameLayout |
| | | |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:layout_weight="1"> |
| | | |
| | | <ScrollView |
| | | android:id="@+id/sv_hot" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:scrollbars="none"> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <com.tejia.lijin.app.util.FlowLayout |
| | | android:id="@+id/flow_hot" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="left" /> |
| | | </FrameLayout> |
| | | </ScrollView> |
| | | </FrameLayout> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_input" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:includeFontPadding="false" |
| | | android:text="限时秒杀" |
| | | android:textColor="@color/black" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_hour_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="15dp" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingLeft="3dp" |
| | | android:paddingTop="2dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="0" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_hour_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingTop="2dp" |
| | | android:paddingRight="3dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="1" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="4dp" |
| | | android:layout_marginRight="4dp" |
| | | android:includeFontPadding="false" |
| | | android:text=":" |
| | | android:textColor="@color/black" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_minute_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingLeft="3dp" |
| | | android:paddingTop="2dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="0" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_minute_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingTop="2dp" |
| | | android:paddingRight="3dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="1" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="4dp" |
| | | android:layout_marginRight="4dp" |
| | | android:includeFontPadding="false" |
| | | android:text=":" |
| | | android:textColor="@color/black" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_second_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingLeft="3dp" |
| | | android:paddingTop="2dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="0" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_second_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingTop="2dp" |
| | | android:paddingRight="3dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="1" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_limit_time_hint" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:includeFontPadding="false" |
| | | android:text="整点更新" |
| | | android:textColor="@color/gray2" |
| | | android:textSize="12sp" /> |
| | | |
| | | <com.wpc.library.widget.MyGridView |
| | | android:id="@+id/gv_limit_time_goods" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="10dp" |
| | | android:horizontalSpacing="10dp" |
| | | android:numColumns="2"> |
| | | |
| | | </com.wpc.library.widget.MyGridView> |
| | | android:layout_gravity="center" |
| | | android:padding="5dp" |
| | | android:src="@drawable/ic_recommend_doscover_input" /> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="1px" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/trends_goods_bg" /> |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:id="@+id/rl_recommend_activity2" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:visibility="gone" |
| | | app:ratio="0.2426"> |
| | | |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/vp_recommend_activity2" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" /> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_jinbi_exchange_buy" |
| | | android:layout_width="0dp" |
| | | android:id="@+id/ll_special_offer" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:background="@color/white" |
| | | android:layout_marginBottom="10dp" |
| | | android:orientation="vertical" |
| | | android:visibility="visible"> |
| | | android:visibility="gone"></LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_limit_time_and_exchange" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:id="@+id/ll_limit_time_buy" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:orientation="horizontal"> |
| | | android:layout_weight="1" |
| | | android:orientation="vertical" |
| | | android:visibility="visible"> |
| | | |
| | | <TextView |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:includeFontPadding="false" |
| | | android:text="金币兑换" |
| | | android:textColor="@color/black" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:includeFontPadding="false" |
| | | android:text="限时秒杀" |
| | | android:textColor="@color/black" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_hour_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="15dp" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingLeft="3dp" |
| | | android:paddingTop="2dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="0" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_hour_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingTop="2dp" |
| | | android:paddingRight="3dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="1" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="4dp" |
| | | android:layout_marginRight="4dp" |
| | | android:includeFontPadding="false" |
| | | android:text=":" |
| | | android:textColor="@color/black" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_minute_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingLeft="3dp" |
| | | android:paddingTop="2dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="0" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_minute_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingTop="2dp" |
| | | android:paddingRight="3dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="1" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="4dp" |
| | | android:layout_marginRight="4dp" |
| | | android:includeFontPadding="false" |
| | | android:text=":" |
| | | android:textColor="@color/black" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_second_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingLeft="3dp" |
| | | android:paddingTop="2dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="0" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_second_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:background="@color/recommend_limit_time" |
| | | android:includeFontPadding="false" |
| | | android:paddingTop="2dp" |
| | | android:paddingRight="3dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="1" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_limit_time_hint" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="15dp" |
| | | android:background="@drawable/shape_recommend_jinbi_exchange" |
| | | android:layout_marginLeft="10dp" |
| | | android:includeFontPadding="false" |
| | | android:paddingLeft="3dp" |
| | | android:paddingTop="2dp" |
| | | android:paddingRight="2dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="海量奖品" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | android:text="整点更新" |
| | | android:textColor="@color/gray2" |
| | | android:textSize="12sp" /> |
| | | |
| | | <com.wpc.library.widget.MyGridView |
| | | android:id="@+id/gv_limit_time_goods" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="10dp" |
| | | android:horizontalSpacing="10dp" |
| | | android:numColumns="2"> |
| | | |
| | | </com.wpc.library.widget.MyGridView> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_jinbi_exchange_hint" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:includeFontPadding="false" |
| | | android:text="整点更新" |
| | | android:textColor="@color/gray2" |
| | | android:textSize="12sp" /> |
| | | <View |
| | | android:layout_width="1px" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | <com.wpc.library.widget.MyGridView |
| | | android:id="@+id/gv_jinbi_exchange_goods" |
| | | android:layout_width="match_parent" |
| | | <LinearLayout |
| | | android:id="@+id/ll_jinbi_exchange_buy" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="10dp" |
| | | android:horizontalSpacing="10dp" |
| | | android:numColumns="2"> |
| | | android:layout_weight="1" |
| | | android:orientation="vertical" |
| | | android:visibility="visible"> |
| | | |
| | | </com.wpc.library.widget.MyGridView> |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:includeFontPadding="false" |
| | | android:text="金币兑换" |
| | | android:textColor="@color/black" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginLeft="15dp" |
| | | android:background="@drawable/shape_recommend_jinbi_exchange" |
| | | android:includeFontPadding="false" |
| | | android:paddingLeft="3dp" |
| | | android:paddingTop="2dp" |
| | | android:paddingRight="2dp" |
| | | android:paddingBottom="2dp" |
| | | android:text="海量奖品" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_jinbi_exchange_hint" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:includeFontPadding="false" |
| | | android:text="整点更新" |
| | | android:textColor="@color/gray2" |
| | | android:textSize="12sp" /> |
| | | |
| | | <com.wpc.library.widget.MyGridView |
| | | android:id="@+id/gv_jinbi_exchange_goods" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="10dp" |
| | | android:horizontalSpacing="10dp" |
| | | android:numColumns="2"> |
| | | |
| | | </com.wpc.library.widget.MyGridView> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <View |
| | |
| | | android:text="热卖" /> |
| | | |
| | | <RadioButton |
| | | android:id="@+id/rb_nav_record" |
| | | android:id="@+id/rb_nav_better_goods" |
| | | style="@style/navItemStyle" |
| | | android:drawableTop="@drawable/selector_nav_record" |
| | | android:text="足迹" /> |
| | | android:drawableTop="@drawable/selector_nav_better_goods" |
| | | android:text="好物" /> |
| | | |
| | | |
| | | <RadioButton |
| | |
| | | android:drawableLeft="@drawable/ic_back" |
| | | android:drawablePadding="3dp" |
| | | android:gravity="center" |
| | | android:padding="8dp" |
| | | android:paddingLeft="15dp" |
| | | android:paddingTop="8dp" |
| | | android:paddingRight="8dp" |
| | | android:paddingBottom="8dp" |
| | | android:textColor="@color/text_black_1" /> |
| | | |
| | | <TextView |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginLeft="6dp" |
| | | android:layout_toRightOf="@id/tv_top_bar_left" |
| | | android:gravity="center" |
| | | android:paddingTop="8dp" |
| | | android:layout_marginLeft="6dp" |
| | | android:paddingRight="8dp" |
| | | android:paddingBottom="8dp" |
| | | android:textColor="@color/text_black_1" |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerInParent="true" |
| | | android:background="@color/white" |
| | | android:maxLines="1" |
| | | android:ellipsize="end" |
| | | android:maxLines="1" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="18sp" |
| | | android:visibility="gone" /> |
| | |
| | | <color name="nav_text_color">#ABABAB</color> |
| | | |
| | | <color name="search_btn_text_color">#FF2B4B</color> |
| | | <color name="search_title_text_color">#000000</color> |
| | | <color name="search_content_text_color">#616161</color> |
| | | |
| | | |
| | | |
| | | <color name="capital_text_color">#4E2E00</color> |
| | | <color name="capital_text_light_color">#AF864B</color> |
| | | </resources> |
| | |
| | | </style> |
| | | |
| | | |
| | | <style name="myInfoItemStyle"> |
| | | <item name="android:layout_width">match_parent</item> |
| | | <item name="android:layout_height">wrap_content</item> |
| | | <item name="android:background">@color/white</item> |
| | | <item name="android:orientation">horizontal</item> |
| | | <item name="android:paddingTop">12.5dp</item> |
| | | <item name="android:paddingBottom">12.5dp</item> |
| | | <item name="android:minHeight">53dp</item> |
| | | <item name="android:gravity">center_vertical</item> |
| | | </style> |
| | | |
| | | |
| | | |
| | | |
| | | </resources> |
New file |
| | |
| | | apply plugin: 'com.android.library' |
| | | |
| | | android { |
| | | compileSdkVersion 28 |
| | | defaultConfig { |
| | | minSdkVersion 17 |
| | | targetSdkVersion 28 |
| | | versionCode 13 |
| | | versionName "1.3" |
| | | |
| | | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| | | |
| | | } |
| | | |
| | | buildTypes { |
| | | release { |
| | | minifyEnabled false |
| | | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| | | } |
| | | } |
| | | |
| | | lintOptions { |
| | | abortOnError false |
| | | } |
| | | |
| | | compileOptions { |
| | | sourceCompatibility = 1.8 |
| | | targetCompatibility = 1.8 |
| | | } |
| | | } |
| | | |
| | | dependencies { |
| | | implementation fileTree(dir: 'libs', include: ['*.jar']) |
| | | implementation project(path: ':library-mine') |
| | | |
| | | testImplementation 'junit:junit:4.12' |
| | | androidTestImplementation 'androidx.test.ext:junit:1.1.1' |
| | | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
| | | |
| | | } |
New file |
| | |
| | | # Add project specific ProGuard rules here. |
| | | # You can control the set of applied configuration files using the |
| | | # proguardFiles setting in build.gradle. |
| | | # |
| | | # For more details, see |
| | | # http://developer.android.com/guide/developing/tools/proguard.html |
| | | |
| | | # If your project uses WebView with JS, uncomment the following |
| | | # and specify the fully qualified class name to the JavaScript interface |
| | | # class: |
| | | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { |
| | | # public *; |
| | | #} |
| | | |
| | | # Uncomment this to preserve the line number information for |
| | | # debugging stack traces. |
| | | #-keepattributes SourceFile,LineNumberTable |
| | | |
| | | # If you keep the line number information, uncomment this to |
| | | # hide the original source file name. |
| | | #-renamesourcefileattribute SourceFile |
New file |
| | |
| | | package com.lzj.gallery.library; |
| | | |
| | | import android.content.Context; |
| | | import androidx.test.platform.app.InstrumentationRegistry; |
| | | import androidx.test.ext.junit.runners.AndroidJUnit4; |
| | | |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | |
| | | import static org.junit.Assert.*; |
| | | |
| | | /** |
| | | * Instrumented test, which will execute on an Android device. |
| | | * |
| | | * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> |
| | | */ |
| | | @RunWith(AndroidJUnit4.class) |
| | | public class ExampleInstrumentedTest { |
| | | @Test |
| | | public void useAppContext() throws Exception { |
| | | // Context of the app under test. |
| | | Context appContext = InstrumentationRegistry.getTargetContext(); |
| | | |
| | | assertEquals("com.lzj.gallery.library.test", appContext.getPackageName()); |
| | | } |
| | | } |
New file |
| | |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| | | package="com.lzj.gallery.library" |
| | | android:versionCode="1" |
| | | android:versionName="1.0"></manifest> |
New file |
| | |
| | | package com.lzj.gallery.library.adapter; |
| | | |
| | | import android.content.Context; |
| | | |
| | | import androidx.viewpager.widget.PagerAdapter; |
| | | |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.ImageView; |
| | | |
| | | import com.bumptech.glide.Glide; |
| | | import com.bumptech.glide.load.engine.DiskCacheStrategy; |
| | | import com.bumptech.glide.load.resource.bitmap.RoundedCorners; |
| | | import com.lzj.gallery.library.R; |
| | | import com.wpc.library.widget.RatioLayout; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by Administrator on 2018/11/28. |
| | | * banner的适配器 |
| | | */ |
| | | |
| | | public class BannerPagerAdapter extends PagerAdapter { |
| | | private List<String> mList; |
| | | private Context mContext; |
| | | private int defaultImg = R.mipmap.ic_banner_error;//默认图片 |
| | | private int mRoundCorners = -1; |
| | | private int mMaxNumber;//最大banner数 |
| | | private Float imgRatio; |
| | | |
| | | /** |
| | | * 默认 |
| | | * |
| | | * @param defaultImg |
| | | */ |
| | | public void setDefaultImg(int defaultImg) { |
| | | this.defaultImg = defaultImg; |
| | | } |
| | | |
| | | /** |
| | | * 设置圆角 |
| | | * |
| | | * @param mRoundCorners |
| | | */ |
| | | public void setmRoundCorners(int mRoundCorners) { |
| | | this.mRoundCorners = mRoundCorners; |
| | | } |
| | | |
| | | /** |
| | | * 点击回调 |
| | | */ |
| | | public interface OnClickImagesListener { |
| | | void onImagesClick(int position); |
| | | } |
| | | |
| | | private OnClickImagesListener mImagesListener; |
| | | |
| | | public void setOnClickImagesListener(OnClickImagesListener listener) { |
| | | mImagesListener = listener; |
| | | |
| | | } |
| | | |
| | | public BannerPagerAdapter(List<String> list, Context context, Float imgRatio) { |
| | | // this.mList = list; |
| | | this.imgRatio = imgRatio; |
| | | this.mContext = context; |
| | | if (mList == null) { |
| | | mList = list; |
| | | } |
| | | if (list.size() > 20) { |
| | | this.mMaxNumber = 20; |
| | | } else { |
| | | this.mMaxNumber = list.size(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int getCount() { |
| | | return mList.size() == 1 ? 1 : Integer.MAX_VALUE; |
| | | } |
| | | |
| | | @Override |
| | | public boolean isViewFromObject(View view, Object object) { |
| | | return view == object; |
| | | } |
| | | |
| | | @Override |
| | | public void destroyItem(ViewGroup container, int position, Object object) { |
| | | container.removeView((View) object); |
| | | } |
| | | |
| | | @Override |
| | | public Object instantiateItem(ViewGroup container, int position) { |
| | | View view = LayoutInflater.from(mContext).inflate(R.layout.banner_img_layout, container, false); |
| | | ViewGroup.LayoutParams params = view.getLayoutParams(); |
| | | ImageView imageView = view.findViewById(R.id.img); |
| | | RatioLayout rl = view.findViewById(R.id.rl_img); |
| | | if (imgRatio != null) |
| | | rl.setRatio(imgRatio); |
| | | |
| | | final int index = position % mMaxNumber; |
| | | LoadImage(mList.get(index), imageView); |
| | | //OnClick |
| | | imageView.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | mImagesListener.onImagesClick(index); |
| | | } |
| | | }); |
| | | |
| | | container.addView(view); |
| | | return view; |
| | | } |
| | | |
| | | /** |
| | | * 加载图片 |
| | | */ |
| | | public void LoadImage(String url, ImageView imageview) { |
| | | if (mRoundCorners == -1) { |
| | | Glide.with(mContext) |
| | | .load(url) |
| | | // .centerCrop() |
| | | .dontAnimate() |
| | | .placeholder(defaultImg)// 加载中图片 |
| | | .error(defaultImg) // 加载失败图片 |
| | | .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)//设置磁盘缓存 |
| | | .into(imageview); |
| | | } else { |
| | | Glide.with(mContext) |
| | | .load(url) |
| | | .centerCrop() |
| | | .dontAnimate() |
| | | .placeholder(defaultImg)// 加载中图片 |
| | | .error(defaultImg) // 加载失败图片 |
| | | .transform(new RoundedCorners(mRoundCorners)) // |
| | | .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)//设置磁盘缓存 |
| | | .into(imageview); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.lzj.gallery.library.transformer; |
| | | |
| | | import android.content.Context; |
| | | import android.content.res.Resources; |
| | | import android.graphics.Bitmap; |
| | | import android.graphics.BitmapShader; |
| | | import android.graphics.Canvas; |
| | | import android.graphics.Paint; |
| | | import android.graphics.RectF; |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; |
| | | import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; |
| | | |
| | | import java.security.MessageDigest; |
| | | |
| | | /** |
| | | * Created by Administrator on 2018/11/28. |
| | | * 自定义圆角 |
| | | */ |
| | | |
| | | public class CornerTransform extends BitmapTransformation { |
| | | |
| | | private static float radius = 0f; |
| | | |
| | | public CornerTransform(Context context) { |
| | | this(context, 4); |
| | | } |
| | | |
| | | public CornerTransform(Context context, int dp) { |
| | | // super(context); |
| | | radius = Resources.getSystem().getDisplayMetrics().density * dp; |
| | | } |
| | | |
| | | @Override protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) { |
| | | return roundCrop(pool, toTransform); |
| | | } |
| | | |
| | | private static Bitmap roundCrop(BitmapPool pool, Bitmap source) { |
| | | if (source == null) return null; |
| | | |
| | | Bitmap result = pool.get(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); |
| | | if (result == null) { |
| | | result = Bitmap.createBitmap(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); |
| | | } |
| | | |
| | | Canvas canvas = new Canvas(result); |
| | | Paint paint = new Paint(); |
| | | paint.setShader(new BitmapShader(source, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP)); |
| | | paint.setAntiAlias(true); |
| | | RectF rectF = new RectF(0f, 0f, source.getWidth(), source.getHeight()); |
| | | canvas.drawRoundRect(rectF, radius, radius, paint); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public String getId() { |
| | | return getClass().getName() + Math.round(radius); |
| | | } |
| | | |
| | | @Override |
| | | public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.lzj.gallery.library.transformer; |
| | | |
| | | import androidx.viewpager.widget.ViewPager; |
| | | import android.view.View; |
| | | |
| | | /** |
| | | * Created by Administrator on 2018/11/28. |
| | | * 3D画廊效果其实就是ViewPager的item切换时,进行缩放的动画效果 |
| | | * |
| | | */ |
| | | |
| | | public class ZoomPageTransformer implements ViewPager.PageTransformer { |
| | | |
| | | private static final float MAX_SCALE = 1.0f;//0缩放 |
| | | |
| | | private static final float MIN_SCALE = 0.90f;//0.85缩放 |
| | | |
| | | private float MIN_ALPHA = 1.0f;//最小透明度 |
| | | |
| | | public ZoomPageTransformer() { |
| | | } |
| | | public ZoomPageTransformer(float MIN_ALPHA) { |
| | | this.MIN_ALPHA = MIN_ALPHA; |
| | | } |
| | | @Override |
| | | public void transformPage(View view, float position) { |
| | | //setScaleY只支持api11以上 |
| | | /** |
| | | * (-oo,-1) 相对于左边第一页,其左边的所有页面 ** |
| | | * x、y拉伸为MIN_SCALE、透明度MIN_ALPHA |
| | | */ |
| | | if (position < -1) { |
| | | view.setScaleX(MIN_SCALE); |
| | | view.setScaleY(MIN_SCALE); |
| | | view.setAlpha(MIN_ALPHA); |
| | | } |
| | | /** |
| | | * [-1, 1 )当前页的左右第一页 |
| | | */ |
| | | else if (position < 1) { |
| | | float scaleFactor = MIN_SCALE + (1 - Math.abs(position)) * (MAX_SCALE - MIN_SCALE); |
| | | //[0, 1 ) 相对于当前选中页,其右边第一页 ** |
| | | if (position > 0) { |
| | | view.setTranslationX(-scaleFactor); |
| | | } |
| | | // [-1, 0 ) 相对于当前选中页,其左边的第一页** |
| | | else if (position < 0) { |
| | | view.setTranslationX(scaleFactor); |
| | | } |
| | | view.setScaleY(scaleFactor); |
| | | view.setScaleX(scaleFactor); |
| | | |
| | | // float alpha = 1f - Math.abs(position) * (1 - ); |
| | | |
| | | float alpha = MIN_ALPHA + (1 - MIN_ALPHA) * (1 - Math.abs(position)); |
| | | view.setAlpha(alpha); |
| | | |
| | | } |
| | | /** |
| | | * [1,+oo) 相对于右边第一页,其右边的所有页面 |
| | | * x、y拉伸为MIN_SCALE、透明度MIN_ALPHA |
| | | */ |
| | | else { // (1,+Infinity] |
| | | view.setScaleX(MIN_SCALE); |
| | | view.setScaleY(MIN_SCALE); |
| | | view.setAlpha(MIN_ALPHA); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.lzj.gallery.library.views; |
| | | |
| | | import android.annotation.SuppressLint; |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.os.Handler; |
| | | |
| | | import androidx.viewpager.widget.ViewPager; |
| | | |
| | | import android.util.AttributeSet; |
| | | import android.util.Log; |
| | | import android.view.LayoutInflater; |
| | | import android.view.MotionEvent; |
| | | import android.view.View; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.RelativeLayout; |
| | | |
| | | import com.lzj.gallery.library.R; |
| | | import com.lzj.gallery.library.adapter.BannerPagerAdapter; |
| | | import com.lzj.gallery.library.transformer.ZoomPageTransformer; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by Administrator on 2018/11/28. |
| | | * banner的控件处理 |
| | | */ |
| | | |
| | | public class BannerViewPager extends RelativeLayout implements ViewPager.OnPageChangeListener { |
| | | private View mLayout;//布局 |
| | | private Activity mContext;//上下文 |
| | | private ViewPager mViewPager;//viewpager |
| | | private BannerPagerAdapter mPagerAdapter;//adapter |
| | | private LinearLayout mLineIndicator;//指示器集合容器 |
| | | private ImageView[] mImageView;//小圆点imageview对象 |
| | | private List<String> mList;//url数组 |
| | | private int mMaxNumber;//最大banner数 |
| | | private int currentIndex = 0;//当前实际page |
| | | private int startCurrentIndex = 0;//当前page |
| | | private long secondTime = 0, firstTime = 0; |
| | | private boolean isSlide = false; |
| | | //private Timer mTimer=null;//定时器 |
| | | //private MyTimerTask mTimerTask=null; |
| | | |
| | | private Handler mHandler = null; |
| | | private AutoRollRunnable mAutoRollRunnable = null; |
| | | private int mRollTime = 5000; |
| | | |
| | | |
| | | private int resId_piont_press = R.mipmap.ic_banner_point_press; |
| | | private int resId_piont = R.mipmap.ic_banner_point; |
| | | private boolean isPoint = false;//开启指示器 |
| | | private float imgRatio;//显示图片的宽高比 |
| | | |
| | | public interface OnClickBannerListener { |
| | | void onBannerClick(int position); |
| | | } |
| | | |
| | | private OnClickBannerListener mBannerListener; |
| | | |
| | | public BannerViewPager addBannerListener(OnClickBannerListener listener) { |
| | | mBannerListener = listener; |
| | | return this; |
| | | } |
| | | |
| | | //ui更新 |
| | | // Handler mHandler=mHandler= new Handler(){ |
| | | // public void handleMessage(Message msg) { |
| | | // int index = mViewPager.getCurrentItem()+1;//下一个页 |
| | | // mViewPager.setCurrentItem(index);//设置此次要显示的pager |
| | | // currentIndex=index%mList.size(); |
| | | // setImageBackground(currentIndex); |
| | | // } |
| | | // }; |
| | | public BannerViewPager(Context context) { |
| | | super(context); |
| | | } |
| | | |
| | | public BannerViewPager(Context context, AttributeSet attrs, int defStyleAttr) { |
| | | super(context, attrs, defStyleAttr); |
| | | } |
| | | |
| | | public BannerViewPager(Context context, AttributeSet attrs) { |
| | | super(context, attrs); |
| | | this.mContext = (Activity) context; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 初始化viewpager |
| | | * |
| | | * @param list url集合 |
| | | * @param isGallery 是否使用3D画廊效果 |
| | | */ |
| | | public BannerViewPager initBanner(List<String> list, boolean isGallery, float imgRatio) { |
| | | this.imgRatio = imgRatio; |
| | | checkException(list); |
| | | if (mList == null) { |
| | | mList = list; |
| | | if (list.size() > 20) { |
| | | mMaxNumber = 20; |
| | | } else { |
| | | mMaxNumber = list.size(); |
| | | } |
| | | } |
| | | Log.i("test", "----------------------size=" + mList.size()); |
| | | |
| | | //引入布局 |
| | | mLayout = LayoutInflater.from(mContext).inflate(R.layout.banner_view_layout, null); |
| | | mViewPager = mLayout.findViewById(R.id.viewPager);//关闭 |
| | | mLineIndicator = mLayout.findViewById(R.id.lineIndicator); |
| | | //初始化位置 |
| | | // if (list.size() == 1) { |
| | | // startCurrentIndex = 0; |
| | | // } |
| | | currentIndex = startCurrentIndex % mMaxNumber; |
| | | |
| | | mPagerAdapter = new BannerPagerAdapter(mList, mContext, imgRatio); |
| | | mPagerAdapter.setOnClickImagesListener(new BannerPagerAdapter.OnClickImagesListener() { |
| | | @Override |
| | | public void onImagesClick(int position) { |
| | | if (mBannerListener != null) { |
| | | mBannerListener.onBannerClick(position); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | mViewPager.setAdapter(mPagerAdapter); |
| | | if (isGallery) { |
| | | mViewPager.setPageTransformer(true, new ZoomPageTransformer()); |
| | | } |
| | | |
| | | mViewPager.setCurrentItem(startCurrentIndex); |
| | | mViewPager.setOffscreenPageLimit(2);//设置预加载的数量,这里设置了2,会预加载中心item左边两个Item和右边两个Item |
| | | mViewPager.addOnPageChangeListener(this); |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 是否有adapter |
| | | * |
| | | * @return |
| | | */ |
| | | public boolean hasAdapter() { |
| | | return mViewPager != null && mViewPager.getAdapter() != null; |
| | | } |
| | | |
| | | public void notifyDataSetChanged() { |
| | | if (mPagerAdapter != null) |
| | | mPagerAdapter.notifyDataSetChanged(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 初始化viewpager |
| | | * |
| | | * @param list url集合 |
| | | * @param isGallery 是否使用3D画廊效果 |
| | | * @param alpha 滑动透明度变化 |
| | | */ |
| | | public BannerViewPager initBanner(List<String> list, boolean isGallery, float imgRatio, float alpha) { |
| | | checkException(list); |
| | | this.imgRatio = imgRatio; |
| | | if (mList == null) { |
| | | mList = list; |
| | | if (list.size() > 20) { |
| | | this.mMaxNumber = 20; |
| | | } else { |
| | | this.mMaxNumber = list.size(); |
| | | } |
| | | } |
| | | Log.i("test", "----------------------size=" + mList.size()); |
| | | //引入布局 |
| | | mLayout = LayoutInflater.from(mContext).inflate(R.layout.banner_view_layout, null); |
| | | mViewPager = mLayout.findViewById(R.id.viewPager);//关闭 |
| | | mLineIndicator = mLayout.findViewById(R.id.lineIndicator); |
| | | //初始化位置 |
| | | currentIndex = startCurrentIndex % mMaxNumber; |
| | | |
| | | mPagerAdapter = new BannerPagerAdapter(mList, mContext, imgRatio); |
| | | mPagerAdapter.setOnClickImagesListener(new BannerPagerAdapter.OnClickImagesListener() { |
| | | @Override |
| | | public void onImagesClick(int position) { |
| | | if (mBannerListener != null) { |
| | | mBannerListener.onBannerClick(position); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | mViewPager.setAdapter(mPagerAdapter); |
| | | if (isGallery) { |
| | | mViewPager.setPageTransformer(true, new ZoomPageTransformer(alpha)); |
| | | } |
| | | |
| | | mViewPager.setCurrentItem(startCurrentIndex); |
| | | mViewPager.setOffscreenPageLimit(2);//设置预加载的数量,这里设置了2,会预加载中心item左边两个Item和右边两个Item |
| | | mViewPager.addOnPageChangeListener(this); |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 添加默认图片,当加载失败后显示 |
| | | * |
| | | * @param resId_img |
| | | * @return |
| | | */ |
| | | public BannerViewPager addDefaultImg(int resId_img) { |
| | | mPagerAdapter.setDefaultImg(resId_img); |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 添加圆角 |
| | | * |
| | | * @param corners |
| | | * @return |
| | | */ |
| | | public BannerViewPager addRoundCorners(int corners) { |
| | | mPagerAdapter.setmRoundCorners(corners); |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * @param columnMargin 两个Page之间的距离 |
| | | * @param rowMargin page的外边距 |
| | | * 注意当添加了3D画廊效果时,columnMargin尽量设小。应该本是已经进行了x、y的缩放 |
| | | */ |
| | | public BannerViewPager addPageMargin(int columnMargin, int rowMargin) { |
| | | |
| | | mViewPager.setPageMargin(dip2px(columnMargin)); |
| | | RelativeLayout.LayoutParams layout = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, |
| | | RelativeLayout.LayoutParams.WRAP_CONTENT); |
| | | layout.setMargins(dip2px(rowMargin), 0, dip2px(rowMargin), 0); |
| | | mViewPager.setLayoutParams(layout); |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 添加小圆点 |
| | | * |
| | | * @param distance 间距 |
| | | */ |
| | | public BannerViewPager addPointMargin(int distance) { |
| | | isPoint = true; |
| | | mImageView = new ImageView[mMaxNumber]; |
| | | mLineIndicator.removeAllViews(); |
| | | for (int i = 0; i < mMaxNumber; i++) { |
| | | ImageView imageView = new ImageView(mContext); |
| | | |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); |
| | | params.setMargins(dip2px(distance) / 2, 0, dip2px(distance) / 2, 0); |
| | | imageView.setLayoutParams(params); |
| | | if (i == currentIndex) { |
| | | imageView.setImageResource(resId_piont_press); |
| | | } else { |
| | | imageView.setImageResource(resId_piont); |
| | | } |
| | | mImageView[i] = imageView; |
| | | mLineIndicator.addView(imageView); |
| | | } |
| | | |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 添加小圆点 |
| | | * |
| | | * @param distance 间距 |
| | | * @param piont_press 替换选中图标 |
| | | * @param piont 替换未选中图片 |
| | | */ |
| | | public BannerViewPager addPoint(int distance, int piont_press, int piont) { |
| | | isPoint = true; |
| | | resId_piont_press = piont_press; |
| | | resId_piont = piont; |
| | | mImageView = new ImageView[mMaxNumber]; |
| | | for (int i = 0; i < mMaxNumber; i++) { |
| | | ImageView imageView = new ImageView(mContext); |
| | | |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); |
| | | params.setMargins(dip2px(distance) / 2, 0, dip2px(distance) / 2, 0); |
| | | imageView.setLayoutParams(params); |
| | | if (i == currentIndex) { |
| | | imageView.setImageResource(resId_piont_press); |
| | | } else { |
| | | imageView.setImageResource(resId_piont); |
| | | } |
| | | mImageView[i] = imageView; |
| | | mLineIndicator.addView(imageView); |
| | | } |
| | | |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 添加小圆点底部间距 |
| | | * |
| | | * @param paddBottom |
| | | */ |
| | | public BannerViewPager addPointBottom(int paddBottom) { |
| | | mLineIndicator.setPadding(0, 0, 0, dip2px(paddBottom)); |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 配置完成,将布局添加到父容器 |
| | | */ |
| | | public BannerViewPager finishConfig() { |
| | | this.removeAllViews(); |
| | | this.addView(mLayout); |
| | | return this; |
| | | } |
| | | |
| | | //开始轮播 |
| | | public BannerViewPager addStartTimer(int time) { |
| | | mRollTime = time; |
| | | if (mHandler == null) { |
| | | mHandler = new Handler(); |
| | | } |
| | | if (mAutoRollRunnable == null) { |
| | | mAutoRollRunnable = new AutoRollRunnable(); |
| | | } |
| | | |
| | | mAutoRollRunnable.start(); |
| | | return this; |
| | | } |
| | | |
| | | // 停止轮播 |
| | | public void stopTimer() { |
| | | if (mAutoRollRunnable != null) { |
| | | mAutoRollRunnable.stop(); |
| | | } |
| | | } |
| | | |
| | | private class AutoRollRunnable implements Runnable { |
| | | //是否在轮播的标志 |
| | | boolean isRunning = false; |
| | | |
| | | @SuppressLint("ClickableViewAccessibility") |
| | | @Override |
| | | public void run() { |
| | | if (isRunning && !isSlide) { |
| | | int index = mViewPager.getCurrentItem() + 1;//下一个页 |
| | | mViewPager.setCurrentItem(index);//设置此次要显示的pager |
| | | currentIndex = index % mMaxNumber; |
| | | setImageBackground(currentIndex); |
| | | mHandler.postDelayed(this, 1000 * mRollTime); |
| | | } |
| | | if (isSlide) { |
| | | mHandler.postDelayed(this, 1000 * mRollTime); |
| | | isSlide = false; |
| | | } |
| | | //轮播图触摸监听,解决滑动计时无法停止的问题 |
| | | /* |
| | | * viewPager监听触摸事件,因为我们要保证用户在手动滑动viewPager后,系统重新计时,viewPage按一定时间间隔循环展示, |
| | | * 当手指按上屏幕或者是手指出现滑动动作,子线程都必须撤销(计时也就是消失) |
| | | * 当手机松开之后系统重新计时,子线程与UI线程绑定,进行计时操作 |
| | | */ |
| | | mViewPager.setOnTouchListener(new View.OnTouchListener() { |
| | | @Override |
| | | public boolean onTouch(View v, MotionEvent event) { |
| | | switch (event.getAction()) { |
| | | case MotionEvent.ACTION_DOWN: |
| | | case MotionEvent.ACTION_MOVE: |
| | | mHandler.removeCallbacks(mAutoRollRunnable); |
| | | break; |
| | | case MotionEvent.ACTION_UP: |
| | | isSlide = true; |
| | | mHandler.post(mAutoRollRunnable); |
| | | break; |
| | | } |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | public void start() { |
| | | if (!isRunning) { |
| | | isRunning = true; |
| | | mHandler.removeCallbacks(this); |
| | | mHandler.postDelayed(this, 1000 * mRollTime); |
| | | } |
| | | } |
| | | |
| | | public void stop() { |
| | | if (isRunning) { |
| | | mHandler.removeCallbacks(this); |
| | | isRunning = false; |
| | | } |
| | | } |
| | | } |
| | | // /** |
| | | // * 开启定时器 |
| | | // * @param time |
| | | // */ |
| | | // public BannerViewPager addStartTimer(int time) { |
| | | // if (mTimer == null) { |
| | | // mTimer = new Timer(); |
| | | // } |
| | | // if(mTimerTask==null){ |
| | | // mTimerTask=new MyTimerTask(); |
| | | // } |
| | | // mTimer.schedule(mTimerTask, 3000, 1000*time); |
| | | // return this; |
| | | // } |
| | | // /** |
| | | // * 停止定时器 |
| | | // */ |
| | | // public void stopTimer(){ |
| | | // if(mTimer!=null){ |
| | | // mTimer.cancel(); |
| | | // mTimer = null; |
| | | // } |
| | | // if(mTimerTask!=null){ |
| | | // mTimerTask.cancel(); |
| | | // mTimerTask = null; |
| | | // } |
| | | // } |
| | | // class MyTimerTask extends TimerTask { |
| | | // @Override |
| | | // public void run() { |
| | | // mHandler.sendEmptyMessage(1001);//在此线程中,不能操作ui主线程 |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 根据手机的分辨率从 dp 的单位 转成为 px(像素) |
| | | */ |
| | | public int dip2px(float dpValue) { |
| | | final float scale = mContext.getResources().getDisplayMetrics().density; |
| | | return (int) (dpValue * scale + 0.5f); |
| | | } |
| | | |
| | | //---------------viewpager滑动事件----------------- |
| | | @Override |
| | | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { |
| | | } |
| | | |
| | | @Override |
| | | public void onPageScrollStateChanged(int state) { |
| | | } |
| | | |
| | | /** |
| | | * 滑动时同步改变底部小圆点 |
| | | * |
| | | * @param position |
| | | */ |
| | | @Override |
| | | public void onPageSelected(int position) { |
| | | currentIndex = position % mMaxNumber; |
| | | setImageBackground(currentIndex); |
| | | } |
| | | |
| | | /** |
| | | * 改变指示器 |
| | | * |
| | | * @param selectItemsIndex |
| | | */ |
| | | private void setImageBackground(int selectItemsIndex) { |
| | | if (isPoint) { |
| | | for (int i = 0; i < mImageView.length; i++) { |
| | | if (i == selectItemsIndex) { |
| | | mImageView[i].setImageResource(resId_piont_press); |
| | | |
| | | } else { |
| | | mImageView[i].setImageResource(resId_piont); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 检查异常 |
| | | * |
| | | * @param list |
| | | */ |
| | | private void checkException(List<String> list) { |
| | | if (list == null) { |
| | | throw new NullPointerException("The array is null at initBanner function"); |
| | | } |
| | | if (list.size() == 0) { |
| | | throw new ArithmeticException("Your array size is 0"); |
| | | } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center_horizontal"> |
| | | |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:id="@+id/rl_img" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:ratio="0.7"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/img" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:scaleType="fitXY" /> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | </RelativeLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <RelativeLayout |
| | | xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:id="@+id/rootView" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:clipChildren="false"> |
| | | |
| | | <!--viewpager--> |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/viewPager" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:clipChildren="false" |
| | | android:layout_marginLeft="60dp" |
| | | android:layout_marginRight="60dp"/> |
| | | |
| | | <!--指示器--> |
| | | <LinearLayout |
| | | android:id="@+id/lineIndicator" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_alignParentBottom="true" |
| | | android:layout_centerHorizontal="true" |
| | | android:orientation="horizontal" |
| | | android:paddingBottom="7dp" |
| | | android:visibility="visible" |
| | | android:gravity="center"> |
| | | |
| | | <!--<ImageView--> |
| | | <!--android:layout_width="wrap_content"--> |
| | | <!--android:layout_height="wrap_content"--> |
| | | <!--android:src="@mipmap/ic_banner_point_press"--> |
| | | <!--android:layout_marginLeft="8dp"--> |
| | | <!--android:layout_marginRight="8dp"/>--> |
| | | |
| | | </LinearLayout> |
| | | |
| | | |
| | | |
| | | </RelativeLayout> |
New file |
| | |
| | | <resources> |
| | | <string name="app_name">gallery</string> |
| | | </resources> |
New file |
| | |
| | | package com.lzj.gallery.library; |
| | | |
| | | import org.junit.Test; |
| | | |
| | | import static org.junit.Assert.*; |
| | | |
| | | /** |
| | | * Example local unit test, which will execute on the development machine (host). |
| | | * |
| | | * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> |
| | | */ |
| | | public class ExampleUnitTest { |
| | | @Test |
| | | public void addition_isCorrect() throws Exception { |
| | | assertEquals(4, 2 + 2); |
| | | } |
| | | } |
| | |
| | | include ':app', ':library-mine', ':social_sdk_library_project', ':library-ViewPagerIndicator', ':APPUpdate', ':guide', ':JdSDK', ":UMLibrary" |
| | | include ':app', ':library-mine', ':social_sdk_library_project', ':library-ViewPagerIndicator', ':APPUpdate', ':guide', ':JdSDK', ":UMLibrary", ":library-gallery" |