ltt vor 1 Jahr
Ursprung
Commit
5690cd0489
24 geänderte Dateien mit 1409 neuen und 0 gelöschten Zeilen
  1. 37 0
      TMessagesProj/src/main/java/org/telegram/onecric/adapter/MatchSearchResultAdapter.java
  2. 285 0
      TMessagesProj/src/main/java/org/telegram/onecric/dialog/TournamentDialog.java
  3. 16 0
      TMessagesProj/src/main/java/org/telegram/onecric/mvp/bean/MatchSearchBean.java
  4. 59 0
      TMessagesProj/src/main/java/org/telegram/onecric/mvp/presenter/SearchMatchPresenter.java
  5. 13 0
      TMessagesProj/src/main/java/org/telegram/onecric/mvp/view/SearchMatchView.java
  6. 427 0
      TMessagesProj/src/main/java/org/telegram/onecric/ui/activity/SearchMatchActivity.java
  7. 24 0
      TMessagesProj/src/main/java/org/telegram/onecric/utils/AnimUtil.java
  8. 5 0
      TMessagesProj/src/main/res/drawable/bg_search_25.xml
  9. 5 0
      TMessagesProj/src/main/res/drawable/selector_search_tab_bg.xml
  10. 7 0
      TMessagesProj/src/main/res/drawable/shape_dc3c23_5dp_rec.xml
  11. 6 0
      TMessagesProj/src/main/res/drawable/shape_e8e9ed_10dp_rec.xml
  12. 6 0
      TMessagesProj/src/main/res/drawable/shape_e8e9ed_25dp_rec.xml
  13. 6 0
      TMessagesProj/src/main/res/drawable/shape_f6f7f9_6dp_rec.xml
  14. 6 0
      TMessagesProj/src/main/res/drawable/shape_white_10dp_rec.xml
  15. 236 0
      TMessagesProj/src/main/res/layout/activity_search_match_new.xml
  16. 104 0
      TMessagesProj/src/main/res/layout/dialog_search_tournament.xml
  17. 68 0
      TMessagesProj/src/main/res/layout/item_search_matchs.xml
  18. 55 0
      TMessagesProj/src/main/res/layout/item_search_tours.xml
  19. 44 0
      TMessagesProj/src/main/res/layout/layout_search_empty.xml
  20. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/btn_square_blue.png
  21. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/btn_square_bor.png
  22. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/close_ico.png
  23. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/icon_cric1.png
  24. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/icon_cric2.png

+ 37 - 0
TMessagesProj/src/main/java/org/telegram/onecric/adapter/MatchSearchResultAdapter.java

@@ -0,0 +1,37 @@
+package org.telegram.onecric.adapter;
+
+import android.text.TextUtils;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+
+import org.telegram.messenger.R;
+import org.telegram.onecric.mvp.bean.MatchSearchBean;
+
+import java.util.List;
+
+public class MatchSearchResultAdapter extends BaseQuickAdapter<MatchSearchBean, BaseViewHolder> {
+    public MatchSearchResultAdapter(int layoutResId, @Nullable List<MatchSearchBean> data) {
+        super(layoutResId, data);
+    }
+
+    @Override
+    protected void convert(@NonNull BaseViewHolder helper, MatchSearchBean item) {
+        helper.setText(R.id.tv_left, TextUtils.isEmpty(item.title)?item.content:item.title);
+        helper.setText(R.id.tv_bottom,TextUtils.isEmpty(item.name)?item.content:item.name);
+        if(helper.getView(R.id.tv_status) != null){
+            if(item.status == 0){
+                helper.setText(R.id.tv_status,"UPCOMING");
+            }else if(item.status == 1){
+                helper.setText(R.id.tv_status,"LIVE");
+            }else{
+                helper.setText(R.id.tv_status,"COMPLETED");
+            }
+
+        }
+
+    }
+}

+ 285 - 0
TMessagesProj/src/main/java/org/telegram/onecric/dialog/TournamentDialog.java

@@ -0,0 +1,285 @@
+package org.telegram.onecric.dialog;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.Color;
+import android.graphics.drawable.GradientDrawable;
+import android.os.Build;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.lxj.xpopup.core.BasePopupView;
+import com.lxj.xpopup.core.BottomPopupView;
+import com.lxj.xpopup.util.XPopupUtils;
+
+import org.telegram.cricdit.utils.ColorUtil;
+import org.telegram.cricdit.utils.ToastUtil;
+import org.telegram.cricdit.utils.UIUtil;
+import org.telegram.messenger.R;
+import org.telegram.onecric.adapter.SelectTournamentAdapter;
+import org.telegram.onecric.mvp.CricketFiltrateBean;
+import org.telegram.onecric.net.ApiCallback;
+import org.telegram.onecric.net.ApiClient;
+import org.telegram.onecric.net.ApiStores;
+import org.telegram.onecric.ui.activity.NewMatchActivity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+public class TournamentDialog extends BottomPopupView implements View.OnClickListener {
+    private OnSelectTourListener mListener;
+    private Context mContext;
+    private RecyclerView rv_tournament;
+    private EditText et_search;
+    private TextView tv_apply;
+    private TextView tv_empty;
+    private LinearLayout ll_focus;
+    public SelectTournamentAdapter mAdapter;
+    private String mTournamentId = "";
+    private NewMatchActivity fragment;
+    private boolean isApply;
+
+    @Override
+    protected int getImplLayoutId() {
+        return R.layout.dialog_search_tournament;
+    }
+
+    public TournamentDialog(@NonNull Context context, NewMatchActivity activity, OnSelectTourListener listener) {
+        super(context);
+        this.mListener = listener;
+        this.mContext = context;
+        this.fragment = activity;
+    }
+
+    @Override
+    protected void onCreate() {
+        super.onCreate();
+        rv_tournament = findViewById(R.id.rv_tournament);
+        et_search = findViewById(R.id.et_input);
+        tv_apply = findViewById(R.id.tv_apply);
+        ll_focus = findViewById(R.id.ll_focus);
+        findViewById(R.id.iv_close).setOnClickListener(this);
+        findViewById(R.id.tv_reset).setOnClickListener(this);
+        tv_apply.setOnClickListener(this);
+
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
+            GradientDrawable gd = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[]{ColorUtil.COLOR_CHECKED, ColorUtil.COLOR_CHECKED});
+            gd.setSize(UIUtil.dip2px(mContext, 1.5), UIUtil.dip2px(mContext, et_search.getTextCursorDrawable().getIntrinsicHeight()));
+            et_search.setTextCursorDrawable(gd);
+        }
+        mAdapter = new SelectTournamentAdapter(R.layout.item_select_tournament, new ArrayList<>());
+        View inflate = LayoutInflater.from(getContext()).inflate(R.layout.layout_search_empty, null, false);
+        inflate.findViewById(R.id.ll_empty).setVisibility(View.VISIBLE);
+        mAdapter.setEmptyView(inflate);
+        tv_empty = mAdapter.getEmptyView().findViewById(R.id.tv_empty);
+        mAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                mAdapter.getItem(position).setCheck(!mAdapter.getItem(position).isCheck());
+                mAdapter.notifyItemChanged(position);
+                String midStr = "";
+                List<CricketFiltrateBean> temp = mAdapter.getData();
+                int checkNum = 0;
+                for (int i = temp.size()-1; i >= 0; i--) {
+                    if (temp.get(i).isCheck()) {
+                        checkNum++;
+                        midStr = midStr + temp.get(i).getId() + ",";
+                    }
+                }
+                if(midStr.equals(fragment.tag)){
+                    tv_apply.setEnabled(false);
+                    tv_apply.setTextColor(Color.parseColor("#C6C7CB"));
+                    tv_apply.setBackground(getContext().getResources().getDrawable(R.drawable.shape_c8c8c8_5dp_rec));
+                }else{
+                    tv_apply.setEnabled(true);
+                    tv_apply.setTextColor(Color.WHITE);
+                    tv_apply.setBackground(getContext().getResources().getDrawable(R.drawable.shape_dc3c23_5dp_rec));
+                }
+            }
+        });
+        rv_tournament.setLayoutManager(new LinearLayoutManager(getContext()));
+        rv_tournament.setAdapter(mAdapter);
+
+        et_search.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) {
+                getTourList();
+            }
+        });
+        getTourList();
+    }
+
+
+    @Override
+    public void onClick(View view) {
+        if(view.getId() == R.id.iv_close){
+            dismiss();
+        }else if(view.getId() == R.id.tv_reset){
+            if(TextUtils.isEmpty(fragment.tag)){
+                tv_apply.setEnabled(false);
+                tv_apply.setTextColor(Color.parseColor("#C6C7CB"));
+                tv_apply.setBackground(getContext().getResources().getDrawable(R.drawable.shape_c8c8c8_5dp_rec));
+            }else{
+                tv_apply.setEnabled(true);
+                tv_apply.setTextColor(Color.WHITE);
+                tv_apply.setBackground(getContext().getResources().getDrawable(R.drawable.shape_dc3c23_5dp_rec));
+            }
+            List<CricketFiltrateBean> data = mAdapter.getData();
+            for (int i = 0; i < data.size(); i++) {
+                data.get(i).setCheck(false);
+            }
+            mAdapter.notifyDataSetChanged();
+            mTournamentId = "";
+        }else if(view.getId() == R.id.tv_apply){
+            isApply = true;
+            dismiss();
+            for(int f=0;f<fragment.mFiltrateAdapter.getData().size();f++){
+                fragment.mFiltrateAdapter.getData().get(f).setCheck(false);
+            }
+            List<CricketFiltrateBean> temp = mAdapter.getData();
+            List<CricketFiltrateBean> fList = new ArrayList<>();
+            fList.addAll(fragment.mFiltrateAdapter.getData());
+            int checkNum = 0;
+            mTournamentId = "";
+            filtrate:for (int i = 0; i < temp.size(); i++) {
+                if (temp.get(i).isCheck()) {
+                    checkNum++;
+                    mTournamentId = mTournamentId + temp.get(i).getId() + ",";
+                    for(int f=0;f<fList.size();f++){
+                        if(fList.get(f).getId() == temp.get(i).getId()){
+                            fList.get(f).setCheck(true);
+                            fragment.mFiltrateAdapter.addData(0,fList.get(f));
+                            fragment.mFiltrateAdapter.remove(f+1);
+                            continue filtrate;
+                        }
+                    }
+                }
+            }
+
+            List<CricketFiltrateBean> tList = new ArrayList<>();
+            tList.addAll(mAdapter.getData());
+            for (int i = 0; i < tList.size(); i++) {
+                if (tList.get(i).isCheck()) {
+                    mAdapter.addData(0,tList.get(i));
+                    mAdapter.remove(i+1);
+                }
+            }
+            rv_tournament.scrollToPosition(0);
+            mListener.selectedWord(mTournamentId,checkNum);
+        }
+    }
+
+    @SuppressLint("CheckResult")
+    private void getTourList() {
+        ApiClient.retrofit().create(ApiStores.class)
+                .getTournamentList(et_search.getText().toString())
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribeWith(new ApiCallback() {
+                    @Override
+                    public void onSuccess(String data,  String msg) {
+                        List<CricketFiltrateBean> list = JSONObject.parseArray(data, CricketFiltrateBean.class);
+                        List<CricketFiltrateBean> temp = new ArrayList<>();
+                        temp.addAll(list);
+                        if(list!=null && list.size()>0){
+/*                            LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) rv_tournament.getLayoutParams();
+                            if (list.size() > 20) {
+                                layoutParams.height = (int) (XPopupUtils.getScreenHeight(getContext()) * .6f);
+                            } else {
+                                layoutParams.height = (int) (XPopupUtils.getScreenHeight(getContext()) * .4f);
+                            }
+                            rv_tournament.setLayoutParams(layoutParams);*/
+                            if(!TextUtils.isEmpty(fragment.tag)){
+                                for(int i=0; i<temp.size();i++){
+                                    if(fragment.tag.contains(","+temp.get(i).getId()) || fragment.tag.contains(temp.get(i).getId()+",")){
+                                        temp.get(i).setCheck(true);
+                                        if (temp.get(i).isCheck()) {
+                                            //选中的放最前面
+                                            list.add(0,temp.get(i));
+                                            list.remove(i+1);
+                                        }
+                                    }
+                                }
+                            }
+                            mAdapter.setNewData(list);
+                            rv_tournament.scrollToPosition(0);
+                        }else{
+                            tv_empty.setText("No Result for '" + et_search.getText().toString() + "'");
+                            mAdapter.setNewData(new ArrayList<>());
+                        }
+                    }
+
+                    @Override
+                    public void onFailure(String msg) {
+                        ToastUtil.show(mContext,msg);
+                    }
+
+                    @Override
+                    public void onError(String msg) {
+                        ToastUtil.show(mContext,msg);
+                    }
+
+                    @Override
+                    public void onFinish() {
+
+                    }
+                });
+    }
+
+    @Override
+    public void dismiss() {
+        if(!isApply){
+            List<CricketFiltrateBean> temp = mAdapter.getData();
+            for (int i = 0; i < temp.size(); i++) {
+                if (!TextUtils.isEmpty(fragment.tag) && fragment.tag.contains(temp.get(i).getId()+"")) {
+                    temp.get(i).setCheck(true);
+                }else{
+                    temp.get(i).setCheck(false);
+                }
+            }
+        }
+        mAdapter.notifyDataSetChanged();
+        super.dismiss();
+    }
+
+    public interface OnSelectTourListener{
+        void selectedWord(String tourIds,int checkNum);
+    }
+
+    @Override
+    protected void onShow() {
+        isApply = false;
+        ll_focus.requestFocus();
+        tv_apply.setEnabled(false);
+        tv_apply.setTextColor(Color.parseColor("#C6C7CB"));
+        tv_apply.setBackground(getContext().getResources().getDrawable(R.drawable.shape_c8c8c8_5dp_rec));
+        super.onShow();
+    }
+
+}

+ 16 - 0
TMessagesProj/src/main/java/org/telegram/onecric/mvp/bean/MatchSearchBean.java

@@ -0,0 +1,16 @@
+package org.telegram.onecric.mvp.bean;
+
+
+public class MatchSearchBean {
+    public int id;
+    public String scheduled;
+    public String title;
+    public String content;
+    public int status;
+
+    public String name;
+    public String type;
+    public String createdAt;
+    public String updatedAt;
+
+}

+ 59 - 0
TMessagesProj/src/main/java/org/telegram/onecric/mvp/presenter/SearchMatchPresenter.java

@@ -0,0 +1,59 @@
+package org.telegram.onecric.mvp.presenter;
+
+import com.alibaba.fastjson.JSONObject;
+
+import org.telegram.onecric.mvp.bean.MatchSearchBean;
+import org.telegram.onecric.mvp.view.SearchMatchView;
+import org.telegram.onecric.net.ApiCallback;
+import org.telegram.onecric.base.BasePresenter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.TimeZone;
+
+public class SearchMatchPresenter extends BasePresenter<SearchMatchView> {
+    public SearchMatchPresenter(SearchMatchView view) {
+        attachView(view);
+    }
+
+    public void searchMatch(String content,int type,int page,boolean isMore) {
+        addSubscription(apiStores.searchMatchNew(TimeZone.getDefault().getID(),content,type==1?"match":"tour",page),
+                new ApiCallback() {
+                    @Override
+                    public void onSuccess(String data, String msg) {
+                        List<MatchSearchBean> bean;
+                        try{
+                            bean = JSONObject.parseArray(JSONObject.parseObject(data).getString("data"),MatchSearchBean.class);
+                        }catch (Exception e){
+                            bean = new ArrayList<>();
+                        }
+                        if(isMore){
+                            mvpView.getMoreData(type,bean);
+                        }else{
+                            mvpView.getDataSuccess(bean,type);
+                            if(type == 1){
+                                searchMatch(content,2,page,false);
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFailure(String msg) {
+                        if(!isMore){
+                            mvpView.getDataFail(msg,type);
+                        }
+                    }
+
+                    @Override
+                    public void onError(String msg) {
+                        if(!isMore){
+                            mvpView.getDataFail(msg,type);
+                        }
+                    }
+
+                    @Override
+                    public void onFinish() {
+
+                    }
+                });
+    }
+}

+ 13 - 0
TMessagesProj/src/main/java/org/telegram/onecric/mvp/view/SearchMatchView.java

@@ -0,0 +1,13 @@
+package org.telegram.onecric.mvp.view;
+
+
+import org.telegram.onecric.base.BaseView;
+import org.telegram.onecric.mvp.bean.MatchSearchBean;
+
+import java.util.List;
+
+public interface SearchMatchView extends BaseView<MatchSearchBean> {
+    void getMoreData(int type, List<MatchSearchBean> list);
+    void getDataSuccess(List<MatchSearchBean> bean,int type);
+    void getDataFail(String msg,int type);
+}

+ 427 - 0
TMessagesProj/src/main/java/org/telegram/onecric/ui/activity/SearchMatchActivity.java

@@ -0,0 +1,427 @@
+package org.telegram.onecric.ui.activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.GradientDrawable;
+import android.os.Build;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.inputmethod.EditorInfo;
+import android.widget.EditText;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ScrollView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.core.content.res.ResourcesCompat;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+
+import org.telegram.cricdit.utils.ColorUtil;
+import org.telegram.cricdit.utils.ToastUtil;
+import org.telegram.cricdit.utils.UIUtil;
+import org.telegram.messenger.R;
+import org.telegram.onecric.adapter.MatchSearchResultAdapter;
+import org.telegram.onecric.base.MvpActivity;
+import org.telegram.onecric.mvp.bean.MatchSearchBean;
+import org.telegram.onecric.mvp.presenter.SearchMatchPresenter;
+import org.telegram.onecric.mvp.view.SearchMatchView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SearchMatchActivity extends MvpActivity<SearchMatchPresenter> implements SearchMatchView, View.OnClickListener {
+
+    public static void forward(Context context) {
+        Intent intent = new Intent(context, SearchMatchActivity.class);
+        context.startActivity(intent);
+    }
+
+    private EditText et_input;
+    private ImageView iv_close;
+    private RecyclerView recyclerView_match;
+    private RecyclerView recyclerView_tours;
+    private MatchSearchResultAdapter mMatchAdapter;
+    private MatchSearchResultAdapter mToursAdapter;
+    private FrameLayout fl_tab_all;
+    private FrameLayout fl_tab_matches;
+    private FrameLayout fl_tab_tours;
+    private TextView tv_tab_all;
+    private TextView tv_tab_matches;
+    private TextView tv_tab_tours;
+    private TextView tv_chat_info;
+    private LinearLayout ll_tab;
+    private TextView tv_title_match;
+    private TextView tv_title_tours;
+    private LinearLayout ll_empty;
+    private TextView tv_empty;
+    private String searchWord;
+    private Drawable drawableArrRight;
+    private FrameLayout fl_loading;
+    private View view_line;
+    private ScrollView sl_main;
+
+    private List<MatchSearchBean> matchsList;
+    private List<MatchSearchBean> toursList;
+    private int mMPage = 1;
+    private int mTPage = 1;
+
+    @Override
+    protected SearchMatchPresenter createPresenter() {
+        return new SearchMatchPresenter(this);
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.activity_search_match_new;
+    }
+
+    @Override
+    protected void initView() {
+        et_input = findViewById(R.id.et_input);
+        iv_close = findViewById(R.id.iv_close);
+        recyclerView_match = findViewById(R.id.recyclerView_match);
+        recyclerView_tours = findViewById(R.id.recyclerView_tours);
+        fl_tab_all = findViewById(R.id.fl_tab_all);
+        fl_tab_matches = findViewById(R.id.fl_tab_matches);
+        fl_tab_tours = findViewById(R.id.fl_tab_tours);
+        tv_tab_all = findViewById(R.id.tv_tab_all);
+        tv_tab_matches = findViewById(R.id.tv_tab_matches);
+        tv_tab_tours = findViewById(R.id.tv_tab_tours);
+        tv_chat_info = findViewById(R.id.tv_chat_info);
+        ll_tab = findViewById(R.id.ll_tab);
+        tv_title_match = findViewById(R.id.tv_title_match);
+        tv_title_tours = findViewById(R.id.tv_title_tours);
+        ll_empty = findViewById(R.id.ll_empty);
+        tv_empty = findViewById(R.id.tv_empty);
+        fl_loading = findViewById(R.id.fl_loading);
+        view_line = findViewById(R.id.view_line);
+        sl_main = findViewById(R.id.sl_main);
+
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
+            GradientDrawable gd = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[]{ColorUtil.COLOR_CHECKED, ColorUtil.COLOR_CHECKED});
+            gd.setSize(UIUtil.dip2px(this, 1.5), UIUtil.dip2px(this, et_input.getTextCursorDrawable().getIntrinsicHeight()));
+            et_input.setTextCursorDrawable(gd);
+        }
+        iv_close.setOnClickListener(this);
+        tv_tab_all.setOnClickListener(this);
+        tv_tab_matches.setOnClickListener(this);
+        tv_tab_tours.setOnClickListener(this);
+        tv_title_match.setOnClickListener(this);
+        tv_title_tours.setOnClickListener(this);
+        findViewById(R.id.iv_back).setOnClickListener(this);
+        drawableArrRight = getResources().getDrawable(R.mipmap.icon_arrow_right_three);
+        drawableArrRight.setBounds(0, 0, drawableArrRight.getMinimumWidth(),drawableArrRight.getMinimumHeight());
+        matchsList = new ArrayList<>();
+        toursList = new ArrayList<>();
+    }
+
+    @Override
+    protected void initData() {
+        et_input.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                /*判断是否是“发送”键*/
+                if (actionId == EditorInfo.IME_ACTION_SEARCH) {
+                    searchWord = et_input.getText().toString();
+                    searchContent();
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        et_input.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) {
+                if (editable.length() == 0) {
+                    iv_close.setVisibility(View.GONE);
+                } else {
+                    iv_close.setVisibility(View.VISIBLE);
+                }
+                searchWord = et_input.getText().toString();
+                searchContent();
+            }
+        });
+
+        //搜索出来的内容
+        mMatchAdapter = new MatchSearchResultAdapter(R.layout.item_search_matchs,matchsList);
+        mMatchAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                if(mMatchAdapter.getItem(position).id!=0){
+                    CricketDetailActivity.forward(mActivity, mMatchAdapter.getItem(position).id);
+                }
+            }
+        });
+        recyclerView_match.setLayoutManager(new LinearLayoutManager(this));
+        recyclerView_match.setAdapter(mMatchAdapter);
+
+        mToursAdapter = new MatchSearchResultAdapter(R.layout.item_search_tours,toursList);
+        mToursAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                CricketInnerActivity.forward(mActivity, mToursAdapter.getItem(position).name, "1", mToursAdapter.getItem(position).id);
+            }
+        });
+        recyclerView_tours.setLayoutManager(new LinearLayoutManager(this));
+        recyclerView_tours.setAdapter(mToursAdapter);
+
+        recyclerView_match.addOnScrollListener(new RecyclerView.OnScrollListener() {
+            @Override
+            public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
+                if (tv_tab_all.isSelected() != true){
+                    LinearLayoutManager manager = (LinearLayoutManager) recyclerView.getLayoutManager();
+                    if (newState == RecyclerView.SCROLL_STATE_IDLE) {
+                        int lastVisibleItem = manager.findLastVisibleItemPosition();
+                        int totalItemCount = manager.getItemCount();
+                        if (lastVisibleItem == (totalItemCount - 1)) {
+                            mMPage++;
+                            mvpPresenter.searchMatch(searchWord, 1, mMPage,true);
+                        }
+                    }
+                }
+            }
+        });
+
+        recyclerView_tours.addOnScrollListener(new RecyclerView.OnScrollListener() {
+            @Override
+            public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
+                if (tv_tab_all.isSelected() != true){
+                    LinearLayoutManager manager = (LinearLayoutManager) recyclerView.getLayoutManager();
+                    if (newState == RecyclerView.SCROLL_STATE_IDLE) {
+                        int lastVisibleItem = manager.findLastVisibleItemPosition();
+                        int totalItemCount = manager.getItemCount();
+                        if (lastVisibleItem == (totalItemCount - 1)) {
+                            mTPage++;
+                            mvpPresenter.searchMatch(searchWord, 2, mTPage,true);
+                        }
+                    }
+                }
+            }
+        });
+
+    }
+
+    private void searchContent() {
+        mTPage = 1;
+        mMPage = 1;
+        toursList = null;
+        matchsList = null;
+        mToursAdapter.setNewData(toursList);
+        mMatchAdapter.setNewData(matchsList);
+        ll_tab.setVisibility(View.GONE);
+        ll_empty.setVisibility(View.GONE);
+        sl_main.setVisibility(View.GONE);
+        tv_title_match.setVisibility(View.GONE);
+        tv_title_tours.setVisibility(View.GONE);
+        if (!TextUtils.isEmpty(searchWord) && searchWord.length()>2) {
+            tv_chat_info.setVisibility(View.GONE);
+            fl_loading.setVisibility(View.VISIBLE);
+            mvpPresenter.searchMatch(searchWord,1,mMPage,false);
+        }else{
+            tv_chat_info.setVisibility(View.VISIBLE);
+        }
+    }
+
+    @Override
+    public void getDataSuccess(MatchSearchBean bean) {}
+
+
+    @Override
+    public void getDataFail(String msg) {}
+
+    @Override
+    public void onClick(View v) {
+        if(v.getId() == R.id.iv_close){
+            et_input.setText("");
+        }else if(v.getId() == R.id.iv_back){
+            finish();
+        }else if(v.getId() == R.id.tv_tab_all){
+            showSelectTabList(0);
+        }else if(v.getId() == R.id.tv_tab_matches){
+            showSelectTabList(1);
+        }else if(v.getId() == R.id.tv_tab_tours){
+            showSelectTabList(2);
+        }else if(v.getId() == R.id.tv_title_match){
+            if(tv_tab_all.isSelected()){
+                showSelectTabList(1);
+            }
+        }else if(v.getId() == R.id.tv_title_tours){
+            if(tv_tab_all.isSelected()){
+                showSelectTabList(2);
+            }
+        }
+    }
+
+    private void showSelectTabList(int type){
+        tv_tab_all.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_regular));
+        tv_tab_matches.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_regular));
+        tv_tab_tours.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_regular));
+        tv_title_match.setCompoundDrawables(null,null,null,null);
+        tv_title_tours.setCompoundDrawables(null,null,null,null);
+        tv_tab_all.setSelected(false);
+        tv_tab_tours.setSelected(false);
+        tv_tab_matches.setSelected(false);
+        recyclerView_match.setVisibility(View.VISIBLE);
+        recyclerView_tours.setVisibility(View.VISIBLE);
+        tv_title_match.setVisibility((matchsList != null && matchsList.size()>0)?View.VISIBLE:View.GONE);
+        tv_title_tours.setVisibility((toursList != null && toursList.size()>0)?View.VISIBLE:View.GONE);
+        switch (type){
+            case 0:
+                if(!tv_tab_all.isSelected()){
+                    if(matchsList != null && matchsList.size()>9){
+                        mMatchAdapter.setNewData(matchsList.subList(0,9));
+                        tv_title_match.setCompoundDrawables(null,null,drawableArrRight,null);
+                    }else{
+                        mMatchAdapter.setNewData(matchsList);
+                    }
+
+                    if(toursList != null && toursList.size()>9){
+                        mToursAdapter.setNewData(toursList.subList(0,9));
+                        tv_title_tours.setCompoundDrawables(null,null,drawableArrRight,null);
+                    }else{
+                        mToursAdapter.setNewData(toursList);
+                    }
+
+                    tv_tab_all.setSelected(true);
+                    tv_tab_all.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_semibold));
+                    if(mMatchAdapter.getItemCount() != 0 && mToursAdapter.getItemCount() != 0){
+                        view_line.setVisibility(View.VISIBLE);
+                    }
+                }
+                break;
+            case 1:
+                if(!tv_tab_matches.isSelected()){
+                    mMatchAdapter.setNewData(matchsList);
+                    tv_tab_matches.setSelected(true);
+                    recyclerView_tours.setVisibility(View.GONE);
+                    tv_title_tours.setVisibility(View.GONE);
+                    tv_tab_matches.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_semibold));
+                    view_line.setVisibility(View.GONE);
+                }
+                break;
+            case 2:
+                if(!tv_tab_tours.isSelected()){
+                    mToursAdapter.setNewData(toursList);
+                    tv_tab_tours.setSelected(true);
+                    recyclerView_match.setVisibility(View.GONE);
+                    tv_title_match.setVisibility(View.GONE);
+                    tv_tab_tours.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_semibold));
+                    view_line.setVisibility(View.GONE);
+                }
+                break;
+            default:break;
+        }
+    }
+
+    @Override
+    public void getMoreData(int type, List<MatchSearchBean> list) {
+        if(list == null || list.size() <= 0){
+            if(type == 1){
+                mMPage--;
+            }else {
+                mTPage--;
+            }
+            return;
+        }
+        if(type == 1){
+            mMatchAdapter.addData(list);
+        }else if(type == 2){
+            mToursAdapter.addData(list);
+        }
+    }
+
+    @Override
+    public void getDataSuccess(List<MatchSearchBean> bean, int type) {
+        fl_loading.setVisibility(View.GONE);
+        sl_main.setVisibility(View.VISIBLE);
+
+        if(type == 1){
+            tv_tab_all.setSelected(true);
+            tv_tab_matches.setSelected(false);
+            tv_tab_tours.setSelected(false);
+            tv_tab_all.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_semibold));
+            tv_tab_matches.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_regular));
+            tv_tab_tours.setTypeface(ResourcesCompat.getFont(this, R.font.noto_sans_display_regular));
+            if (bean != null && bean.size() > 0) {
+                ll_tab.setVisibility(View.VISIBLE);
+                fl_tab_matches.setVisibility(View.VISIBLE);
+                recyclerView_match.setVisibility(View.VISIBLE);
+                tv_title_match.setVisibility(View.VISIBLE);
+                matchsList = bean;
+                if(bean.size()>9){
+                    mMatchAdapter.setNewData(bean.subList(0,9));
+                    tv_title_match.setCompoundDrawables(null,null,drawableArrRight,null);
+                }else{
+                    mMatchAdapter.setNewData(bean);
+                    tv_title_match.setCompoundDrawables(null,null,null,null);
+                }
+            }else{
+                fl_tab_matches.setVisibility(View.GONE);
+                tv_title_match.setVisibility(View.GONE);
+            }
+        }else if(type == 2){
+            if (bean != null && bean.size() > 0) {
+                ll_tab.setVisibility(View.VISIBLE);
+                fl_tab_tours.setVisibility(View.VISIBLE);
+                recyclerView_tours.setVisibility(View.VISIBLE);
+                tv_title_tours.setVisibility(View.VISIBLE);
+                toursList = bean;
+                if(bean.size()>9){
+                    mToursAdapter.setNewData(bean.subList(0,9));
+                    tv_title_tours.setCompoundDrawables(null,null,drawableArrRight,null);
+                }else{
+                    mToursAdapter.setNewData(bean);
+                    tv_title_tours.setCompoundDrawables(null,null,null,null);
+                }
+            }else{
+                fl_tab_tours.setVisibility(View.GONE);
+                tv_title_tours.setVisibility(View.GONE);
+            }
+
+            if(mMatchAdapter.getItemCount() == 0){
+                if(mToursAdapter.getItemCount() == 0){
+                    recyclerView_match.setVisibility(View.GONE);
+                    recyclerView_tours.setVisibility(View.GONE);
+                    sl_main.setVisibility(View.GONE);
+                    ll_empty.setVisibility(View.VISIBLE);
+                    tv_empty.setText("No Result for '" + searchWord + "'");
+                }
+            }
+
+        }
+
+    }
+
+    @Override
+    public void getDataFail(String msg, int type) {
+        fl_loading.setVisibility(View.GONE);
+        if(type == 1){
+            recyclerView_match.setVisibility(View.GONE);
+            tv_title_match.setVisibility(View.GONE);
+        }else{
+            recyclerView_tours.setVisibility(View.GONE);
+            tv_title_tours.setVisibility(View.GONE);
+        }
+        ToastUtil.show(this,msg);
+    }
+}

+ 24 - 0
TMessagesProj/src/main/java/org/telegram/onecric/utils/AnimUtil.java

@@ -0,0 +1,24 @@
+package org.telegram.onecric.utils;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.ObjectAnimator;
+import android.view.View;
+import android.view.animation.LinearInterpolator;
+
+public class AnimUtil {
+    public static void transAnim(View view, float start, float end) {
+        ObjectAnimator mObjectAnimator = ObjectAnimator.ofFloat(view, "translationY",start,end);
+        mObjectAnimator.setDuration(500);
+        mObjectAnimator.setInterpolator(new LinearInterpolator());
+
+        mObjectAnimator.addListener(new AnimatorListenerAdapter() {
+            @Override
+            public void onAnimationEnd(Animator animation) {
+                super.onAnimationEnd(animation);
+
+            }
+        });
+        mObjectAnimator.start(); // 开始播放动画
+    }
+}

+ 5 - 0
TMessagesProj/src/main/res/drawable/bg_search_25.xml

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

+ 5 - 0
TMessagesProj/src/main/res/drawable/selector_search_tab_bg.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_selected="true" android:drawable="@drawable/bg_search_15"/>
+    <item android:state_selected="false" android:drawable="@drawable/bg_search2_15"/>
+</selector>

+ 7 - 0
TMessagesProj/src/main/res/drawable/shape_dc3c23_5dp_rec.xml

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

+ 6 - 0
TMessagesProj/src/main/res/drawable/shape_e8e9ed_10dp_rec.xml

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

+ 6 - 0
TMessagesProj/src/main/res/drawable/shape_e8e9ed_25dp_rec.xml

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

+ 6 - 0
TMessagesProj/src/main/res/drawable/shape_f6f7f9_6dp_rec.xml

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

+ 6 - 0
TMessagesProj/src/main/res/drawable/shape_white_10dp_rec.xml

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

+ 236 - 0
TMessagesProj/src/main/res/layout/activity_search_match_new.xml

@@ -0,0 +1,236 @@
+<?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:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:background="@color/c_1D2550"
+        android:paddingTop="45dp"
+        android:paddingBottom="6dp">
+
+        <ImageView
+            android:id="@+id/iv_back"
+            android:layout_width="40dp"
+            android:layout_height="37dp"
+            android:src="@mipmap/icon_arrow_left"
+            android:padding="12dp"/>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="37dp"
+            android:gravity="center_vertical"
+            android:layout_marginRight="15dp"
+            android:orientation="horizontal"
+            android:background="@drawable/shape_white_10dp_rec">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="12dp"
+                android:layout_marginRight="9dp"
+                android:background="@mipmap/icon_search_two"/>
+
+            <EditText
+                android:id="@+id/et_input"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:hint="@string/match_search_hint"
+                android:textColor="@color/c_111111"
+                android:textColorHint="@color/c_70809B"
+                android:textSize="14dp"
+                android:imeOptions="actionSearch"
+                android:singleLine="true"
+                android:background="@null"/>
+
+            <ImageView
+                android:id="@+id/iv_close"
+                android:layout_width="14dp"
+                android:layout_height="14dp"
+                android:layout_marginRight="12dp"
+                android:background="@mipmap/icon_search_close"
+                android:visibility="gone"/>
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <FrameLayout
+        android:id="@+id/fl_loading"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/c_1D2550"
+        android:visibility="gone">
+
+        <ProgressBar
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:layout_gravity="center_horizontal"
+            android:layout_marginBottom="8dp"
+            android:layout_marginTop="14dp"
+            android:indeterminateBehavior="repeat"
+            android:indeterminateDrawable="@drawable/anim_loading"
+            android:indeterminateOnly="true" />
+
+    </FrameLayout>
+
+    <LinearLayout
+        android:id="@+id/ll_tab"
+        android:layout_width="match_parent"
+        android:layout_height="42dp"
+        android:padding="6dp"
+        android:orientation="horizontal"
+        android:background="@color/c_1D2550"
+        android:visibility="gone">
+
+        <FrameLayout
+            android:id="@+id/fl_tab_all"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:layout_height="match_parent">
+
+            <TextView
+                android:id="@+id/tv_tab_all"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="All"
+                android:textSize="14dp"
+                android:background="@drawable/selector_search_tab_bg"
+                android:foreground="@drawable/selector_foreground_search"
+                android:gravity="center"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
+                android:textColor="@color/white"
+                android:layout_gravity="center_horizontal"/>
+
+        </FrameLayout>
+
+        <FrameLayout
+            android:id="@+id/fl_tab_matches"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:layout_height="match_parent">
+
+            <TextView
+                android:id="@+id/tv_tab_matches"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="Matches"
+                android:textSize="14dp"
+                android:background="@drawable/selector_search_tab_bg"
+                android:foreground="@drawable/selector_foreground_search"
+                android:gravity="center"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
+                android:textColor="@color/white"
+                android:layout_centerHorizontal="true"
+                android:layout_gravity="center_horizontal"/>
+
+        </FrameLayout>
+
+        <FrameLayout
+            android:id="@+id/fl_tab_tours"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:layout_height="match_parent">
+
+            <TextView
+                android:id="@+id/tv_tab_tours"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="Tours"
+                android:textSize="14dp"
+                android:background="@drawable/selector_search_tab_bg"
+                android:foreground="@drawable/selector_foreground_search"
+                android:gravity="center"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
+                android:textColor="@color/white"
+                android:layout_gravity="center_horizontal"/>
+
+        </FrameLayout>
+
+    </LinearLayout>
+
+    <TextView
+        android:id="@+id/tv_chat_info"
+        android:layout_width="match_parent"
+        android:layout_height="33dp"
+        android:text="Enter at least 3 characters to auto search..."
+        android:gravity="center_vertical"
+        android:drawableLeft="@mipmap/icon_notice"
+        android:textColor="@color/c_1D2550"
+        android:fontFamily="@font/noto_sans_display_semibold"
+        android:textSize="12sp"
+        android:paddingLeft="20dp"
+        android:drawablePadding="10dp"
+        android:background="@color/c_80DCDBE0"/>
+
+    <ScrollView
+        android:id="@+id/sl_main"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/white">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/tv_title_match"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:padding="12dp"
+                android:text="Matches"
+                android:textColor="@color/c_111111"
+                android:fontFamily="@font/noto_sans_display_semibold"
+                android:visibility="gone"/>
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/recyclerView_match"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingLeft="12dp"
+                android:paddingRight="12dp"
+                android:visibility="gone"
+                android:overScrollMode="never"/>
+
+            <View
+                android:id="@+id/view_line"
+                android:layout_width="match_parent"
+                android:layout_height="8dp"
+                android:background="@color/line_color"
+                android:visibility="gone"/>
+
+            <TextView
+                android:id="@+id/tv_title_tours"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:padding="12dp"
+                android:text="Tours"
+                android:textColor="@color/c_111111"
+                android:fontFamily="@font/noto_sans_display_semibold"
+                android:visibility="gone"/>
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/recyclerView_tours"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:paddingLeft="12dp"
+                android:paddingRight="12dp"
+                android:visibility="gone"
+                android:overScrollMode="never"/>
+
+        </LinearLayout>
+    </ScrollView>
+
+    <include layout="@layout/layout_search_empty"/>
+
+</LinearLayout>

+ 104 - 0
TMessagesProj/src/main/res/layout/dialog_search_tournament.xml

@@ -0,0 +1,104 @@
+<?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"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/shape_white_25dp_half_rec">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:paddingTop="12dp"
+        android:paddingBottom="17dp"
+        android:paddingLeft="12dp"
+        android:paddingRight="4dp">
+
+        <LinearLayout
+            android:id="@+id/ll_focus"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:layout_height="37dp"
+            android:gravity="center_vertical"
+            android:layout_marginRight="5dp"
+            android:orientation="horizontal"
+            android:background="@drawable/shape_e8e9ed_10dp_rec"
+            android:focusable="true"
+            android:focusableInTouchMode="true">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="12dp"
+                android:layout_marginRight="9dp"
+                android:background="@mipmap/icon_search_two"/>
+
+            <EditText
+                android:id="@+id/et_input"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:hint="@string/match_search_tour_hint"
+                android:textColor="@color/c_111111"
+                android:textColorHint="@color/c_70809B"
+                android:textSize="14dp"
+                android:singleLine="true"
+                android:background="@null"/>
+
+        </LinearLayout>
+
+        <ImageView
+            android:id="@+id/iv_close"
+            android:layout_width="30dp"
+            android:layout_height="30dp"
+            android:padding="9dp"
+            android:layout_gravity="center_vertical"
+            android:src="@mipmap/close_ico"/>
+
+    </LinearLayout>
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/rv_tournament"
+        android:layout_width="match_parent"
+        android:layout_height="260dp"
+        android:overScrollMode="never" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center_horizontal"
+        android:orientation="horizontal"
+        android:paddingTop="15dp"
+        android:paddingBottom="30dp"
+        android:background="@mipmap/bg_select_tournament_footer">
+
+        <com.coorchice.library.SuperTextView
+            android:id="@+id/tv_reset"
+            android:layout_width="116dp"
+            android:layout_height="31dp"
+            android:gravity="center"
+            android:text="@string/clear_all"
+            android:textSize="14dp"
+            android:textColor="@color/colorBlue"
+            android:foreground="?android:attr/selectableItemBackground"
+            android:letterSpacing="0.1"
+            android:fontFamily="@font/noto_sans_display_semibold" />
+
+        <TextView
+            android:id="@+id/tv_apply"
+            android:layout_width="116dp"
+            android:layout_height="31dp"
+            android:layout_marginLeft="40dp"
+            android:gravity="center"
+            android:text="@string/apply2"
+            android:textSize="14dp"
+            android:foreground="?android:attr/selectableItemBackground"
+            android:textColor="#C6C7CB"
+            android:background="@drawable/shape_c8c8c8_5dp_rec"
+            android:letterSpacing="0.1"
+            android:fontFamily="@font/noto_sans_display_semibold"
+            android:enabled="false"/>
+
+    </LinearLayout>
+
+</LinearLayout>

+ 68 - 0
TMessagesProj/src/main/res/layout/item_search_matchs.xml

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingTop="12dp"
+    android:background="@color/white"
+    android:foreground="@drawable/selector_foreground_white">
+
+    <ImageView
+        android:id="@+id/iv_right"
+        android:layout_width="35dp"
+        android:layout_height="35dp"
+        android:layout_alignParentLeft="true"
+        android:scaleType="centerCrop"
+        android:src="@mipmap/icon_cric1"/>
+
+    <TextView
+        android:id="@+id/tv_left"
+        android:textSize="@dimen/sp_14"
+        android:textColor="@color/c_333333"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignTop="@+id/iv_right"
+        android:layout_marginLeft="15dp"
+        android:layout_toRightOf="@+id/iv_right"
+        android:layout_toLeftOf="@id/tv_status"
+        android:ellipsize="end"
+        android:maxLines="1"
+        android:singleLine="true"
+        android:fontFamily="@font/noto_sans_display_regular"/>
+
+    <TextView
+        android:id="@+id/tv_bottom"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/tv_left"
+        android:textSize="11sp"
+        android:textColor="@color/c_999999"
+        android:layout_marginTop="2dp"
+        android:layout_alignLeft="@id/tv_left"
+        android:singleLine="true"
+        android:maxLines="1"
+        android:ellipsize="end"
+        android:layout_toLeftOf="@id/tv_status"/>
+    
+    <TextView
+        android:id="@+id/tv_status"
+        android:layout_width="64dp"
+        android:layout_height="wrap_content"
+        android:paddingTop="2dp"
+        android:paddingBottom="2dp"
+        android:textColor="@color/c_999999"
+        android:textSize="10sp"
+        android:background="@drawable/shape_f6f7f9_6dp_rec"
+        android:layout_alignParentRight="true"
+        android:gravity="center_horizontal"
+        android:layout_alignBottom="@id/tv_bottom"
+        android:layout_marginLeft="5dp"/>
+
+    <View
+        android:id="@+id/view_line"
+        android:layout_width="match_parent"
+        android:layout_height="0.5dp"
+        android:layout_below="@id/tv_bottom"
+        android:layout_marginTop="12dp"
+        android:background="@color/line_color"/>
+
+</RelativeLayout>

+ 55 - 0
TMessagesProj/src/main/res/layout/item_search_tours.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingTop="12dp"
+    android:background="@color/white"
+    android:foreground="@drawable/selector_foreground_white">
+
+    <ImageView
+        android:id="@+id/iv_right"
+        android:layout_width="35dp"
+        android:layout_height="35dp"
+        android:layout_alignParentLeft="true"
+        android:scaleType="centerCrop"
+        android:src="@mipmap/icon_cric2"/>
+
+    <TextView
+        android:id="@+id/tv_left"
+        android:textSize="10sp"
+        android:textColor="@color/c_666666"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignTop="@+id/iv_right"
+        android:layout_marginLeft="15dp"
+        android:layout_toRightOf="@+id/iv_right"
+        android:ellipsize="end"
+        android:maxLines="2"
+        android:textAllCaps="true"
+        android:letterSpacing="0.1"
+        android:fontFamily="@font/noto_sans_display_regular"/>
+
+    <TextView
+        android:id="@+id/tv_bottom"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/tv_left"
+        android:textSize="11sp"
+        android:textColor="@color/c_111111"
+        android:layout_marginTop="2dp"
+        android:layout_alignLeft="@id/tv_left"
+        android:singleLine="true"
+        android:maxLines="1"
+        android:ellipsize="end"
+        android:fontFamily="@font/noto_sans_display_semibold"/>
+
+
+    <View
+        android:id="@+id/view_line"
+        android:layout_width="match_parent"
+        android:layout_height="0.5dp"
+        android:layout_below="@id/tv_bottom"
+        android:layout_marginTop="12dp"
+        android:background="@color/line_color"/>
+
+</RelativeLayout>

+ 44 - 0
TMessagesProj/src/main/res/layout/layout_search_empty.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/ll_empty"
+    android:orientation="vertical"
+    android:gravity="center"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:visibility="gone"
+    android:layout_marginBottom="200dp"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <com.airbnb.lottie.LottieAnimationView
+        android:id="@+id/empty_view_anim"
+        android:layout_width="120dp"
+        android:layout_height="120dp"
+        app:layout_constraintBottom_toTopOf="@id/empty_view_title"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintVertical_chainStyle="packed"
+        app:lottie_autoPlay="true"
+        app:lottie_fileName="empty.json"
+        app:lottie_loop="false" />
+
+    <TextView
+        android:id="@+id/tv_empty"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textSize="18dp"
+        android:textColor="@color/c_111111"
+        android:fontFamily="@font/noto_sans_display_semibold"
+        android:layout_marginTop="15dp"/>
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Please check the spelling or try\n different words"
+        android:textSize="15dp"
+        android:textColor="@color/c_111111"
+        android:letterSpacing="0.05"
+        android:fontFamily="@font/noto_sans_display_regular"
+        android:layout_marginTop="10dp"
+        android:gravity="center"/>
+</LinearLayout>

BIN
TMessagesProj/src/main/res/mipmap-xhdpi/btn_square_blue.png


BIN
TMessagesProj/src/main/res/mipmap-xhdpi/btn_square_bor.png


BIN
TMessagesProj/src/main/res/mipmap-xhdpi/close_ico.png


BIN
TMessagesProj/src/main/res/mipmap-xhdpi/icon_cric1.png


BIN
TMessagesProj/src/main/res/mipmap-xhdpi/icon_cric2.png