Commit 51f4a26b authored by 张释方's avatar 张释方

提交代码(待解决UserManager)

parent 98e429ed
package com.mints.street.adapter
import android.content.Context
import com.alibaba.android.vlayout.LayoutHelper
import com.alibaba.android.vlayout.layout.GridLayoutHelper
import com.fry.base.adapter.AbstractVLayoutBaseAdapter
import com.fry.base.adapter.BindingViewHolder
......
......@@ -21,7 +21,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ConsumerBe
holder.binding.tvOldprice.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG
var a = holder.binding.bg.layoutParams
holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), 0, AppUtils.dp2Px(context, 10F), 0, null, null, null)
holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), 0, AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F), null, null, null)
if (mposition == position) {
holder.binding.bg.setBackgroundResource(R.drawable.shape_bg_payment_down)
......
......@@ -62,14 +62,14 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
override fun onResume() {
super.onResume()
// if (!TextUtils.isEmpty(userManager.getUserID())) {
if (!TextUtils.isEmpty(userManager.getUserID())) {
//查询用户登录信息
viewModel.getmyInfo()
// refreshHighTask()
// } else {
} else {
// 游客登录
// myPresenter.userLogin()
// }
}
}
private fun initListener() {
......
......@@ -38,6 +38,8 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
private fun initListener() {
iv_left_icon.setOnClickListener(this)
bt_try.setOnClickListener(this)
ly_weixin.setOnClickListener(this)
ly_alipay.setOnClickListener(this)
}
private fun initView() {
......@@ -98,12 +100,33 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
override fun onClick(v: View?) {
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.ly_weixin->{//支付宝支付
//设置选中样式
setOnChecked(1)
}
R.id.ly_alipay->{//支付宝支付
//设置选中样式
setOnChecked(2)
}
R.id.bt_try -> {
}
}
}
private fun setOnChecked(paymentflag: Int?) {
when(paymentflag){
1->{//选中微信
iv_weixin.setImageResource(R.mipmap.pay_select)
iv_alipay.setImageResource(R.mipmap.pay_unselect)
}
2->{//选中支付宝
iv_weixin.setImageResource(R.mipmap.pay_unselect)
iv_alipay.setImageResource(R.mipmap.pay_select)
}
}
}
}
......@@ -92,7 +92,7 @@ public class GsonConverterFactory extends Converter.Factory {
int code = br.getstatus();
if (code == 401) {
try {
UserManager.Companion.getINSTANCE().userLogout();
// UserManager.Companion.getINSTANCE().userLogout();
// Activity forwardActivity = ForegroundOrBackground.getApp_activity();
// if (forwardActivity != null) {
......
......@@ -28,7 +28,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:overScrollMode="never">
......@@ -51,11 +51,6 @@
android:layout_height="wrap_content" />
</com.mints.street.widget.CoverFlowViewPager>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......@@ -360,17 +355,10 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="100dp" />
</LinearLayout>
android:layout_height="100dp" />
<LinearLayout
android:id="@+id/ly_weixin"
......@@ -397,10 +385,12 @@
android:textColor="@color/black"
android:textSize="18sp" />
<CheckBox
style="@style/MyCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:layout_gravity="center"
android:id="@+id/iv_weixin"
android:src="@mipmap/pay_unselect"
android:layout_width="20dp"
android:layout_height="20dp" />
</LinearLayout>
<View
......@@ -435,10 +425,12 @@
android:textColor="@color/black"
android:textSize="18sp" />
<CheckBox
style="@style/MyCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:layout_gravity="center"
android:src="@mipmap/pay_unselect"
android:id="@+id/iv_alipay"
android:layout_width="20dp"
android:layout_height="20dp" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment