修改谷歌内购ui

This commit is contained in:
XY
2022-09-26 19:31:34 +08:00
parent 193d418e9c
commit f9d85784a9
10 changed files with 102 additions and 282 deletions

View File

@@ -54,8 +54,6 @@ public class ChargeActivity extends BaseMvpActivity<IChargeView, ChargePresenter
private static final String TAG = "ChargeActivity"; private static final String TAG = "ChargeActivity";
@BindView(R.id.tv_gold) @BindView(R.id.tv_gold)
TextView mTv_gold; TextView mTv_gold;
@BindView(R.id.iv_back)
ImageView ivBack;
@BindView(R.id.recyclerView) @BindView(R.id.recyclerView)
RecyclerView mRecyclerView; RecyclerView mRecyclerView;
private ChargeAdapter mChargeAdapter; private ChargeAdapter mChargeAdapter;
@@ -212,7 +210,6 @@ public class ChargeActivity extends BaseMvpActivity<IChargeView, ChargePresenter
} }
private void initViews() { private void initViews() {
ivBack.setOnClickListener(v -> finish());
mRecyclerView.setLayoutManager(new LinearLayoutManager(context)); mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mChargeAdapter = new ChargeAdapter(); mChargeAdapter = new ChargeAdapter();
mRecyclerView.setAdapter(mChargeAdapter); mRecyclerView.setAdapter(mChargeAdapter);

View File

@@ -8,6 +8,6 @@
android:startColor="#ED66FF" android:startColor="#ED66FF"
android:type="linear" android:type="linear"
android:useLevel="true" /> android:useLevel="true" />
<corners android:radius="10dp" /> <corners android:radius="28dp" />
</shape> </shape>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="180"
android:endColor="#19EBFF"
android:startColor="#ED66FF"
android:type="linear"
android:useLevel="true" />
</shape>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="@dimen/dp_14"
android:topRightRadius="@dimen/dp_14" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

View File

@@ -1,294 +1,96 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/bg_normal_1c1b22"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <View
android:id="@+id/iv_bg" android:id="@+id/iv_bg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="200dp"
android:scaleType="fitXY" android:background="@drawable/bg_common_normal"
android:src="@mipmap/bg_charge"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.yizhuan.erban.base.TitleBar <!-- <com.yizhuan.erban.base.TitleBar-->
android:id="@+id/title_bar" <!-- android:id="@+id/title_bar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="@dimen/dp_30"-->
<!-- tools:layout_height="50dp"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<View
android:id="@+id/iv_translate_bg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="88dp"
android:layout_marginTop="@dimen/dp_30" android:layout_marginStart="@dimen/dp_16"
tools:layout_height="50dp" android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintTop_toTopOf="parent" /> android:background="@drawable/bg_common_translate_rectangle"
app:layout_constraintBottom_toBottomOf="@+id/iv_bg"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView <TextView
android:id="@+id/tv_title_diamond" android:id="@+id/tv_title_diamond"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="我的钻石" android:layout_marginTop="@dimen/dp_10"
android:textSize="@dimen/dp_13"
android:textColor="@color/color_333333"
android:drawableStart="@mipmap/ic_charge_diamond"
android:drawablePadding="@dimen/dp_4" android:drawablePadding="@dimen/dp_4"
android:layout_below="@id/title_bar" android:text="我的钻石"
android:layout_centerHorizontal="true" android:textColor="@color/color_333333"
app:layout_constraintStart_toStartOf="parent" android:textSize="@dimen/dp_13"
app:layout_constraintTop_toTopOf="@+id/iv_translate_bg"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_30" app:layout_constraintStart_toStartOf="parent"
/> app:drawableStartCompat="@mipmap/ic_charge_diamond" />
<TextView
android:id="@+id/tv_gold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:fontFamily="sans-serif-medium"
android:includeFontPadding="false"
android:textColor="@color/color_333333"
android:textSize="@dimen/dp_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_title_diamond"
tools:text="50" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@drawable/bg_common_top_14_white"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@+id/iv_bg"
app:layout_constraintBottom_toBottomOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_11"
android:paddingEnd="@dimen/dp_11"
android:visibility="visible" />
<TextView <TextView
android:id="@+id/tv_gold" android:id="@+id/tv_charge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/color_333333"
android:textSize="@dimen/dp_24"
android:layout_below="@id/tv_title_diamond"
android:layout_centerHorizontal="true"
android:fontFamily="sans-serif-medium"
android:includeFontPadding="false"
tools:text="50" />
<androidx.core.widget.NestedScrollView
android:id="@+id/nsv_charge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/tv_gold"
android:layout_marginTop="45dp"
>
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="45dp"
android:orientation="vertical" android:layout_marginStart="60dp"
> android:layout_marginTop="50dp"
android:layout_marginEnd="@dimen/dp_60"
android:background="@drawable/bg_common_confirm_normal"
android:gravity="center"
android:text="确认充值"
android:textColor="@color/white"
android:textSize="@dimen/dp_15"
app:layout_constraintBottom_toBottomOf="parent" />
<androidx.recyclerview.widget.RecyclerView </LinearLayout>
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_11"
android:paddingEnd="@dimen/dp_11"
android:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:layout_marginTop="16dp"
android:text="未成年禁止充值消费!请勿轻易相信各类刷单、退款等信息,以免上当受骗!"
android:textColor="@color/color_666666"
android:textSize="14sp"
/>
<LinearLayout </androidx.constraintlayout.widget.ConstraintLayout>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/recyclerView"
android:background="@drawable/bg_secondary_radius_5"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginEnd="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_16"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="支付方式"
android:textSize="@dimen/dp_13"
android:textColor="@color/text_normal_c6c6e9"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginStart="@dimen/dp_15"
/>
<LinearLayout
android:id="@+id/ll_charge_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_type_first"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="19.5dp"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:focusable="true"
android:clickable="true">
<ImageView
android:id="@+id/iv_type_first"
android:layout_width="28dp"
android:layout_height="28dp"
android:clickable="false" />
<TextView
android:id="@+id/tv_type_first"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text=""
android:textSize="@dimen/dp_15"
android:textColor="@color/text_title_white"
android:clickable="false" />
<ImageView
android:id="@+id/iv_sel_first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/selector_check_box_pic_check"
android:clickable="false" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_353548"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginEnd="@dimen/dp_15"
android:layout_marginStart="@dimen/dp_50"
/>
<LinearLayout
android:id="@+id/ll_type_second"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingBottom="@dimen/dp_20"
android:gravity="center_vertical"
android:orientation="horizontal"
android:focusable="true"
android:clickable="true">
<ImageView
android:id="@+id/iv_type_second"
android:layout_width="28dp"
android:layout_height="28dp"
android:clickable="false" />
<TextView
android:id="@+id/tv_type_second"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text=""
android:textSize="@dimen/dp_15"
android:textColor="@color/text_title_white"
android:clickable="false" />
<ImageView
android:id="@+id/iv_sel_second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/selector_check_box_pic_check"
android:clickable="false" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_more"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="15dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone"
tools:visibility="visible"
android:focusable="true"
android:clickable="true">
<com.yizhuan.xchat_android_library.widget.DrawableCenterTextView
android:id="@+id/tv_more"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:drawablePadding="4dp"
android:paddingTop="@dimen/dp_6"
android:text="展开更多支付方式"
android:drawableEnd="@drawable/ic_charge_arrow"
android:textSize="@dimen/dp_13"
android:textColor="@color/text_normal_c6c6e9"
android:paddingBottom="@dimen/dp_15"
android:clickable="false" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tv_charge"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginStart="60dp"
android:layout_marginTop="39dp"
android:layout_marginEnd="@dimen/dp_60"
android:background="@drawable/bg_common_confirm_normal"
android:gravity="center"
android:text="确认充值"
android:textColor="@color/white"
android:textSize="@dimen/dp_15"
app:layout_constraintBottom_toBottomOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_10"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/charge_agreement"
android:textSize="@dimen/sp_12"
android:gravity="center"
android:textColor="@color/text_secondary_4f516a"
/>
<TextView
android:id="@+id/tv_agreement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/agreement"
android:textColor="@color/app_248cfe"
android:gravity="center"
android:textSize="@dimen/sp_12"
/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="如有任何问题请咨询客服Peko号88001"
android:textColor="@color/app_248cfe"
android:layout_gravity="center_horizontal"
android:textSize="@dimen/sp_12"
android:layout_marginBottom="@dimen/dp_10"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>

View File

@@ -18,7 +18,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.2.2' classpath 'com.android.tools.build:gradle:7.3.0'
//realm 数据库插件 //realm 数据库插件
classpath "io.realm:realm-gradle-plugin:5.3.0" classpath "io.realm:realm-gradle-plugin:5.3.0"
// android 资源混淆插件 // android 资源混淆插件

View File

@@ -9,8 +9,6 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 32 targetSdkVersion 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
@@ -97,8 +95,8 @@ dependencies {
implementation 'com.google.firebase:firebase-core:19.0.0' implementation 'com.google.firebase:firebase-core:19.0.0'
//googleplay内购 //googleplay内购
api 'com.google.android.gms:play-services-wallet:18.1.3' api 'com.google.android.gms:play-services-wallet:19.1.0'
api 'com.android.billingclient:billing:4.0.0' api 'com.android.billingclient:billing:4.1.0'
api project(':nim_uikit') api project(':nim_uikit')
api project(':library') api project(':library')

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

View File

@@ -6,8 +6,6 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 32 targetSdkVersion 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }