Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fiveworld
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_fiveworld
Commits
51f4a26b
Commit
51f4a26b
authored
Jul 16, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码(待解决UserManager)
parent
98e429ed
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
30 deletions
+44
-30
GridMapAdapter.kt
app/src/main/java/com/mints/street/adapter/GridMapAdapter.kt
+0
-1
GridPaymentAdapter.kt
.../main/java/com/mints/street/adapter/GridPaymentAdapter.kt
+1
-1
MyFragment.kt
app/src/main/java/com/mints/street/main/my/MyFragment.kt
+3
-3
OpenvipActivity.kt
...src/main/java/com/mints/street/main/my/OpenvipActivity.kt
+23
-0
GsonConverterFactory.java
...com/mints/street/netwrok/common/GsonConverterFactory.java
+1
-1
activity_openvip.xml
app/src/main/res/layout/activity_openvip.xml
+16
-24
pay_select.png
app/src/main/res/mipmap-xhdpi/pay_select.png
+0
-0
pay_unselect.png
app/src/main/res/mipmap-xhdpi/pay_unselect.png
+0
-0
No files found.
app/src/main/java/com/mints/street/adapter/GridMapAdapter.kt
View file @
51f4a26b
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
...
...
app/src/main/java/com/mints/street/adapter/GridPaymentAdapter.kt
View file @
51f4a26b
...
...
@@ -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
)
...
...
app/src/main/java/com/mints/street/main/my/MyFragment.kt
View file @
51f4a26b
...
...
@@ -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
()
{
...
...
app/src/main/java/com/mints/street/main/my/OpenvipActivity.kt
View file @
51f4a26b
...
...
@@ -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
)
}
}
}
}
app/src/main/java/com/mints/street/netwrok/common/GsonConverterFactory.java
View file @
51f4a26b
...
...
@@ -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) {
...
...
app/src/main/res/layout/activity_openvip.xml
View file @
51f4a26b
...
...
@@ -28,7 +28,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_cont
ent"
android:layout_height=
"
match_par
ent"
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>
...
...
app/src/main/res/mipmap-xhdpi/pay_select.png
0 → 100644
View file @
51f4a26b
2.21 KB
app/src/main/res/mipmap-xhdpi/pay_unselect.png
0 → 100644
View file @
51f4a26b
1.7 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment