| | |
| | | applicationId "com.tejia.lijin" |
| | | minSdkVersion 17 |
| | | targetSdkVersion 26 |
| | | versionCode 63//2.0.2 |
| | | versionName "1.0.3" |
| | | versionCode 64//2.0.2 |
| | | versionName "1.1" |
| | | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' |
| | | } |
| | | |
| | |
| | | |
| | | public static OkHttpClient mOkHttpClientSoon;//okHttpClient 实例 |
| | | |
| | | private final static String API_PACKAGE_NAME = "com.youhuiquan.android"; |
| | | public final static String API_PACKAGE_NAME = "com.youhuiquan.android"; |
| | | |
| | | static { |
| | | mOkHttpClient = new OkHttpClient.Builder() |
| | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("orderId", orderId); |
| | | params.put("userInfo.id", uid + ""); |
| | | params.put("type", type + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "lostOrder/findLostOrder", params, handler); |
| | | } |
| | | |
| | |
| | | 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.setTextColor(mContext.getResources().getColor(R.color.text_black_1)); |
| | | 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)); |
| | |
| | | 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.setTextSize(13); |
| | | tv.setLines(1); |
| | | tv.setTextColor(context.getResources().getColor(R.color.search_content_text_color)); |
| | | tv.setEllipsize(TextUtils.TruncateAt.END); |
| | |
| | | tv.setLines(1); |
| | | tv.setTextColor(mContext.getResources().getColor(R.color.text_black_1)); |
| | | tv.setEllipsize(TextUtils.TruncateAt.END); |
| | | tv.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.shape_search1)); |
| | | tv.setBackgroundDrawable(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).getName()); |
| | | tv.setOnClickListener(new View.OnClickListener() { |
| | |
| | | params.setMargins(0, 0, rightPo, bottomPo); |
| | | params.gravity = Gravity.BOTTOM | Gravity.RIGHT; |
| | | iv_slid_top.setLayoutParams(params); |
| | | tv_recommend.setTextColor(getResources().getColor(R.color.main_text_color)); |
| | | tv_recommend.setTextColor(getResources().getColor(R.color.theme)); |
| | | findViewById(R.id.ll_price_input).setVisibility(View.GONE); |
| | | findViewById(R.id.ll_sale_num_input).setVisibility(View.GONE); |
| | | rl_search.setColorSchemeColors(getResources().getColor(R.color.theme)); |
| | |
| | | fastFillters.clear(); |
| | | iv_multiple.setImageResource(R.drawable.ic_multiple_unselected); |
| | | iv_price.setImageResource(R.mipmap.ic_sort_no_selected); |
| | | tv_recommend.setTextColor(getResources().getColor(R.color.main_text_color)); |
| | | tv_recommend.setTextColor(getResources().getColor(R.color.theme)); |
| | | tv_multiple.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_price.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_sale_num.setTextColor(getResources().getColor(R.color.black)); |
| | |
| | | findViewById(R.id.ll_sale_num_input).setVisibility(View.GONE); |
| | | iv_price.setImageResource(R.mipmap.ic_sort_no_selected); |
| | | tv_recommend.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_multiple.setTextColor(getResources().getColor(R.color.main_text_color)); |
| | | tv_multiple.setTextColor(getResources().getColor(R.color.theme)); |
| | | tv_price.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_sale_num.setTextColor(getResources().getColor(R.color.black)); |
| | | order = 4; |
| | |
| | | iv_multiple.setImageResource(R.drawable.ic_multiple_unselected); |
| | | tv_recommend.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_multiple.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_price.setTextColor(getResources().getColor(R.color.main_text_color)); |
| | | tv_price.setTextColor(getResources().getColor(R.color.theme)); |
| | | tv_sale_num.setTextColor(getResources().getColor(R.color.black)); |
| | | |
| | | setData(page); |
| | |
| | | tv_recommend.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_multiple.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_price.setTextColor(getResources().getColor(R.color.black)); |
| | | tv_sale_num.setTextColor(getResources().getColor(R.color.main_text_color)); |
| | | tv_sale_num.setTextColor(getResources().getColor(R.color.theme)); |
| | | |
| | | setData(page); |
| | | break; |
| | |
| | | import android.widget.TextView; |
| | | |
| | | import com.bumptech.glide.Glide; |
| | | import com.bumptech.glide.load.engine.DiskCacheStrategy; |
| | | import com.bumptech.glide.request.RequestOptions; |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.SecondCategory; |
| | | import com.tejia.lijin.app.util.GlideCircleTransform; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.CategoryCustomEvent; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | holder = (Holder) convertView.getTag(); |
| | | } |
| | | if (mList.get(position).getPicture() != null) { |
| | | Glide.with(mContext).load(mList.get(position).getPicture()) |
| | | .placeholder(R.drawable.ic_goods_default) //设置等待时的图片 |
| | | .transform(new GlideCircleTransform(mContext)) |
| | | Glide.with(mContext).load(mList.get(position).getPicture()).apply(new RequestOptions().dontAnimate().error(R.drawable.ic_goods_default).skipMemoryCache(false)) |
| | | .transform(new GlideRoundTransform(mContext,50)) |
| | | .diskCacheStrategy(DiskCacheStrategy.ALL) |
| | | .into(holder.iv_category); |
| | | convertView.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | |
| | | adapter = new SendCircleAdapter(getActivity(), mBannerList, mContentList, BetterGoodsFragment.this, new TextViewUtil.URLClickListener() { |
| | | @Override |
| | | public void onClick(final String url) { |
| | | prepareAction(new IPrePareSuccessListener() { |
| | | @Override |
| | | public void onSuccess() { |
| | | ShoppingApi.evaluateConvertLink( |
| | | getContext(), UserUtil. |
| | | getUid(getContext()), url, new |
| | |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | rv_better_goods.setRecycledViewPool(new RecyclerView.RecycledViewPool()); |
| | | rv_better_goods.setAdapter(adapter); |
| | | |
| | |
| | | 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(); |
| | | DialogUtil.show(pd); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | pd.dismiss(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); |
| | | window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
| | | | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); |
| | | |
| | | // window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); |
| | | |
| | | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); |
| | | window.setStatusBarColor(Color.TRANSPARENT); |
| | | int result = 0; |
| | |
| | | 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); |
| | |
| | | listener(contentView); |
| | | app = new UpdateApp(getActivity(), getResources().getString(R.string.update_key)); |
| | | mPermissionsChecker = new PermissionHelper(getActivity(), this); |
| | | // startActivity(new Intent(getContext(),ShareBrowserActivity.class).putExtra("url","http://vip.tejia.yeshitv.com/index.html")); |
| | | // startActivity(new Intent(getContext(),ShareBrowserActivity.class).putExtra("url","http://192.168.3.122:8848/flqFront/apppage/goods_img.html?id=640478500588")); |
| | | } |
| | | |
| | | private void init(View contentView) { |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { |
| | | Window window = getActivity().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); |
| | | //设置状态栏文字颜色及图标为深色 |
| | | // getActivity().getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); |
| | | } |
| | | //设置状态栏文字颜色及图标为深色 |
| | | getActivity().getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); |
| | | this.options = new DisplayImageOptions.Builder() |
| | | .showImageForEmptyUri(R.drawable.ic_default_portrait) |
| | | .showImageOnFail(R.drawable.ic_default_portrait) |
| | |
| | | result = getActivity().getResources().getDimensionPixelSize(resourceId); |
| | | } |
| | | //设置状态栏文字颜色及图标为深色 |
| | | getActivity().getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); |
| | | // getActivity().getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, |
| | | result); |
| | | // contentView.findViewById(R.id.v_status_bar).setLayoutParams(params); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } else { |
| | | if (contentView.findViewById(R.id.v_status_bar) != null) |
| | | contentView.findViewById(R.id.v_status_bar).setVisibility(View.GONE); |
| | | } |
| | | |
| | |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | | import android.text.InputType; |
| | | import android.view.KeyEvent; |
| | | import android.view.MotionEvent; |
| | | import android.view.View; |
| | | import android.view.WindowManager; |
| | | import android.view.inputmethod.InputMethodManager; |
| | | import android.widget.CompoundButton; |
| | | import android.widget.EditText; |
| | | import android.widget.FrameLayout; |
| | | import android.widget.ImageView; |
| | |
| | | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback; |
| | | import com.androidquery.AQuery; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | /** |
| | | * 订单找回 fragment |
| | | */ |
| | | public class FragmentOrderAppeal extends RetainViewFragment implements View.OnClickListener { |
| | | public class FragmentOrderAppeal extends RetainViewFragment implements View.OnClickListener, CompoundButton.OnCheckedChangeListener { |
| | | private TextView tv_refer_appeal, tv_order_appeal_doubt; |
| | | private EditText et_orderId; |
| | | private TextView tv_notice_content, iv_order_coursetxt; |
| | | private LinearLayout ll_notice; |
| | | private ImageView iv_close; |
| | | private ScrollView sv_content; |
| | | private TextView tv_order_appeal_aout;//自动找回 |
| | | private ImageView iv_order_course;//图片教程 |
| | | |
| | | private int clickState = 0; |
| | | private Bundle mBundle;//传递过来的值 |
| | | private String TYPE = "orderFind";//默认淘宝 |
| | | private AQuery mAQuery; |
| | | |
| | | @Override |
| | | public int getContentResource() { |
| | |
| | | |
| | | @Override |
| | | public void onCreateView(View contentView, Bundle savedInstanceState) { |
| | | mAQuery = new AQuery(contentView); |
| | | tv_refer_appeal = contentView.findViewById(R.id.tv_refer_appeal); |
| | | tv_order_appeal_doubt = contentView.findViewById(R.id.tv_order_appeal_doubt); |
| | | et_orderId = contentView.findViewById(R.id.et_order_id); |
| | |
| | | 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); |
| | | sv_content = contentView.findViewById(R.id.sv_content); |
| | | iv_order_coursetxt = contentView.findViewById(R.id.iv_order_coursetxt); |
| | | iv_order_course = contentView.findViewById(R.id.iv_order_course); |
| | | mAQuery.id(R.id.cb_tb).getCheckBox().setOnCheckedChangeListener(this); |
| | | mAQuery.id(R.id.cb_jd).getCheckBox().setOnCheckedChangeListener(this); |
| | | mAQuery.id(R.id.cb_pdd).getCheckBox().setOnCheckedChangeListener(this); |
| | | mAQuery.id(R.id.cb_vip).getCheckBox().setOnCheckedChangeListener(this); |
| | | mAQuery.id(R.id.cb_suning).getCheckBox().setOnCheckedChangeListener(this); |
| | | mAQuery.id(R.id.cb_elme).getCheckBox().setOnCheckedChangeListener(this); |
| | | |
| | | |
| | | et_orderId.setCursorVisible(true); |
| | | et_orderId.setOnClickListener(this); |
| | | et_orderId.setOnEditorActionListener(new TextView.OnEditorActionListener() { |
| | | @Override |
| | | public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { |
| | | tv_refer_appeal.performClick(); |
| | | return true; |
| | | } |
| | | }); |
| | | tv_refer_appeal.setOnClickListener(this); |
| | | tv_order_appeal_doubt.setOnClickListener(this); |
| | | tv_order_appeal_aout.setOnClickListener(this); |
| | |
| | | //如果上面的代码没有弹出软键盘 可以使用下面另一种方式 |
| | | //InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); |
| | | // imm.showSoftInput(editText, 0); |
| | | sv_content.fullScroll(ScrollView.FOCUS_DOWN); |
| | | } |
| | | |
| | | private int showCount = 0; |
| | |
| | | return; |
| | | } |
| | | |
| | | ShoppingApi.setOrderAppeal(getContext(), et_orderId.getText().toString(), uid, mBundle.getInt("id") + "", new BasicTextHttpResponseHandler() { |
| | | Integer type = getCheckSourceType(); |
| | | if (type == null) { |
| | | Toast.makeText(getContext(), "请选择订单渠道", Toast.LENGTH_SHORT).show(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | ShoppingApi.setOrderAppeal(getContext(), et_orderId.getText().toString(), uid, type + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | if (pd != null && pd.isShowing()) |
| | | pd.dismiss(); |
| | | } |
| | | |
| | | int[] sourceIds = new int[]{R.id.cb_tb, R.id.cb_jd, R.id.cb_pdd, R.id.cb_vip, R.id.cb_suning, R.id.cb_elme}; |
| | | |
| | | @Override |
| | | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { |
| | | if (isChecked) { |
| | | for (int id : sourceIds) { |
| | | if (id != buttonView.getId()) { |
| | | mAQuery.id(id).checked(false); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private Integer getCheckSourceType() { |
| | | |
| | | int selectId = -1; |
| | | for (int id : sourceIds) { |
| | | if (mAQuery.id(id).isChecked()) { |
| | | selectId = id; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | switch (selectId) { |
| | | case R.id.cb_tb: |
| | | return Constant.GOODS_TYPE_TB; |
| | | case R.id.cb_jd: |
| | | return Constant.GOODS_TYPE_JD; |
| | | case R.id.cb_pdd: |
| | | return Constant.GOODS_TYPE_PDD; |
| | | case R.id.cb_vip: |
| | | return Constant.GOODS_TYPE_VIP; |
| | | case R.id.cb_suning: |
| | | return Constant.GOODS_TYPE_SUNING; |
| | | case R.id.cb_elme: |
| | | return Constant.GOODS_TYPE_TB; |
| | | } |
| | | return null; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import android.graphics.Typeface; |
| | | import android.graphics.drawable.AnimationDrawable; |
| | | import android.graphics.drawable.GradientDrawable; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | |
| | | import android.view.animation.Animation; |
| | | import android.view.animation.AnimationUtils; |
| | | import android.view.animation.DecelerateInterpolator; |
| | | import android.webkit.WebChromeClient; |
| | | import android.webkit.WebResourceRequest; |
| | | import android.webkit.WebSettings; |
| | | import android.webkit.WebView; |
| | | import android.webkit.WebViewClient; |
| | |
| | | import java.util.List; |
| | | import java.util.Timer; |
| | | |
| | | import androidx.annotation.RequiresApi; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | import androidx.viewpager.widget.PagerAdapter; |
| | |
| | | animationDrawable.start(); |
| | | webView.setWebViewClient(new MWebviewClient()); |
| | | WebSettings settings = webView.getSettings(); |
| | | settings.setUserAgentString("Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"); |
| | | settings.setJavaScriptEnabled(true); |
| | | webView.setInitialScale(100); |
| | | ll_loading.setVisibility(View.VISIBLE); |
| | |
| | | if (null != url && url.startsWith("yestv://webviewHeight#")) { |
| | | int height = Integer.parseInt(url.replace("yestv://webviewHeight#", "")); |
| | | Log.i("mResult", "webView的高度为:" + height + ""); |
| | | //TODO 测试 |
| | | webView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, height)); |
| | | return true; |
| | | } |
| | | return super.shouldOverrideUrlLoading(view, url); |
| | | } |
| | | |
| | | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) |
| | | @Override |
| | | public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { |
| | | String url = request.getUrl().toString(); |
| | | if (null != url && url.startsWith("yestv://webviewHeight#")) { |
| | | int height = Integer.parseInt(url.replace("yestv://webviewHeight#", "")); |
| | | Log.i("mResult", "webView的高度为:" + height + ""); |
| | | webView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, height)); |
| | | return true; |
| | | } |
| | | return super.shouldOverrideUrlLoading(view, request); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | }, 3000); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void getAppPageNotification() { |
| | |
| | | @Override |
| | | public void onRefresh() { |
| | | page = 1; |
| | | getGoodsList(); |
| | | getCateGorySecond(); |
| | | getGoodsList(); |
| | | } |
| | | }); |
| | | |
| | |
| | | if (secondList.size() > 0) |
| | | secondList.clear(); |
| | | secondList.addAll(list); |
| | | if (gv_category_top.getAdapter() == null) { |
| | | gv_category_top.setAdapter(new RecommendTopCategoryAdapter(lv_second_category.getContext(), secondList, firstCategory.getName())); |
| | | gv_category_top.setFocusable(true); |
| | | gv_category_top.setFocusableInTouchMode(true); |
| | | gv_category_top.requestFocus(); |
| | | gv_category_top.requestFocusFromTouch(); |
| | | } else { |
| | | ((RecommendTopCategoryAdapter) gv_category_top.getAdapter()).notifyDataSetChanged(); |
| | | } |
| | | if (secondList == null || secondList.size() == 0) { //当数据为0的时候 隐藏九宫格分类 |
| | | gv_category_top.setVisibility(View.GONE); |
| | | } else { |
| | |
| | | jsonObject.optJSONObject("data").optJSONArray("picList").toString(), |
| | | new TypeToken<List<HomeBanner>>() { |
| | | }.getType()); |
| | | // JSONArray array = jsonObject.optJSONObject("data").optJSONArray("picList"); |
| | | // for (int i = 0; i < array.length(); i++) { |
| | | // HomeBanner info = list2.get(i); |
| | | // info.setParams(jsonObject.optJSONObject("data").optJSONArray("picList").getJSONObject(i).optJSONObject("params")); |
| | | // } |
| | | if (mBanners != null && mBanners.size() > 0) { |
| | | mBanners.clear(); |
| | | } |
| | |
| | | import android.graphics.BitmapShader; |
| | | import android.graphics.Canvas; |
| | | import android.graphics.Paint; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; |
| | | import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.MessageDigest; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class GlideCircleTransform |
| | | extends BitmapTransformation { |
| | | |
| | | private static final String ID = GlideCircleTransform.class.getClass().getName(); |
| | | private static byte[] ID_BYTES = null; |
| | | |
| | | public GlideCircleTransform(Context context) { |
| | | // super(context); |
| | | try { |
| | | ID_BYTES = ID.getBytes(STRING_CHARSET_NAME); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | return result; |
| | | } |
| | | |
| | | // @Override |
| | | // public String getId() { |
| | | // return getClass().getName(); |
| | | // } |
| | | @Override |
| | | public int hashCode() { |
| | | return ID.hashCode(); |
| | | } |
| | | |
| | | @Override |
| | | public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) { |
| | | |
| | | messageDigest.update(ID_BYTES); |
| | | } |
| | | } |
| | |
| | | public static void setGoodsDetail(Context mContext, TaoBaoGoodsBrief info, GoodsRightViewHolder viewHolder) { |
| | | |
| | | if (viewHolder.ll_labels != null) { |
| | | if (viewHolder.ll_labels.getChildCount() > 0) { |
| | | viewHolder.ll_labels.removeAllViews(); |
| | | } |
| | | if (info.getLabels() != null && |
| | | info.getLabels().size() > 0) { |
| | | viewHolder.ll_labels.setVisibility(View.VISIBLE); |
| | | SetLabels.addLabel(mContext, viewHolder.ll_labels, |
| | | info.getLabels()); |
| | | } else { |
| | | viewHolder.ll_labels.setVisibility(View.GONE); |
| | | } |
| | | // 列表不展示标签 |
| | | // if (viewHolder.ll_labels.getChildCount() > 0) { |
| | | // viewHolder.ll_labels.removeAllViews(); |
| | | // } |
| | | // if (info.getLabels() != null && |
| | | // info.getLabels().size() > 0) { |
| | | // viewHolder.ll_labels.setVisibility(View.VISIBLE); |
| | | // SetLabels.addLabel(mContext, viewHolder.ll_labels, |
| | | // info.getLabels()); |
| | | // } else { |
| | | // viewHolder.ll_labels.setVisibility(View.GONE); |
| | | // } |
| | | } |
| | | |
| | | ImageUtil.showImageFace(mContext, info.getTitle(), info.getShopType(), viewHolder.tv_name); |
| | |
| | | package com.tejia.lijin.app.util.user; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.graphics.Color; |
| | | import android.util.Log; |
| | | import android.widget.ImageView; |
| | |
| | | .setNumberSize(36) |
| | | .setNumFieldOffsetY(0) |
| | | |
| | | .setAppPrivacyOne("《用户服务协议》", "http://www.baidu.com") |
| | | .setAppPrivacyOne("《用户协议》", activity.getSharedPreferences("user", Context.MODE_PRIVATE).getString("service", "")) |
| | | .setAppPrivacyTwo("《隐私政策》","http://www.baidu.com") |
| | | .setAppPrivacyColor(Color.parseColor("#999999"), Color.parseColor("#3A7CFF")) |
| | | .setPrivacyBefore("登录即表示同意") |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | |
| | | |
| | | } |
| | | } |
| | | params.put("packages", mContext.getPackageName()); |
| | | params.put("packages", ShoppingApi.API_PACKAGE_NAME); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.BuXinConstant; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.ui.recommend.SearchActivity; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | |
| | | @JavascriptInterface |
| | | public Object getAppName(Object obj) { |
| | | return mContext.getResources().getString(R.string.app_name); |
| | | } |
| | | |
| | | @JavascriptInterface |
| | | public void jumpWeb(Object url) { |
| | | Intent intent = new Intent(mContext, ShareBrowserActivity.class); |
| | | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | intent.putExtra("url", url+""); |
| | | mContext.startActivity(intent); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | } |
| | | params.put("packages", mContext.getPackageName()); |
| | | params.put("packages", ShoppingApi.API_PACKAGE_NAME); |
| | | params.put("Version", version + ""); |
| | | params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | params.put("platform", "android"); |
| | |
| | | mttRewardVideoAd.setRewardAdInteractionListener(new TTRewardVideoAd.RewardAdInteractionListener() { |
| | | @Override |
| | | public void onAdShow() { |
| | | |
| | | com.alibaba.fastjson.JSONObject result = new com.alibaba.fastjson.JSONObject(); |
| | | result.put("code", 201); |
| | | result.put("msg", "广告开始展示"); |
| | | handler.setProgressData(result); |
| | | } |
| | | |
| | | @Override |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <item android:drawable="@drawable/shape_find_order_check_btn_selected" android:state_checked="true"></item> |
| | | <item android:drawable="@drawable/shape_find_order_check_btn_unselected" android:state_checked="false"></item> |
| | | |
| | | </selector> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <item android:color="@color/search_btn_text_color" android:state_checked="true"></item> |
| | | <item android:color="@color/gray" android:state_checked="false"></item> |
| | | |
| | | </selector> |
| | |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <corners android:radius="10dp" /> |
| | | <solid android:color="@color/gray" /> |
| | | <solid android:color="#F5F5F5" /> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="15dp"></corners> |
| | | <solid android:color="#FF2B4B" /> |
| | | <size |
| | | android:width="15dp" |
| | | android:height="15dp"></size> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="15dp"></corners> |
| | | <solid android:color="#DADADA" /> |
| | | <size |
| | | android:width="15dp" |
| | | android:height="15dp"></size> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="5dp"></corners> |
| | | |
| | | <solid android:color="#fff9f9f9" /> |
| | | </shape> |
| | |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <corners android:radius="40dp" /> |
| | | <solid android:color="@color/bg_main_select_search1" /> |
| | | <solid android:color="#F4F4F4" /> |
| | | </shape> |
| | |
| | | <TextView |
| | | android:id="@+id/tv_help" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="25dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="right|center" |
| | | android:layout_marginRight="20dp" |
| | | android:padding="8dp" |
| | |
| | | style="@style/myInfoItemStyle"> |
| | | |
| | | <TextView |
| | | 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:drawableLeft="@drawable/icon_my_info_pdd" |
| | | android:drawablePadding="13dp" |
| | | android:gravity="center_vertical" |
| | | android:text="拼多多自购备案" |
| | | android:textColor="@color/text_black_1" |
| | |
| | | android:layout_marginRight="20dp" |
| | | android:src="@mipmap/ic_input" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | | |
| | | <LinearLayout |
| | |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | | |
| | | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_info_relative_qq" |
| | | style="@style/myInfoItemStyle" |
| | |
| | | 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:padding="5dp" |
| | | android:text="搜索" |
| | | android:textColor="@color/search_btn_text_color" |
| | | android:textSize="16sp" /> |
| | | android:textSize="18sp" /> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | |
| | | <ScrollView |
| | | android:id="@+id/sv_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical"> |
| | | |
| | | <View |
| | |
| | | |
| | | <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_marginTop="-48dp" |
| | | android:layout_marginRight="30dp" |
| | | android:src="@drawable/ic_order_appeal_top" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_horizontal" |
| | | android:layout_marginTop="-50dp" |
| | | android:text="请选择订单渠道" |
| | | android:textColor="#4E9AFA"></TextView> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_source" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="40dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="40dp" |
| | | android:background="@drawable/shape_find_order_source_bg" |
| | | android:orientation="vertical" |
| | | android:padding="18dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <CheckBox |
| | | android:id="@+id/cb_tb" |
| | | style="@style/findOrderSource" |
| | | android:layout_height="match_parent" |
| | | android:text="淘宝"></CheckBox> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | <CheckBox |
| | | android:id="@+id/cb_jd" |
| | | style="@style/findOrderSource" |
| | | android:text="京东"></CheckBox> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | <CheckBox |
| | | android:id="@+id/cb_pdd" |
| | | style="@style/findOrderSource" |
| | | android:text="拼多多"></CheckBox> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="20dp"> |
| | | |
| | | <CheckBox |
| | | android:id="@+id/cb_vip" |
| | | style="@style/findOrderSource" |
| | | android:text="唯品会"></CheckBox> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | <CheckBox |
| | | android:id="@+id/cb_suning" |
| | | style="@style/findOrderSource" |
| | | android:text="苏宁"></CheckBox> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | <CheckBox |
| | | android:id="@+id/cb_elme" |
| | | style="@style/findOrderSource" |
| | | android:text="饿了么"></CheckBox> |
| | | |
| | | </LinearLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <androidx.appcompat.widget.LinearLayoutCompat |
| | | android:layout_width="match_parent" |
| | |
| | | android:focusableInTouchMode="true" |
| | | android:gravity="center" |
| | | android:hint="请输入或粘贴订单号" |
| | | android:imeOptions="actionSend" |
| | | android:inputType="phone" |
| | | android:paddingStart="24dp" |
| | | android:paddingLeft="8dp" |
| | | android:paddingRight="8dp" |
| | | android:textCursorDrawable="@drawable/shape_input_cursor" |
| | | android:maxLines="1" |
| | | android:textColor="#999999" |
| | | android:textCursorDrawable="@drawable/shape_input_cursor" |
| | | android:textSize="17sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_refer_appeal" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="22.5dp" |
| | | android:layout_weight="2" |
| | | android:background="@drawable/shape_find_order_btn" |
| | | android:gravity="center" |
| | | android:text="提交" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" /> |
| | | |
| | | </androidx.appcompat.widget.LinearLayoutCompat> |
| | | |
| | | |
| | |
| | | android:layout_marginBottom="106dp" |
| | | android:src="@drawable/ic_order_appeal_buttom" |
| | | android:visibility="gone" /> |
| | | |
| | | |
| | | </LinearLayout> |
| | | </ScrollView> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_refer_appeal" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="45dp" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_marginTop="22.5dp" |
| | | android:layout_marginRight="20dp" |
| | | android:layout_marginBottom="20dp" |
| | | android:background="@drawable/shape_find_order_btn" |
| | | android:gravity="center" |
| | | android:text="提交" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" /> |
| | | |
| | | </LinearLayout> |
| | |
| | | |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_marginLeft="30dp" |
| | | android:layout_marginRight="30dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_horizontal" |
| | | android:src="@drawable/ic_no_net" /> |
| | | |
| | | <TextView |
| | |
| | | |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_marginLeft="30dp" |
| | | android:layout_marginRight="30dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_horizontal" |
| | | android:src="@drawable/ic_no_net" /> |
| | | |
| | | <TextView |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <resources> |
| | | |
| | | <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> |
| | | <!-- Customize your theme here. --> |
| | | <item name="colorPrimary">@color/black</item> |
| | | <item name="colorPrimaryDark">@color/black</item> |
| | | <item name="colorAccent">@color/main_text_color</item> |
| | | <!-- All customizations that are NOT specific to a particular API-level can go here. --> |
| | | <item name="android:windowBackground">@color/bg</item> |
| | | <item name="android:windowNoTitle">true</item> |
| | | <!-- 去除水波纹效果 --> |
| | | <item name="android:colorControlHighlight">@color/transparent</item> |
| | | |
| | | |
| | | </style> |
| | | </resources> |
| | |
| | | <color name="orange3">#fffe0014</color> |
| | | <color name="orange4">#ffff7800</color> |
| | | <color name="orange5">#E42219</color> |
| | | <color name="main_text_color">#ffe5005c</color> |
| | | <color name="main_text_color">#FF2C4A</color> |
| | | <color name="main_text_color_transport">#11e5005c</color> |
| | | <color name="login_gain_sms_bg">#FFFFC8DD</color> |
| | | <color name="splash_background_top">#ffde3579</color> |
| | |
| | | <color name="search_content_text_color">#616161</color> |
| | | |
| | | |
| | | |
| | | <color name="capital_text_color">#4E2E00</color> |
| | | <color name="capital_text_light_color">#AF864B</color> |
| | | |
| | |
| | | <color name="login_main_text_color">#FF2B4B</color> |
| | | |
| | | |
| | | |
| | | |
| | | </resources> |
| | |
| | | <string name="list_no_more">没有更多了</string> |
| | | |
| | | <!-- 常规文本 --> |
| | | <string name="user_protocol_title">《特价用户协议》</string> |
| | | <string name="user_protocol_title">《用户协议》</string> |
| | | <string name="share_icon_title">分享含特价标识</string> |
| | | <string name="toast">特价温馨提示</string> |
| | | <string name="fanli_notify">只有登录特价之后购买,才可以收到返利哟!</string> |
| | | <string name="login_welcome">欢迎登录特价</string> |
| | | <string name="share_mark">当分享方式为不含“特价”标识,系统默认只分享一张含有二维码的分享图,如果你要分享多张图片请勾选,系统会记住你上一次的选择。</string> |
| | | <string name="user_protocol_extra">《特价用户协议》、</string> |
| | | <string name="user_protocol_extra">《用户协议》、</string> |
| | | <string name="official_fuli">特价官方福利</string> |
| | | |
| | | |
| | |
| | | <!-- All customizations that are NOT specific to a particular API-level can go here. --> |
| | | <item name="android:windowBackground">@color/bg</item> |
| | | <item name="android:windowNoTitle">true</item> |
| | | |
| | | |
| | | </style> |
| | | |
| | | <style name="custom_dialog" parent="@android:style/Theme.Dialog"> |
| | |
| | | <item name="android:gravity">center_vertical</item> |
| | | </style> |
| | | |
| | | |
| | | <style name="findOrderSource"> |
| | | <item name="android:layout_width">80dp</item> |
| | | <item name="android:layout_height">wrap_content</item> |
| | | <item name="android:textSize">13sp</item> |
| | | <item name="android:textColor">@drawable/selector_find_order_text</item> |
| | | <item name="android:button">@drawable/selector_find_order_btn</item> |
| | | <item name="android:paddingLeft">9dp</item> |
| | | </style> |
| | | |
| | | |
| | | </resources> |