Ver código fonte

发送红包的修改

jixionghui 5 anos atrás
pai
commit
6b5b2cdbdc

+ 4 - 1
skWeiChatBaidu/src/main/java/com/liaobo/im/bean/RoomMember.java

@@ -4,17 +4,20 @@ import com.j256.ormlite.field.DatabaseField;
 import com.j256.ormlite.table.DatabaseTable;
 import com.liaobo.im.db.dao.RoomMemberDaoImpl;
 
+import java.io.Serializable;
+
 /**
  * Created by zq on 2017/6/27 0027.
  */
 @DatabaseTable(daoClass = RoomMemberDaoImpl.class)
-public class RoomMember {
+public class RoomMember implements Serializable {
     public static final int ROLE_OWNER = 1;
     public static final int ROLE_MANAGER = 2;
     public static final int ROLE_MEMBER = 3;
     public static final int ROLE_INVISIBLE = 4;
     public static final int ROLE_GUARDIAN = 5;
     public static final int ROLE_GRAB_RED = 6;
+    private static final long serialVersionUID = -1254311368480175141L;
 
     @DatabaseField(generatedId = true)
     private int _id;

+ 241 - 0
skWeiChatBaidu/src/main/java/com/liaobo/im/fragment/MucSendPacketFragment.java

@@ -0,0 +1,241 @@
+package com.liaobo.im.fragment;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.Editable;
+import android.text.InputFilter;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import com.liaobo.im.R;
+import com.liaobo.im.bean.RoomMember;
+import com.liaobo.im.ui.base.EasyFragment;
+import com.liaobo.im.ui.me.redpacket.PayPasswordVerifyDialog;
+import com.liaobo.im.ui.message.ChatActivity;
+import com.liaobo.im.ui.message.MucChatActivity;
+import com.liaobo.im.ui.message.multi.GroupMoreFeaturesActivity;
+import com.liaobo.im.util.MoneyValueFilter;
+import com.liaobo.im.util.ToastUtil;
+
+import org.jivesoftware.smack.util.StringUtils;
+
+import java.util.Objects;
+
+import static android.app.Activity.RESULT_OK;
+
+public class MucSendPacketFragment extends EasyFragment {
+    public static final int CODE_REQUEST_SELECT_RECEIVER = 1108;
+    private static final String TAG = MucSendPacketFragment.class.getSimpleName();
+    private int redPacketType;
+    private String mReceiverId;
+    private String mRoomId;
+
+    private EditText editRedPacketCount, editMoneyAmount, edtWishText;
+    private Button btnSendRedPacket;
+    private TextView tvRedPacketHint,tvReceiver;
+
+    @Override
+    protected int inflateLayoutId() {
+        return R.layout.fragment_muc_send_red_packet;
+    }
+
+    @Override
+    protected void onActivityCreated(Bundle savedInstanceState, boolean createView) {
+        if (createView){
+            initView();
+        }
+    }
+
+    public void setRoomId(String mRoomId) {
+        this.mRoomId = mRoomId;
+    }
+
+    private void  initView(){
+        editMoneyAmount = findViewById(R.id.edit_money_amount);
+        editMoneyAmount.setFilters(new InputFilter[] {new MoneyValueFilter()});
+        edtWishText = findViewById(R.id.edt_wish_text);
+        tvRedPacketHint = findViewById(R.id.tv_red_packet_hint);
+        editRedPacketCount = findViewById(R.id.edit_red_packet_count);
+        btnSendRedPacket = findViewById(R.id.btn_sendRedPacket);
+        tvReceiver = findViewById(R.id.tv_receiver);
+        btnSendRedPacket.setOnClickListener(view -> {
+
+            sendRedPacket();
+
+        });
+        findViewById(R.id.rlt_select_receiver).setOnClickListener(view -> {
+            Intent intent = new Intent(getContext(), GroupMoreFeaturesActivity.class);
+            intent.putExtra("roomId",mRoomId);
+            intent.putExtra("isSelectReceiver",true);
+            startActivityForResult(intent,CODE_REQUEST_SELECT_RECEIVER);
+
+        });
+
+        if (redPacketType==1){
+            tvRedPacketHint.setText(R.string.hint_money_all_same);
+        }else {
+            tvRedPacketHint.setText(R.string.hint_lucky_red_packet);
+        }
+        editMoneyAmount.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+            }
+
+            @Override
+            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+            }
+
+            @Override
+            public void afterTextChanged(Editable editable) {
+                checkMoney(editable.toString(),editRedPacketCount.getText().toString(),mReceiverId);
+
+            }
+        });
+
+        editRedPacketCount.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+            }
+
+            @Override
+            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+            }
+
+            @Override
+            public void afterTextChanged(Editable editable) {
+                checkMoney(editMoneyAmount.getText().toString(),editable.toString(),mReceiverId);
+
+            }
+        });
+
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (requestCode == CODE_REQUEST_SELECT_RECEIVER){
+            if (resultCode == RESULT_OK){
+                RoomMember roomMember =(RoomMember) data.getSerializableExtra("selectReceiver");
+                tvReceiver.setText(roomMember.getUserName());
+                mReceiverId = roomMember.getUserId();
+
+            }
+        }
+    }
+
+    private void checkMoney(String moneyAmount, String memberCount, String receiverId) {
+        double money = 0.00f;
+        int count = 0;
+        try {
+            if (!TextUtils.isEmpty(moneyAmount)) {
+                money = Double.parseDouble(moneyAmount);
+            }
+            if (!TextUtils.isEmpty(memberCount)) {
+                count = Integer.parseInt(memberCount);
+            }
+
+        } catch (NumberFormatException e) {
+            Log.i(TAG, Objects.requireNonNull(e.getMessage()));
+
+        }
+        if (TextUtils.isEmpty(receiverId)){
+            if (money>0.01){
+                setSendButtonStatus(true);
+            }else {
+                setSendButtonStatus(false);
+            }
+
+        }else {
+            if (count <= 0 || money / count < 0.01) {
+                setSendButtonStatus(false);
+            } else {
+                setSendButtonStatus(true);
+            }
+
+        }
+
+
+    }
+    private void setSendButtonStatus(boolean isNormal) {
+        if (isNormal) {
+            btnSendRedPacket.setSelected(false);
+            btnSendRedPacket.setSelected(true);
+        } else {
+            btnSendRedPacket.setSelected(false);
+            btnSendRedPacket.setSelected(true);
+        }
+    }
+    private void sendRedPacket(){
+        String money = editMoneyAmount.getText().toString();
+        String count = editRedPacketCount.getText().toString();
+        String textWish = edtWishText.getText().toString();
+        if (eqData(money,count,textWish)){
+            PayPasswordVerifyDialog dialog = new PayPasswordVerifyDialog(getContext());
+            dialog.setAction(getString(R.string.chat_redpacket));
+
+            dialog.setMoney(money);
+            final String finalMoney = money;
+            final String finalWords = textWish;
+            final String finalCount = count;
+            dialog.setOnInputFinishListener(password -> {
+                final Bundle bundle = new Bundle();
+                final Intent intent = new Intent(getContext(), MucChatActivity.class);
+
+                bundle.putString("money", finalMoney);
+                bundle.putString("count", finalCount);
+                bundle.putString("words", finalWords);
+                // 拼手气与普通红包位置对调,修改type
+                // bundle.putString("type", (item + 1) + "");
+                bundle.putString("type",  redPacketType+"");
+                bundle.putString("receiver",mReceiverId);
+                bundle.putString("payPassword", password);
+                int resultCode = ChatActivity. REQUEST_CODE_SEND_RED_PT;
+                if (redPacketType==1){
+                    resultCode =ChatActivity. REQUEST_CODE_SEND_RED_PT;
+                }else if (redPacketType ==2){
+
+                    resultCode =ChatActivity. REQUEST_CODE_SEND_RED_PSQ;
+
+                }
+                intent.putExtras(bundle);
+                getActivity() .setResult(resultCode, intent);
+                getActivity().finish();
+            });
+
+            dialog.show();
+        }
+
+
+    }
+
+    private boolean eqData(String money, String count, String words) {
+        if (StringUtils.isNullOrEmpty(money)) {
+            ToastUtil.showToast(getContext(), getString(R.string.need_input_money));
+            return false;
+        } else if (Double.parseDouble(money) > 1800 || Double.parseDouble(money) <= 0) {
+            ToastUtil.showToast(getContext(), getString(R.string.red_packet_range));
+            return false;
+        } else if (Double.parseDouble(money) > coreManager.getSelf().getBalance()) {
+            ToastUtil.showToast(getContext(), getString(R.string.balance_not_enough));
+            return false;
+        } else if (StringUtils.isNullOrEmpty(count)) {
+            ToastUtil.showToast(getContext(), getString(R.string.need_red_packet_count));
+            return false;
+        } else if (StringUtils.isNullOrEmpty(words)) {
+            return false;
+        }
+        return true;
+    }
+
+    public void setRedPacketType(int type) {
+        this.redPacketType = type;
+    }
+}

