jixionghui před 4 roky
rodič
revize
e70715f700

+ 7 - 4
jixin/src/main/AndroidManifest.xml

@@ -93,12 +93,15 @@
         android:usesCleartextTraffic="true"
         tools:ignore="GoogleAppIndexingWarning"
         tools:replace="android:name, android:icon, android:roundIcon">
+        <activity android:name=".ui.me.JunYouCoinActivity"></activity>
         <activity android:name=".ui.TestActivity">
-<!--            <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.MAIN" /> -->
+
+
+            <!-- <category android:name="android.intent.category.LAUNCHER" /> -->
+            <!-- </intent-filter> -->
         </activity>
         <activity
             android:name=".pay.new_ui.PaymentOrReceiptActivity"

+ 110 - 0
jixin/src/main/java/com/jixin/im/ui/me/JunYouCoinActivity.java

@@ -0,0 +1,110 @@
+package com.jixin.im.ui.me;
+
+import android.graphics.Color;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.jixin.im.R;
+import com.jixin.im.ui.base.BaseActivity;
+import com.klinker.android.link_builder.Link;
+import com.klinker.android.link_builder.LinkBuilder;
+
+import java.util.regex.Pattern;
+
+/**
+ * 俊友币
+ * Created by Harvey on 2020/09/24
+ */
+public class JunYouCoinActivity extends BaseActivity implements View.OnClickListener {
+    private TextView tvJunYouCoin, tvMyIncome, tvAuditing, tvRealAuthStatus, tvPayGiftService;
+
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_jun_you_coin);
+
+        initActionBar();
+        initView();
+    }
+
+    private void initActionBar() {
+        getSupportActionBar().hide();
+        findViewById(R.id.iv_title_left).setOnClickListener(v -> finish());
+        TextView tvTitle = (TextView) findViewById(R.id.tv_title_center);
+        tvTitle.setText("俊友币");
+
+    }
+
+    private void initView() {
+        tvJunYouCoin = findViewById(R.id.tv_coin);
+        tvMyIncome = findViewById(R.id.tv_my_income);
+        tvAuditing = findViewById(R.id.tv_my_auditing);
+        findViewById(R.id.tv_recharge_jun_you).setOnClickListener(this);
+        findViewById(R.id.tv_coin_withdraw).setOnClickListener(this);
+        tvRealAuthStatus = findViewById(R.id.tv_real_auth_status);
+        tvPayGiftService = findViewById(R.id.tv_jun_you_pay_gift);
+        setTextLink();
+
+        findViewById(R.id.rlt_income_details).setOnClickListener(this);
+        findViewById(R.id.rlt_account_details).setOnClickListener(this);
+        findViewById(R.id.rlt_real_name_auth).setOnClickListener(this);
+        findViewById(R.id.rlt_help).setOnClickListener(this);
+    }
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()){
+            case R.id.tv_recharge_jun_you:      //充值
+
+                break;
+            case R.id.tv_coin_withdraw:         //提现
+
+                break;
+            case R.id.rlt_income_details:       //收入明细
+
+                break;
+            case R.id.rlt_account_details:      //账户明细
+
+                break;
+            case R.id.rlt_real_name_auth:       //实名认证
+
+                break;
+            case R.id.rlt_help:                 //帮助
+                break;
+        }
+
+    }
+
+
+    //设置拼手气/普通红包切换Link事件
+    private void setTextLink(){
+        String gitService = getString(R.string.junyou_gift_service);
+        String payService = getString(R.string.junyou_pay_service);
+        Link link = new Link(Pattern.compile(gitService+"|"+payService))
+
+                .setTextColor(Color.parseColor("#DFBF93"))                  // optional, defaults to holo blue
+                .setTextColorOfHighlightedLink(Color.parseColor("#00000000")) // optional, defaults to holo blue
+                .setHighlightAlpha(.4f)                                     // optional, defaults to .15f
+                .setUnderlined(false)
+                .setOnClickListener(text -> {
+                    if (gitService.equals(text)){
+
+                    }else if (payService.equals(text)){
+
+                    }
+                })
+                // optional, defaults to true
+                .setBold(true);
+
+        LinkBuilder.on(tvPayGiftService)
+                .addLink(link)
+
+                .build();
+
+    }
+
+}

+ 262 - 0
jixin/src/main/res/layout/activity_jun_you_coin.xml

@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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"
+    android:layout_width="match_parent"
+    android:orientation="vertical"
+    android:layout_height="match_parent"
+    tools:context=".ui.me.JunYouCoinActivity">
+
+    <include layout="@layout/a_view_actionbar" />
+    <ScrollView
+        android:overScrollMode="never"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:orientation="vertical"
+            android:gravity="center_horizontal"
+            android:layout_height="match_parent">
+            <TextView
+                android:layout_width="wrap_content"
+                android:textSize="17sp"
+                android:textColor="#333333"
+                android:text="@string/my_jun_you_coin"
+                android:layout_height="wrap_content"/>
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:orientation="horizontal"
+                android:gravity="bottom"
+                android:layout_marginTop="6dp"
+                android:layout_height="wrap_content">
+                <ImageView
+                    android:layout_gravity="bottom"
+                    android:src="@mipmap/icon_junyou_coin"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:layout_marginStart="6dp"
+                    android:id="@+id/tv_coin"
+                    android:textSize="31sp"
+                    android:textColor="#333333"
+                    android:text="2000"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+
+                <TextView
+                    android:textSize="18sp"
+                    android:textColor="#333333"
+                    android:text="个"
+                    android:layout_marginStart="4dp"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+
+            </LinearLayout>
+            <LinearLayout
+                android:layout_marginStart="40dp"
+                android:layout_marginEnd="40dp"
+                android:layout_width="match_parent"
+                android:orientation="horizontal"
+                android:layout_marginTop="64dp"
+                android:weightSum="2"
+                android:layout_height="56dp">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:orientation="vertical"
+                    android:gravity="center"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:text="@string/my_income"
+                        android:textSize="@dimen/sp_13_text_size"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"/>
+                    <TextView
+                        android:id="@+id/tv_my_income"
+                        android:layout_marginTop="12dp"
+                        android:textSize="@dimen/sp_18_text_size"
+                        android:textColor="#333333"
+                        android:text="1000"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"/>
+
+
+                </LinearLayout>
+                <View
+                    android:layout_width="1px"
+                    android:background="#999999"
+                    android:layout_height="match_parent"/>
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:gravity="center"
+                    android:layout_weight="1"
+                    android:orientation="vertical"
+                    android:weightSum="2"
+
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:text="@string/auditing"
+
+                        android:textSize="@dimen/sp_13_text_size"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"/>
+                    <TextView
+                        android:id="@+id/tv_my_auditing"
+                        android:layout_marginTop="12dp"
+                        android:textSize="@dimen/sp_18_text_size"
+                        android:textColor="#333333"
+                        android:text="1000"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"/>
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <TextView
+                android:id="@+id/tv_recharge_jun_you"
+                android:layout_width="256dp"
+                android:layout_height="32dp"
+                android:layout_marginLeft="20dp"
+                android:layout_marginRight="20dp"
+                android:layout_marginTop="100dp"
+                android:background="@drawable/shape_recharge_bg_blue_radius_16"
+                android:gravity="center"
+                android:text="@string/recharge_coin"
+                android:textColor="@color/white"
+                android:textSize="@dimen/one_level_title" />
+
+            <TextView
+                android:id="@+id/tv_coin_withdraw"
+                android:layout_width="256dp"
+                android:layout_height="32dp"
+                android:background="@drawable/shape_withdraw_bg_gray_radius_16"
+                android:gravity="center"
+                android:text="@string/withdraw_change"
+                android:textColor="#2A86FF"
+                android:layout_marginTop="12dp"
+                android:textSize="@dimen/one_level_title" />
+            <RelativeLayout
+                android:id="@+id/rlt_income_details"
+                android:layout_marginTop="40dp"
+                android:layout_width="match_parent"
+                android:paddingStart="15dp"
+                android:paddingEnd="15dp"
+                android:layout_height="wrap_content">
+
+                <TextView
+                    android:textColor="#333333"
+                    android:gravity="center"
+                    android:drawableStart="@mipmap/icon_income"
+                    android:text="@string/income_details"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <ImageView
+                    android:layout_alignParentEnd="true"
+                    android:layout_centerVertical="true"
+                    android:src="@mipmap/right_arrow_icon"
+
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+
+            </RelativeLayout>
+            <RelativeLayout
+                android:id="@+id/rlt_account_details"
+                android:layout_width="match_parent"
+                android:paddingStart="15dp"
+                android:paddingEnd="15dp"
+                android:layout_height="wrap_content">
+
+                <TextView
+                    android:textColor="#333333"
+                    android:gravity="center"
+                    android:drawableStart="@mipmap/icon_account_details"
+                    android:text="@string/account_details"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <ImageView
+                    android:layout_alignParentEnd="true"
+                    android:layout_centerVertical="true"
+                    android:src="@mipmap/right_arrow_icon"
+
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+
+            </RelativeLayout>
+            <RelativeLayout
+                android:id="@+id/rlt_real_name_auth"
+                android:layout_width="match_parent"
+                android:paddingStart="15dp"
+                android:paddingEnd="15dp"
+                android:layout_height="wrap_content">
+
+                <TextView
+                    android:textColor="#333333"
+                    android:gravity="center"
+                    android:drawableStart="@mipmap/icon_auth_real_name"
+                    android:text="@string/real_name_auth"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:layout_marginEnd="3dp"
+                    android:id="@+id/tv_real_auth_status"
+                    android:textColor="#333333"
+                    android:gravity="center"
+                    android:textSize="@dimen/sp_15_text_size"
+                    android:layout_toStartOf="@+id/rlt_real_name_auth_right_icon"
+                    android:layout_centerVertical="true"
+                    android:text="@string/help"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <ImageView
+                    android:id="@+id/rlt_real_name_auth_right_icon"
+                    android:layout_alignParentEnd="true"
+                    android:layout_centerVertical="true"
+                    android:src="@mipmap/right_arrow_icon"
+
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+
+            </RelativeLayout>
+            <RelativeLayout
+                android:id="@+id/rlt_help"
+                android:layout_width="match_parent"
+                android:paddingStart="15dp"
+                android:paddingEnd="15dp"
+                android:layout_height="wrap_content">
+
+                <TextView
+                    android:textColor="#333333"
+                    android:gravity="center"
+                    android:drawableStart="@mipmap/icon_help"
+                    android:text="@string/help"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+
+                <ImageView
+                    android:layout_alignParentEnd="true"
+                    android:layout_centerVertical="true"
+                    android:src="@mipmap/right_arrow_icon"
+
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+
+            </RelativeLayout>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:text="@string/junyou_gift_pay_service"
+                android:textSize="10sp"
+                android:id="@+id/tv_jun_you_pay_gift"
+                android:textColor="#666666"
+                android:layout_marginTop="54dp"
+                android:layout_height="wrap_content"/>
+
+
+        </LinearLayout>
+
+
+    </ScrollView>
+
+</LinearLayout>

binární
jixin/src/main/res/mipmap-xhdpi/icon_account_details.png


binární
jixin/src/main/res/mipmap-xhdpi/icon_auth_real_name.png


binární
jixin/src/main/res/mipmap-xhdpi/icon_help.png


binární
jixin/src/main/res/mipmap-xhdpi/icon_income.png


binární
jixin/src/main/res/mipmap-xhdpi/icon_junyou_coin.png


binární
jixin/src/main/res/mipmap-xxhdpi/icon_account_details.png


binární
jixin/src/main/res/mipmap-xxhdpi/icon_auth_real_name.png


binární
jixin/src/main/res/mipmap-xxhdpi/icon_help.png


binární
jixin/src/main/res/mipmap-xxhdpi/icon_income.png


binární
jixin/src/main/res/mipmap-xxhdpi/icon_junyou_coin.png


binární
jixin/src/main/res/mipmap-xxxhdpi/icon_account_details.png


binární
jixin/src/main/res/mipmap-xxxhdpi/icon_auth_real_name.png


binární
jixin/src/main/res/mipmap-xxxhdpi/icon_help.png


binární
jixin/src/main/res/mipmap-xxxhdpi/icon_income.png


binární
jixin/src/main/res/mipmap-xxxhdpi/icon_junyou_coin.png


+ 21 - 2
jixin/src/main/res/values/strings.xml

@@ -2355,7 +2355,8 @@
     <string name="send_group_red_packet">发送群红包</string>
 
 
-    <!-- 俊友钱包 add by Harvey on 2020/09/23    start -->
+    <!--add by Harvey on 2020/09/23    start -->
+    <!-- 俊友钱包 -->
     <string name="my_wallet_balance">我的余额</string>
     <string name="pay_password">支付密码</string>
     <string name="bind_alipay">绑定支付宝</string>
@@ -2364,8 +2365,26 @@
     <string name="withdraw_amount_yuan">提现金额(元)</string>
     <string name="account_withdraw">到账账户:%1$1s</string>
     <string name="account_balance">余额:¥%1$1s</string>
+    <!-- 俊友币-->
+    <string name="my_jun_you_coin">我的俊友币</string>
+    <string name="recharge_coin">充值俊友币</string>
+    <string name="withdraw_change">提现至零钱</string>
+    <string name="my_income">我的收益(元/税前)</string>
+    <string name="auditing">审核中(元/税前)</string>
+    <string name="income_details">收益明细</string>
+    <string name="account_details">账户明细</string>
+    <string name="real_name_auth">实名认证</string>
+    <string name="help">帮助</string>
+    <string name="junyou_gift_pay_service">点击即表示您已同意《俊友钱包支付协议》与《俊友礼物服务条款》。</string>
 
-    <!-- 俊友钱包 end -->
+    <string name="junyou_gift_service">《俊友礼物服务条款》</string>
+
+    <string name="junyou_pay_service">《俊友钱包支付协议》</string>
+
+
+
+
+    <!--  end -->
     <string-array name="icons">
         <item>iphone</item>
         <item>iphone</item>