+ 62 - 279
skWeiChatBaidu/src/main/java/com/liaobo/im/ui/me/redpacket/MucSendRedPacketActivity.java

@@ -1,8 +1,12 @@
 package com.liaobo.im.ui.me.redpacket;
 
 import android.content.Intent;
+import android.graphics.Color;
 import android.os.Bundle;
 import android.os.Parcelable;
+import android.support.design.widget.TabLayout;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentPagerAdapter;
 import android.support.v4.view.ViewPager;
 import android.text.Editable;
 import android.text.InputType;
@@ -18,7 +22,9 @@ import android.widget.Toast;
 
 import com.liaobo.im.R;
 import com.liaobo.im.db.InternationalizationHelper;
+import com.liaobo.im.fragment.MucSendPacketFragment;
 import com.liaobo.im.ui.base.BaseActivity;
+import com.liaobo.im.ui.base.EasyFragment;
 import com.liaobo.im.ui.message.ChatActivity;
 import com.liaobo.im.ui.message.MucChatActivity;
 import com.liaobo.im.ui.smarttab.SmartTabLayout;
@@ -35,26 +41,15 @@ import java.util.List;
 /**
  * Created by 魏正旺 on 2016/9/8.
  */
-public class MucSendRedPacketActivity extends BaseActivity implements View.OnClickListener {
-    LayoutInflater inflater;
-    private SmartTabLayout smartTabLayout;
-    private ViewPager viewPager;
-    private List<View> views;
-    private List<String> mTitleList;
-    private EditText edit_count_pt;
-    private EditText edit_money_pt;
-    private EditText edit_words_pt;
+public class MucSendRedPacketActivity extends BaseActivity  {
 
-    private EditText edit_count_psq;
-    private EditText edit_money_psq;
-    private EditText edit_words_psq;
+    private TabLayout mTabRedPacket;
+    private ViewPager viewPager;
+    private String roomId;
 
-//    private EditText edit_count_kl;
-//    private EditText edit_money_kl;
-//    private EditText edit_words_kl;
 
-    private TextView hbgs, ge, zje, yuan, xhb;
-    private Button sq;
+    private List<EasyFragment> mFragmentList;
+    private TabFragmentPagerAdapter mPagerAdapter;
 
 
     @Override
@@ -62,7 +57,7 @@ public class MucSendRedPacketActivity extends BaseActivity implements View.OnCli
         super.onCreate(savedInstanceState);
 
         setContentView(R.layout.activity_muc_redpacket);
-        inflater = LayoutInflater.from(this);
+        roomId = getIntent().getStringExtra("roomId");
         initView();
 
         checkHasPayPassword();
@@ -80,296 +75,84 @@ public class MucSendRedPacketActivity extends BaseActivity implements View.OnCli
 
     private void initView() {
         getSupportActionBar().hide();
-        findViewById(R.id.tv_title_left).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                finish();
-            }
-        });
+        findViewById(R.id.iv_title_left).setOnClickListener(view -> finish());
         TextView tvTitle = (TextView) findViewById(R.id.tv_title_center);
         tvTitle.setText(InternationalizationHelper.getString("JX_SendGift"));
+        mFragmentList = new ArrayList<>();
+        mTabRedPacket = findViewById(R.id.tab_red_packet);
+        viewPager =  findViewById(R.id.muc_viewpager);
+        initTabLayout();
 
-        smartTabLayout = (SmartTabLayout) findViewById(R.id.muc_smarttablayout_redpacket);
-        viewPager = (ViewPager) findViewById(R.id.muc_viewpagert_redpacket);
-        views = new ArrayList<View>();
-        mTitleList = new ArrayList<String>();
-        mTitleList.add(InternationalizationHelper.getString("JX_LuckGift"));
-        mTitleList.add(InternationalizationHelper.getString("JX_UsualGift"));
-//        mTitleList.add(InternationalizationHelper.getString("JX_MesGift"));
-
-        views.add(inflater.inflate(R.layout.muc_redpacket_pager_pt, null));
-        views.add(inflater.inflate(R.layout.muc_redpacket_pager_sq, null));
-//        views.add(inflater.inflate(R.layout.muc_redpacket_pager_kl, null));
-
-        View temp_view = views.get(0);
-        edit_count_pt = (EditText) temp_view.findViewById(R.id.edit_redcount);
-        edit_count_pt.addTextChangedListener(new RemoveZeroTextWatcher(edit_count_pt));
-        edit_money_pt = (EditText) temp_view.findViewById(R.id.edit_money);
-        edit_words_pt = (EditText) temp_view.findViewById(R.id.edit_blessing);
-        hbgs = (TextView) temp_view.findViewById(R.id.hbgs);
-        ge = (TextView) temp_view.findViewById(R.id.ge);
-        zje = (TextView) temp_view.findViewById(R.id.zje);
-        yuan = (TextView) temp_view.findViewById(R.id.yuan);
-        xhb = (TextView) temp_view.findViewById(R.id.textviewtishi);
-        sq = (Button) temp_view.findViewById(R.id.btn_sendRed);
-        hbgs.setText(InternationalizationHelper.getString("NUMBER_OF_ENVELOPES"));
-        ge.setText(InternationalizationHelper.getString("INDIVIDUAL"));
-        zje.setText(InternationalizationHelper.getString("TOTAL_AMOUNT"));
-        edit_money_pt.setHint(InternationalizationHelper.getString("INPUT_AMOUNT"));
-        yuan.setText(InternationalizationHelper.getString("YUAN"));
-        xhb.setText(InternationalizationHelper.getString("SAME_AMOUNT"));
-        edit_words_pt.setHint(InternationalizationHelper.getString("JX_GiftText"));
-        sq.setOnClickListener(this);
-
-        temp_view = views.get(1);
-        edit_count_psq = (EditText) temp_view.findViewById(R.id.edit_redcount);
-        edit_count_psq.addTextChangedListener(new RemoveZeroTextWatcher(edit_count_psq));
-        edit_money_psq = (EditText) temp_view.findViewById(R.id.edit_money);
-        edit_words_psq = (EditText) temp_view.findViewById(R.id.edit_blessing);
-        hbgs = (TextView) temp_view.findViewById(R.id.hbgs);
-        ge = (TextView) temp_view.findViewById(R.id.ge);
-        zje = (TextView) temp_view.findViewById(R.id.zje);
-        yuan = (TextView) temp_view.findViewById(R.id.yuan);
-        xhb = (TextView) temp_view.findViewById(R.id.textviewtishi);
-        sq = (Button) temp_view.findViewById(R.id.btn_sendRed);
-        hbgs.setText(InternationalizationHelper.getString("NUMBER_OF_ENVELOPES"));
-        ge.setText(InternationalizationHelper.getString("INDIVIDUAL"));
-        zje.setText(InternationalizationHelper.getString("TOTAL_AMOUNT"));
-        edit_money_psq.setHint(InternationalizationHelper.getString("INPUT_AMOUNT"));
-        yuan.setText(InternationalizationHelper.getString("YUAN"));
-        xhb.setText(InternationalizationHelper.getString("RONDOM_AMOUNT"));
-        edit_words_psq.setHint(InternationalizationHelper.getString("JX_GiftText"));
-        sq.setOnClickListener(this);
-
-//        temp_view = views.get(2);
-//        edit_count_kl = (EditText) temp_view.findViewById(R.id.edit_redcount);
-//        edit_count_kl.addTextChangedListener(new RemoveZeroTextWatcher(edit_count_kl));
-//        edit_money_kl = (EditText) temp_view.findViewById(R.id.edit_money);
-//        edit_words_kl = (EditText) temp_view.findViewById(R.id.edit_password);
-//        EditText edit_compatible = (EditText) temp_view.findViewById(R.id.edit_compatible);
-//        edit_compatible.requestFocus();
-
-//        hbgs = (TextView) temp_view.findViewById(R.id.hbgs);
-//        ge = (TextView) temp_view.findViewById(R.id.ge);
-//        zje = (TextView) temp_view.findViewById(R.id.zje);
-//        yuan = (TextView) temp_view.findViewById(R.id.yuan);
-//        xhb = (TextView) temp_view.findViewById(R.id.textviewtishi);
-//        sq = (Button) temp_view.findViewById(R.id.btn_sendRed);
-//        TextView kl = (TextView) temp_view.findViewById(R.id.kl);
-//        kl.setText(InternationalizationHelper.getString("JX_Message"));
-//        hbgs.setText(InternationalizationHelper.getString("NUMBER_OF_ENVELOPES"));
-//        ge.setText(InternationalizationHelper.getString("INDIVIDUAL"));
-//        zje.setText(InternationalizationHelper.getString("TOTAL_AMOUNT"));
-////        edit_money_kl.setHint(InternationalizationHelper.getString("INPUT_AMOUNT"));
-//        yuan.setText(InternationalizationHelper.getString("YUAN"));
-//        xhb.setText(InternationalizationHelper.getString("REPLY_GRAB"));
-////        edit_words_kl.setHint(InternationalizationHelper.getString("BIG_ENVELOPE"));
-//        sq.setOnClickListener(this);
-
-        InputChangeListener inputChangeListenerPt = new InputChangeListener(edit_money_pt);
-        InputChangeListener inputChangeListenerPsq = new InputChangeListener(edit_money_psq);
-//        InputChangeListener inputChangeListenerKl = new InputChangeListener(edit_money_kl);
-
-        // 添加输入监听
-        edit_money_pt.addTextChangedListener(inputChangeListenerPt);
-        edit_money_psq.addTextChangedListener(inputChangeListenerPsq);
-//        edit_money_kl.addTextChangedListener(inputChangeListenerKl);
-        // 只允许输入小数点和数字
-        edit_money_pt.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
-        edit_money_psq.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
-//        edit_money_kl.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
-
-        viewPager.setAdapter(new PagerAdapter());
-        smartTabLayout.setViewPager(viewPager);
-
-        /**
-         * 为了实现点击Tab栏切换的时候不出现动画
-         * 为每个Tab重新设置点击事件
-         */
-        for (int i = 0; i < mTitleList.size(); i++) {
-            View view = smartTabLayout.getTabAt(i);
-            view.setTag(i + "");
-            view.setOnClickListener(this);
-        }
     }
 
-    @Override
-    public void onClick(View v) {
-        if (v.getId() == R.id.btn_sendRed) {
-            final int item = viewPager.getCurrentItem();
-            final Bundle bundle = new Bundle();
-            final Intent intent = new Intent(this, MucChatActivity.class);
-            String money = null, words = null, count = null;
-            int resultCode = 0;
-            switch (item) {
-                case 0: {
-                    money = edit_money_pt.getText().toString();
-                    words = StringUtils.isNullOrEmpty(edit_words_pt.getText().toString()) ?
-                            edit_words_pt.getHint().toString() : edit_words_pt.getText().toString();
-                    count = edit_count_pt.getText().toString();
-                    // 拼手气与普通红包位置对调  修改resultCode
-                    resultCode = ChatActivity.REQUEST_CODE_SEND_RED_PSQ;
-                }
-                break;
-
-                case 1: {
-                    money = edit_money_psq.getText().toString();
-                    words = StringUtils.isNullOrEmpty(edit_words_psq.getText().toString()) ?
-                            edit_words_psq.getHint().toString() : edit_words_psq.getText().toString();
-                    count = edit_count_psq.getText().toString();
-                    resultCode = ChatActivity.REQUEST_CODE_SEND_RED_PT;
-                }
-                break;
-
-                case 2: {
-//                    money = edit_money_kl.getText().toString();
-//                    words = StringUtils.isNullOrEmpty(edit_words_kl.getText().toString()) ?
-//                            edit_words_kl.getHint().toString() : edit_words_kl.getText().toString();
-//                    count = edit_count_kl.getText().toString();
-//                    resultCode = ChatActivity.REQUEST_CODE_SEND_RED_KL;
-                }
-                break;
-            }
+    private void initFragment(){
+        MucSendPacketFragment luckFragment = new MucSendPacketFragment();
+        luckFragment.setRedPacketType(2);
+        luckFragment.setRoomId(roomId);
+        mFragmentList.add(luckFragment);
+        MucSendPacketFragment normalFragment = new MucSendPacketFragment();
+        normalFragment.setRedPacketType(1);
+        normalFragment.setRoomId(roomId);
+        mFragmentList.add(normalFragment);
+        mPagerAdapter = new TabFragmentPagerAdapter(getSupportFragmentManager(),mFragmentList);
+        viewPager.setAdapter(mPagerAdapter);
+        viewPager.setOffscreenPageLimit(mFragmentList.size());
 
-            if (!TextUtils.isEmpty(count) && Integer.parseInt(count) == 0) {
-                Toast.makeText(this, R.string.tip_red_packet_too_slow, Toast.LENGTH_SHORT).show();
-                return;
-            }
-
-            // 当金额过小,红包个数过多的情况下会出现不够分的情况
-            if (!TextUtils.isEmpty(count) && Integer.parseInt(count) > 100) {
-                Toast.makeText(this, R.string.tip_red_packet_too_much, Toast.LENGTH_SHORT).show();
-                return;
-            }
-
-            if (!TextUtils.isEmpty(money) &&
-                    !TextUtils.isEmpty(count) &&
-                    Double.parseDouble(money) / Integer.parseInt(count) < 0.01) {
-                Toast.makeText(this, R.string.tip_money_too_less, Toast.LENGTH_SHORT).show();
-                return;
-            }
-
-            if (eqData(money, count, words)) {
-                PayPasswordVerifyDialog dialog = new PayPasswordVerifyDialog(this);
-                dialog.setAction(getString(R.string.chat_redpacket));
-                dialog.setMoney(money);
-                final String finalMoney = money;
-                final String finalWords = words;
-                final String finalCount = count;
-                dialog.setOnInputFinishListener(new PayPasswordVerifyDialog.OnInputFinishListener() {
-                    @Override
-                    public void onInputFinish(final String password) {
-                        // 回传信息
-                        bundle.putString("money", finalMoney);
-                        bundle.putString("count", finalCount);
-                        bundle.putString("words", finalWords);
-                        // 拼手气与普通红包位置对调,修改type
-                        // bundle.putString("type", (item + 1) + "");
-                        if (item == 0) {
-                            bundle.putString("type", 2 + "");
-                        } else if (item == 1) {
-                            bundle.putString("type", 1 + "");
-                        } else {
-                            bundle.putString("type", (item + 1) + "");
-                        }
-                        bundle.putString("payPassword", password);
-                        intent.putExtras(bundle);
-                        setResult(item == 0 ? ChatActivity.REQUEST_CODE_SEND_RED_PSQ : ChatActivity.REQUEST_CODE_SEND_RED_KL, intent);
-                        finish();
-                    }
-                });
-                dialog.show();
-            }
-        } else {
-            int index = Integer.parseInt(v.getTag().toString());
-            viewPager.setCurrentItem(index, false);
-        }
     }
 
-    private boolean eqData(String money, String count, String words) {
-        if (StringUtils.isNullOrEmpty(money)) {
-            ToastUtil.showToast(mContext, getString(R.string.need_input_money));
-            return false;
-        } else if (Double.parseDouble(money) > 1800 || Double.parseDouble(money) <= 0) {
-            ToastUtil.showToast(mContext, getString(R.string.red_packet_range));
-            return false;
-        } else if (Double.parseDouble(money) > coreManager.getSelf().getBalance()) {
-            ToastUtil.showToast(mContext, getString(R.string.balance_not_enough));
-            return false;
-        } else if (StringUtils.isNullOrEmpty(count)) {
-            ToastUtil.showToast(mContext, getString(R.string.need_red_packet_count));
-            return false;
-        } else if (StringUtils.isNullOrEmpty(words)) {
-            return false;
-        }
-        return true;
-    }
+    private void initTabLayout(){
+        initFragment();
 
-    private static class RemoveZeroTextWatcher implements TextWatcher {
-        private EditText editText;
+        mTabRedPacket.setupWithViewPager(viewPager);
+        mTabRedPacket.removeAllTabs();
 
-        RemoveZeroTextWatcher(EditText editText) {
-            this.editText = editText;
-        }
+        mTabRedPacket.addTab(  mTabRedPacket.newTab().setText(InternationalizationHelper.getString("JX_LuckGift")));//手气红包
+        mTabRedPacket.addTab(  mTabRedPacket.newTab().setText(InternationalizationHelper.getString("JX_UsualGift")));//普通红包
+        mTabRedPacket.setTabIndicatorFullWidth(false);
+        mTabRedPacket.setInlineLabel(true);
+        mTabRedPacket.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
+            @Override
+            public void onTabSelected(TabLayout.Tab tab) {
 
-        @Override
-        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
-        }
+            }
 
-        @Override
-        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
-        }
+            @Override
+            public void onTabUnselected(TabLayout.Tab tab) {
 
-        @Override
-        public void afterTextChanged(Editable editable) {
-            // 删除开头的0,
-            int end = 0;
-            for (int i = 0; i < editable.length(); i++) {
-                char ch = editable.charAt(i);
-                if (ch == '0') {
-                    end = i + 1;
-                } else {
-                    break;
-                }
             }
-            if (end > 0) {
-                editable.delete(0, end);
-                editText.setText(editable);
+
+            @Override
+            public void onTabReselected(TabLayout.Tab tab) {
+
             }
-        }
+        });
+
     }
 
-    private class PagerAdapter extends android.support.v4.view.PagerAdapter {
 
-        @Override
-        public int getCount() {
-            return views.size();
-        }
 
-        @Override
-        public boolean isViewFromObject(View view, Object object) {
-            return view == object;
-        }
+    private class TabFragmentPagerAdapter extends FragmentPagerAdapter {
 
-        @Override
-        public void destroyItem(View container, int position, Object object) {
-            ((ViewPager) container).removeView(views.get(position));
+        private List<EasyFragment> mFragmentList;
+        public TabFragmentPagerAdapter(FragmentManager fm, List<EasyFragment> list) {
+            super(fm);
+            this.mFragmentList = list;
         }
 
         @Override
-        public Object instantiateItem(View container, int position) {
-            ((ViewGroup) container).addView(views.get(position));
-            return views.get(position);
+        public void setPrimaryItem(ViewGroup container, int position, Object object) {
+            super.setPrimaryItem(container, position, object);
         }
 
         @Override
-        public Parcelable saveState() {
-            return null;
+        public EasyFragment getItem(int position) {
+            return mFragmentList.get(position);//显示第几个页面
         }
 
         @Override
-        public CharSequence getPageTitle(int position) {
-            return mTitleList.get(position);
+        public int getCount() {
+            return mFragmentList.size();//有几个页面
         }
+
     }
 }

+ 4 - 2
skWeiChatBaidu/src/main/java/com/liaobo/im/ui/message/ChatActivity.java

@@ -1495,7 +1495,7 @@ public class ChatActivity extends BaseActivity implements
         sendMessage(message);
     }
 
-    public void sendRed(final String type, String money, String count, final String words, String payPassword) {
+    public void sendRed(final String type, String money, String count, final String words, String payPassword,String receiverId) {
         if (isAuthenticated()) {
             return;
         }
@@ -1505,6 +1505,7 @@ public class ChatActivity extends BaseActivity implements
         params.put("moneyStr", money);
         params.put("count", count);
         params.put("greetings", words);
+        params.put("assignUserId",receiverId);
         params.put("toUserId", mFriend.getUserId());
 
         HttpUtils.get().url(coreManager.getConfig().REDPACKET_SEND)
@@ -1816,12 +1817,13 @@ public class ChatActivity extends BaseActivity implements
                     if (data != null && data.getExtras() != null) {
                         Bundle bundle = data.getExtras();
                         String money = bundle.getString("money"); // 金额
+                        String receiverId = bundle.getString("receiver");   //指定人Id
                         // 口令或者祝福语
                         String words = resultCode == REQUEST_CODE_SEND_RED_PT ? bundle.getString("greetings") : bundle.getString("password");
                         String count = bundle.getString("count"); // 数量
                         String type = bundle.getString("type");   // 类型
                         String payPassword = bundle.getString("payPassword");   // 支付密码,
-                        sendRed(type, money, count, words, payPassword);
+                        sendRed(type, money, count, words, payPassword,receiverId);
                     }
                     break;
                 default:

+ 1 - 0
skWeiChatBaidu/src/main/java/com/liaobo/im/ui/message/MucChatActivity.java

@@ -1712,6 +1712,7 @@ public class MucChatActivity extends BaseActivity implements
     @Override
     public void clickRedpacket() {
         Intent intent = new Intent(this, MucSendRedPacketActivity.class);
+        intent.putExtra("roomId",roomId);
         startActivityForResult(intent, ChatActivity.REQUEST_CODE_SEND_RED);
     }
 

+ 11 - 0
skWeiChatBaidu/src/main/java/com/liaobo/im/ui/message/multi/GroupMoreFeaturesActivity.java

@@ -1,5 +1,6 @@
 package com.liaobo.im.ui.message.multi;
 
+import android.content.Intent;
 import android.os.Bundle;
 import android.text.Editable;
 import android.text.TextUtils;
@@ -82,6 +83,7 @@ public class GroupMoreFeaturesActivity extends BaseActivity {
     private boolean isDelete;
     private boolean isSetRemark;
 
+    private boolean isSelectReceiver;
 
     private int page = 1;
     private RoomMember mRoomMember;
@@ -96,6 +98,7 @@ public class GroupMoreFeaturesActivity extends BaseActivity {
         isBanned = getIntent().getBooleanExtra("isBanned", false);
         isDelete = getIntent().getBooleanExtra("isDelete", false);
         isSetRemark = getIntent().getBooleanExtra("isSetRemark", false);
+        isSelectReceiver = getIntent().getBooleanExtra("isSelectReceiver",false);
 
         initActionBar();
         initData();
@@ -214,6 +217,14 @@ public class GroupMoreFeaturesActivity extends BaseActivity {
                     // baseSortModel = mSortRoomMember..get((int) id);
                     roomMember = mSortRoomMember.get((int) id);
                 }
+                if (isSelectReceiver){
+                    Intent intent = new Intent();
+                    intent.putExtra("selectReceiver",roomMember);
+                    setResult(RESULT_OK,intent);
+                    finish();
+                    return;
+                }
+
 
                 if (isDelete) {// 踢人
                     if (roomMember.getUserId().equals(coreManager.getSelf().getUserId())) {

+ 91 - 0
skWeiChatBaidu/src/main/java/com/liaobo/im/util/MoneyValueFilter.java

@@ -0,0 +1,91 @@
+package com.liaobo.im.util;
+
+
+import android.text.SpannableStringBuilder;
+import android.text.Spanned;
+import android.text.method.DigitsKeyListener;
+
+
+/**
+ * 描述   :金额输入过滤器,限制小数点后输入位数
+ */
+
+public class MoneyValueFilter extends DigitsKeyListener {
+
+    private static final String TAG = MoneyValueFilter.class.getSimpleName();
+
+    public MoneyValueFilter() {
+        super(false, true);
+    }
+
+    private int digits = 2;
+
+    public MoneyValueFilter setDigits(int d) {
+        digits = d;
+        return this;
+    }
+
+    @Override
+    public CharSequence filter(CharSequence source, int start, int end,
+                               Spanned dest, int dstart, int dend) {
+        CharSequence out = super.filter(source, start, end, dest, dstart, dend);
+
+
+        // if changed, replace the source
+        if (out != null) {
+            source = out;
+            start = 0;
+            end = out.length();
+        }
+
+        int len = end - start;
+
+        // if deleting, source is empty
+        // and deleting can't break anything
+        if (len == 0) {
+            return source;
+        }
+
+        //以点开始的时候,自动在前面添加0
+        if (source.toString().equals(".") && dstart == 0) {
+            return "0.";
+        }
+        //如果起始位置为0,且第二位跟的不是".",则无法后续输入
+        if (!source.toString().equals(".") && dest.toString().equals("0")) {
+            return "";
+        }
+
+
+        int dlen = dest.length();
+
+        // Find the position of the decimal .
+        for (int i = 0; i < dstart; i++) {
+            if (dest.charAt(i) == '.') {
+                // being here means, that a number has
+                // been inserted after the dot
+                // check if the amount of digits is right
+                return (dlen - (i + 1) + len > digits) ?
+                        "" :
+                        new SpannableStringBuilder(source, start, end);
+            }
+        }
+
+        for (int i = start; i < end; ++i) {
+            if (source.charAt(i) == '.') {
+                // being here means, dot has been inserted
+                // check if the amount of digits is right
+                if ((dlen - dend) + (end - (i + 1)) > digits){
+                    return "";
+                }
+
+                else
+                    break;  // return new SpannableStringBuilder(source, start, end);
+            }
+        }
+
+
+        // if the dot is after the inserted part,
+        // nothing can break
+        return new SpannableStringBuilder(source, start, end);
+    }
+}

+ 7 - 0
skWeiChatBaidu/src/main/res/drawable/shape_modify_avatar.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#99333333"/>
+    <corners android:bottomRightRadius="8dp"
+        android:bottomLeftRadius="8dp"/>
+
+</shape>

+ 6 - 0
skWeiChatBaidu/src/main/res/drawable/shape_send_red_packet.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <corners android:radius="6dp"/>
+    <solid android:color="#1aa8ff"/>
+
+</shape>

+ 18 - 63
skWeiChatBaidu/src/main/res/layout/activity_muc_redpacket.xml

@@ -5,79 +5,34 @@
               android:layout_height="match_parent"
               android:orientation="vertical">
 
-    <FrameLayout
-        android:layout_width="match_parent"
-        android:layout_height="70dp"
-        android:background="@color/redpacket_bg">
-
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:layout_marginTop="20dp">
-
-            <TextView
-                android:id="@+id/tv_title_left"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_marginLeft="10dp"
-                android:gravity="center"
-                android:text="@string/cancel"
-                android:textColor="@color/yellow"
-                android:textSize="15sp"/>
-
-            <TextView
-                android:id="@+id/tv_title_center"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerInParent="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/send_red_packet"
-                android:textColor="@color/yellow"
-                android:textSize="17sp"/>
-
-        </RelativeLayout>
-
-    </FrameLayout>
+    <include layout="@layout/a_view_actionbar" />
 
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent">
 
-        <com.liaobo.im.ui.smarttab.SmartTabLayout
-            android:id="@+id/muc_smarttablayout_redpacket"
+        <android.support.design.widget.TabLayout
+            android:id="@+id/tab_red_packet"
             android:layout_width="match_parent"
-            android:layout_height="40dp"
-            android:background="@color/normal_bg"
-            app:stl_customTabTextLayoutId="@layout/a_custom_tab"
-            app:stl_defaultTabTextAllCaps="true"
-            app:stl_defaultTabTextColor="@color/replay_text_color_normal"
-            app:stl_defaultTabTextHorizontalPadding="10dp"
-            app:stl_defaultTabTextMinWidth="0dp"
-            app:stl_defaultTabTextSize="@dimen/redpacket_text_size_tab"
-            app:stl_distributeEvenly="true"
-            app:stl_dividerColor="#00000000"
-            app:stl_dividerThickness="1dp"
-            app:stl_drawDecorationAfterTab="false"
-            app:stl_indicatorAlwaysInCenter="false"
-            app:stl_indicatorColor="@color/redpacket_bg"
-            app:stl_indicatorCornerRadius="2dp"
-            app:stl_indicatorGravity="bottom"
-            app:stl_indicatorInFront="false"
-            app:stl_indicatorInterpolation="linear"
-            app:stl_indicatorThickness="1dp"
-            app:stl_indicatorWithoutPadding="true"
-            app:stl_overlineColor="#ffffff"
-            app:stl_overlineThickness="0dp"
-            app:stl_titleOffset="24dp"
-            app:stl_underlineColor="#ffffff"
-            app:stl_underlineThickness="0dp">
-        </com.liaobo.im.ui.smarttab.SmartTabLayout>
+            android:layout_height="wrap_content"
+            android:layout_marginStart="12dp"
+            android:layout_marginEnd="12dp"
+            app:tabIndicatorColor="#1aa8ff"
+            app:tabMode="fixed"
+
+            app:tabRippleColor="@android:color/transparent"
+            app:tabSelectedTextColor="#1aa8ff"
+            app:tabTextColor="#333333" />
 
         <android.support.v4.view.ViewPager
-            android:id="@+id/muc_viewpagert_redpacket"
+            android:id="@+id/muc_viewpager"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_below="@+id/muc_smarttablayout_redpacket">
+            android:layout_below="@+id/tab_red_packet">
+            <FrameLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:id="@+id/fragment_content"/>
         </android.support.v4.view.ViewPager>
 
     </RelativeLayout>

+ 236 - 0
skWeiChatBaidu/src/main/res/layout/fragment_muc_send_red_packet.xml

@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#e1e1e1"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_margin="12dp"
+        android:background="@drawable/shape_bg_white_radius_12"
+        android:orientation="vertical"
+        android:paddingTop="12dp"
+        android:paddingBottom="12dp">
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:orientation="horizontal"
+            android:weightSum="2">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="20dp"
+                android:layout_weight="1"
+                android:gravity="center_vertical"
+                android:text="@string/red_packet_count"
+                android:textColor="@color/text_black"
+                android:textSize="@dimen/redpacket_text_size_label" />
+
+            <RelativeLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1">
+
+                <EditText
+                    android:id="@+id/edit_red_packet_count"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_toLeftOf="@+id/tv_count"
+                    android:background="#0000"
+                    android:digits="@string/digits_number"
+                    android:gravity="center_vertical|right"
+                    android:inputType="number"
+                    android:maxLength="6"
+                    android:singleLine="true"
+                    android:textSize="13sp" />
+
+                <TextView
+                    android:id="@+id/tv_count"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_alignParentRight="true"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginRight="10dp"
+                    android:gravity="center_vertical"
+                    android:singleLine="true"
+                    android:text="@string/individual"
+                    android:textColor="@color/text_black"
+                    android:textSize="@dimen/redpacket_text_size_label" />
+
+            </RelativeLayout>
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="#bdbdbd" />
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:background="@color/white"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="20dp"
+                android:layout_weight="1"
+                android:gravity="center_vertical"
+                android:text="@string/total_money"
+                android:textColor="@color/text_black"
+                android:textSize="@dimen/redpacket_text_size_label" />
+
+            <RelativeLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1">
+
+                <EditText
+                    android:id="@+id/edit_money_amount"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_marginRight="35dp"
+                    android:background="#0000"
+                    android:gravity="center_vertical|right"
+                    android:hint="@string/input_money"
+                    android:inputType="number"
+                    android:maxLength="6"
+                    android:singleLine="true"
+                    android:textSize="@dimen/redpacket_text_size_label" />
+
+                <TextView
+                    android:layout_width="15dp"
+                    android:layout_height="match_parent"
+                    android:layout_alignParentRight="true"
+                    android:layout_marginRight="10dp"
+                    android:gravity="center_vertical"
+                    android:text="@string/rmb"
+                    android:textColor="@color/text_black"
+                    android:textSize="@dimen/redpacket_text_size_label" />
+
+            </RelativeLayout>
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="#bdbdbd" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:background="@color/white"
+            android:orientation="horizontal"
+            android:weightSum="2">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="20dp"
+                android:layout_weight="1"
+                android:gravity="center_vertical"
+                android:text="@string/receiver"
+                android:textColor="@color/text_black"
+                android:textSize="@dimen/redpacket_text_size_label" />
+
+            <RelativeLayout
+                android:id="@+id/rlt_select_receiver"
+
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1">
+
+                <ImageView
+                    android:id="@+id/iv_right"
+                    android:layout_width="14dp"
+                    android:layout_height="14dp"
+                    android:layout_alignParentRight="true"
+                    android:layout_centerVertical="true"
+                    android:layout_marginRight="10dp"
+                    android:src="@drawable/me_chevron_right" />
+
+                <TextView
+                    android:id="@+id/tv_receiver"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_toLeftOf="@+id/iv_right"
+                    android:ellipsize="end"
+
+                    android:gravity="center|end"
+                    android:hint="@string/select_receiver_hint"
+                    android:paddingRight="4dp"
+                    android:singleLine="true"
+                    android:textSize="@dimen/redpacket_text_size_label" />
+
+
+            </RelativeLayout>
+
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="#bdbdbd" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:background="@color/white"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="20dp"
+                android:layout_marginRight="10dp"
+                android:gravity="center_vertical"
+                android:text="@string/text_wish"
+                android:textColor="@color/text_black"
+                android:textSize="@dimen/redpacket_text_size_label" />
+
+            <EditText
+                android:id="@+id/edt_wish_text"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginRight="35dp"
+                android:background="#0000"
+                android:ellipsize="end"
+                android:gravity="center_vertical|right"
+                android:hint="@string/best_wishes"
+                android:singleLine="true"
+                android:textSize="@dimen/redpacket_text_size_label" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <Button
+        android:id="@+id/btn_sendRedPacket"
+        style="@style/BossGreenBtn"
+        android:layout_marginLeft="20dp"
+        android:layout_marginTop="20dp"
+        android:layout_marginRight="20dp"
+        android:background="@drawable/shape_send_red_packet"
+        android:text="@string/btn_send_red_packet" />
+
+    <TextView
+        android:id="@+id/tv_red_packet_hint"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="20dp"
+        android:layout_marginTop="2dp"
+        android:gravity="center"
+        android:hint="@string/hint_money_all_same"
+        android:singleLine="true"
+        android:textSize="@dimen/redpacket_text_size_label" />
+</LinearLayout>

+ 1 - 1
skWeiChatBaidu/src/main/res/layout/muc_redpacket_pager_pt.xml

@@ -213,7 +213,7 @@
         android:layout_marginLeft="20dp"
         android:layout_marginRight="20dp"
         android:layout_marginTop="20dp"
-        android:background="@color/redpacket_bg"
+        android:background="#1aa8ff"
         android:text="@string/btn_send_red_packet" />
 
 </RelativeLayout>

+ 1 - 1
skWeiChatBaidu/src/main/res/layout/muc_redpacket_pager_sq.xml

@@ -213,7 +213,7 @@
         android:layout_marginLeft="20dp"
         android:layout_marginRight="20dp"
         android:layout_marginTop="20dp"
-        android:background="@color/redpacket_bg"
+        android:background="#1aa8ff"
         android:text="@string/btn_send_red_packet" />
 
 </RelativeLayout>

+ 6 - 2
skWeiChatBaidu/src/main/res/values/strings.xml

@@ -828,7 +828,7 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ`¬!"£$%^*()~=#{}[];':,./?/*-_+&#060;&#062;&#064;&#03
     <string name="total_money">总金额</string>
     <string name="input_money">输入金额</string>
     <string name="btn_send_red_packet">塞钱进红包</string>
-    <string name="hint_money_all_same">小伙伴们领取的金额相同</string>
+    <string name="hint_money_all_same">*如不指定领取,小伙伴们领取的金额相同</string>
     <string name="fill_user_data">填写资料</string>
     <string name="under_review">审核中</string>
     <string name="hint_use_other_browser">如遇到无法预览的情况时,可使用外置浏览器预览</string>
@@ -878,7 +878,7 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ`¬!"£$%^*()~=#{}[];':,./?/*-_+&#060;&#062;&#064;&#03
     <string name="tip_reason_invite_friends">群主已启用\'群聊邀请确认\',邀请朋友进群可向群主描述原因。</string>
     <string name="invite_you">邀请你....</string>
     <string name="tip_calling">呼叫...</string>
-    <string name="hint_lucky_red_packet">小伙伴们领取的金额随机</string>
+    <string name="hint_lucky_red_packet">*如不指定领取,小伙伴们领取的金额随机</string>
     <string name="merger_failed">合并失败</string>
     <string name="tip_copy_success">已将该文件链接复制到粘贴版,前往网页预览</string>
     <string name="report_success">举报成功</string>
@@ -1849,4 +1849,8 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ`¬!"£$%^*()~=#{}[];':,./?/*-_+&#060;&#062;&#064;&#03
     <string name="my_red_packet">我的红包</string>
     <string name="view_auto_get_red_packet_title">自动领取的指定红包</string>
 
+    <string name="receiver">领取人</string>
+    <string name="select_receiver_hint">请选择领取人</string>
+    <string name="text_wish">祝福语</string>
+    <string name="modify_avatar">修改头像</string>
 </resources>