ltt 1 рік тому
батько
коміт
78c81d3d18
66 змінених файлів з 2246 додано та 111 видалено
  1. 1 0
      TMessagesProj/build.gradle
  2. 9 7
      TMessagesProj/src/main/java/org/telegram/cricdit/adapter/MoreGroupAdapter.java
  3. 8 5
      TMessagesProj/src/main/java/org/telegram/cricdit/adapter/NewsAdapter.java
  4. 218 0
      TMessagesProj/src/main/java/org/telegram/cricdit/adapter/NewsBannerAdapter.java
  5. 250 0
      TMessagesProj/src/main/java/org/telegram/cricdit/adapter/RecommendGroupAdapter.java
  6. 3 2
      TMessagesProj/src/main/java/org/telegram/cricdit/base/BaseTabActivity.java
  7. 14 0
      TMessagesProj/src/main/java/org/telegram/cricdit/base/NewsRecommendBean.java
  8. 271 0
      TMessagesProj/src/main/java/org/telegram/cricdit/base/RecommendBannerBean.java
  9. 17 0
      TMessagesProj/src/main/java/org/telegram/cricdit/base/RecommendGroupBean.java
  10. 4 20
      TMessagesProj/src/main/java/org/telegram/cricdit/bean/MoreGroupBean.java
  11. 83 0
      TMessagesProj/src/main/java/org/telegram/cricdit/mvp/NewsPresenter.java
  12. 9 0
      TMessagesProj/src/main/java/org/telegram/cricdit/mvp/NewsView.java
  13. 3 0
      TMessagesProj/src/main/java/org/telegram/cricdit/net/ApiService.java
  14. 34 0
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/CopyrightActivity.java
  15. 394 0
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/HeadlinesFragment.java
  16. 2 2
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/MoreGroupFragment.java
  17. 154 0
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewNewsActivity.java
  18. 12 10
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsDetailCommentFragment.java
  19. 36 4
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsFragment.java
  20. 21 3
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsTagActivity.java
  21. 2 1
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/RankListActivity.java
  22. 4 1
      TMessagesProj/src/main/java/org/telegram/cricdit/utils/TimeUtils.java
  23. 3 2
      TMessagesProj/src/main/java/org/telegram/cricdit/view/BannerIndicatorView.java
  24. 6 0
      TMessagesProj/src/main/java/org/telegram/onecric/net/ApiStores.java
  25. 14 0
      TMessagesProj/src/main/java/org/telegram/onecric/utils/AnimUtil.java
  26. 8 0
      TMessagesProj/src/main/java/org/telegram/onecric/utils/GlideUtil.java
  27. 2 1
      TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java
  28. 2 1
      TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
  29. BIN
      TMessagesProj/src/main/res/drawable-mdpi/icon_fervent.png
  30. BIN
      TMessagesProj/src/main/res/drawable-xhdpi/icon_fervent.png
  31. BIN
      TMessagesProj/src/main/res/drawable-xxhdpi/icon_fervent.png
  32. BIN
      TMessagesProj/src/main/res/drawable-xxxhdpi/icon_fervent.png
  33. 6 0
      TMessagesProj/src/main/res/drawable/bg_gradient_bottom_tran_to_black.xml
  34. 57 0
      TMessagesProj/src/main/res/drawable/select_news_tab_bg.xml
  35. 6 0
      TMessagesProj/src/main/res/drawable/shape_bg_80black_rect.xml
  36. 12 0
      TMessagesProj/src/main/res/layout/activity_copyright.xml
  37. 2 2
      TMessagesProj/src/main/res/layout/activity_cricket_detail.xml
  38. 0 1
      TMessagesProj/src/main/res/layout/activity_match_new.xml
  39. 58 20
      TMessagesProj/src/main/res/layout/activity_news.xml
  40. 10 6
      TMessagesProj/src/main/res/layout/activity_news_detail_comment.xml
  41. 3 3
      TMessagesProj/src/main/res/layout/activity_ranking_list.xml
  42. 20 2
      TMessagesProj/src/main/res/layout/fragment_detail.xml
  43. 165 0
      TMessagesProj/src/main/res/layout/fragment_headlines.xml
  44. 0 1
      TMessagesProj/src/main/res/layout/fragment_more_group.xml
  45. 6 2
      TMessagesProj/src/main/res/layout/item_cricket_day.xml
  46. 240 0
      TMessagesProj/src/main/res/layout/item_headlines_banner.xml
  47. 4 6
      TMessagesProj/src/main/res/layout/item_news_short.xml
  48. 3 2
      TMessagesProj/src/main/res/layout/item_news_top.xml
  49. 2 2
      TMessagesProj/src/main/res/layout/item_rank_list_hot.xml
  50. 30 0
      TMessagesProj/src/main/res/layout/item_recommend_group.xml
  51. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/bg_recommend_1.png
  52. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/bg_recommend_2.png
  53. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/bg_recommend_3.png
  54. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/bg_recommend_4.png
  55. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/bg_recommend_5.png
  56. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/bg_recommend_tran.png
  57. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/icon_live_vs.png
  58. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/subscribe.png
  59. BIN
      TMessagesProj/src/main/res/mipmap-xhdpi/unsubscribe.png
  60. BIN
      TMessagesProj/src/main/res/mipmap-xxhdpi/icon_live_btn.png
  61. BIN
      TMessagesProj/src/main/res/mipmap-xxhdpi/icon_live_btn_play.png
  62. 1 1
      TMessagesProj/src/main/res/values/string-cricdit.xml
  63. 14 1
      TMessagesProj/src/main/res/values/strings.xml
  64. 1 1
      TMessagesProj/src/main/res/values/styles.xml
  65. 20 0
      TMessagesProj_App/bundleAfat/release/output-metadata.json
  66. 2 2
      gradle.properties

+ 1 - 0
TMessagesProj/build.gradle

@@ -150,6 +150,7 @@ android {
     dexOptions {
         jumboMode = true
         preDexLibraries = true
+        javaMaxHeapSize "4g"
     }
 
     compileOptions {

+ 9 - 7
TMessagesProj/src/main/java/org/telegram/cricdit/adapter/MoreGroupAdapter.java

@@ -18,24 +18,26 @@ import org.telegram.messenger.R;
 import java.util.ArrayList;
 import java.util.List;
 
-public class MoreGroupAdapter extends BaseQuickAdapter<MoreGroupBean.ListDTO, BaseViewHolder> {
+public class MoreGroupAdapter extends BaseQuickAdapter<MoreGroupBean.MoreGroupItem, BaseViewHolder> {
     private final List<String> tagList;
 
-    public MoreGroupAdapter(int layoutResId, @Nullable List<MoreGroupBean.ListDTO> data) {
+    public MoreGroupAdapter(int layoutResId, @Nullable List<MoreGroupBean.MoreGroupItem> data) {
         super(layoutResId, data);
         tagList = new ArrayList<>();
-//        tagList.add("Hot");
+        tagList.add("Hot");
     }
 
 
     @Override
-    protected void convert(@NonNull BaseViewHolder helper, MoreGroupBean.ListDTO item) {
+    protected void convert(@NonNull BaseViewHolder helper, MoreGroupBean.MoreGroupItem item) {
         ImageView avartarImg = helper.getView(R.id.more_group_item_avatar);
         TagTextView titleTv = helper.getView(R.id.more_group_item_title);
-
         titleTv.setTypeface(AndroidUtilities.getNormalTypefaceMedium());
-        titleTv.setContentAndTag(item.name, tagList);
-
+        if(item.is_top == 1){
+            titleTv.setContentAndTag(item.name, tagList);
+        }else{
+            titleTv.setContentAndTag(item.name, new ArrayList<>());
+        }
         helper.setText(R.id.more_group_item_type2, item.type.equals("0") ? "Group" : "Channel");
 
         Glide.with(mContext)

+ 8 - 5
TMessagesProj/src/main/java/org/telegram/cricdit/adapter/NewsAdapter.java

@@ -154,7 +154,10 @@ public class NewsAdapter extends RecyclerView.Adapter {
     }
 
     private void onBindTop(NewsBean.NewsFeedBean bean, NewsAdapter.TopViewHolder mHolder, int position) {
-        mHolder.tvTime.setText(TimeUtils.timeFromNow(mContext, Long.parseLong(bean.getPublishTime() + "000")));
+        if(bean == null){
+            return;
+        }
+        mHolder.tvTime.setText(bean.getPublishTime() == null?"":(TimeUtils.timeFromNow(mContext, Long.parseLong(bean.getPublishTime() + "000"))));
         mHolder.flowLayout.setVisibility(View.GONE);
         if(bean.getTags().equals("Reddit") || bean.getTags().equals("Twitter")){
             mHolder.tvUserName.setText(bean.getTags());
@@ -166,8 +169,8 @@ public class NewsAdapter extends RecyclerView.Adapter {
                 fragment.getParentActivity().startActivity(intent);
             });
         }else{
-            String nickname = StringUtils.nameJudge(bean.getFirst_name(), bean.getLast_name());
-            mHolder.tvUserName.setText(!TextUtils.isEmpty(nickname) ? nickname : TextUtils.isEmpty(bean.getUserName()) ? "" : bean.getUserName());
+//            String nickname = StringUtils.nameJudge(bean.getFirst_name(), bean.getLast_name());
+//            mHolder.tvUserName.setText(!TextUtils.isEmpty(nickname) ? nickname : TextUtils.isEmpty(bean.getUserName()) ? "" : bean.getUserName());
             String tags = bean.getTags();
             if (!TextUtils.isEmpty(tags)) {
                 mHolder.flowLayout.setVisibility(View.VISIBLE);
@@ -516,8 +519,8 @@ public class NewsAdapter extends RecyclerView.Adapter {
                 fragment.getParentActivity().startActivity(intent);
             });
         }else{
-            String nickname = StringUtils.nameJudge(bean.getFirst_name(), bean.getLast_name());
-            mHolder.tvUserName.setText(!TextUtils.isEmpty(nickname) ? nickname : TextUtils.isEmpty(bean.getUserName()) ? "" : bean.getUserName());
+//            String nickname = StringUtils.nameJudge(bean.getFirst_name(), bean.getLast_name());
+//            mHolder.tvUserName.setText(!TextUtils.isEmpty(nickname) ? nickname : TextUtils.isEmpty(bean.getUserName()) ? "" : bean.getUserName());
         }
         //评论数>=百万以百万为单位
         mHolder.tvMsgNum.setVisibility(bean.getCommentNum() > 0 ? View.VISIBLE : View.GONE);

+ 218 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/adapter/NewsBannerAdapter.java

@@ -0,0 +1,218 @@
+package org.telegram.cricdit.adapter;
+
+import static org.telegram.cricdit.utils.TimeUtils.getStringToDate;
+import static kotlin.random.RandomKt.Random;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.CountDownTimer;
+import android.text.Html;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.youth.banner.adapter.BannerAdapter;
+
+import org.telegram.cricdit.base.IView;
+import org.telegram.cricdit.base.NewsRecommendBean;
+import org.telegram.cricdit.base.RecommendBannerBean;
+import org.telegram.cricdit.mvp.NewsPresenter;
+import org.telegram.cricdit.ui.HeadlinesFragment;
+import org.telegram.cricdit.utils.TimeUtils;
+import org.telegram.cricdit.utils.ToastUtil;
+import org.telegram.messenger.R;
+import org.telegram.onecric.mvp.CricketNewBean;
+import org.telegram.onecric.mvp.bean.CricketMatchBean;
+import org.telegram.onecric.mvp.bean.SubscribeTypeBean;
+import org.telegram.onecric.mvp.presenter.SubscribePresenter;
+import org.telegram.onecric.net.ApiCallback;
+import org.telegram.onecric.ui.activity.CricketDetailActivity;
+import org.telegram.onecric.utils.DialogUtil;
+import org.telegram.onecric.utils.GlideUtil;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Random;
+
+public class NewsBannerAdapter extends BannerAdapter<RecommendBannerBean, NewsBannerAdapter.BannerViewHolder> {
+    private Context context;
+    private int[] coverIds = new int[]{R.mipmap.bg_recommend_1,R.mipmap.bg_recommend_2,R.mipmap.bg_recommend_3,R.mipmap.bg_recommend_4,R.mipmap.bg_recommend_5};
+    public NewsBannerAdapter(Context context, List<RecommendBannerBean> datas) {
+        super(datas);
+        this.context = context;
+    }
+
+    @Override
+    public BannerViewHolder onCreateHolder(ViewGroup parent, int viewType) {
+        View view = LayoutInflater.from(context).inflate(R.layout.item_headlines_banner,parent,false);
+        view.setLayoutParams(new ViewGroup.LayoutParams(
+                ViewGroup.LayoutParams.MATCH_PARENT,
+                ViewGroup.LayoutParams.MATCH_PARENT));
+        return new BannerViewHolder(view);
+    }
+
+    @Override
+    public void onBindView(BannerViewHolder holder, RecommendBannerBean data, int position, int size) {
+        holder.iv_cover.setImageResource(coverIds[position%5]);
+        holder.tv_title.setText(data.getTname());
+        holder.tv_result.setText(data.getMatchResult());
+        holder.tv_home_name.setText(data.getHomeName());
+        holder.tv_away_name.setText(data.getAwayName());
+        GlideUtil.loadTeamImageDefault(context,data.getHomeLogo(),holder.iv_home_logo);
+        GlideUtil.loadTeamImageDefault(context,data.getHomeLogo(),holder.iv_home_logo2);
+        GlideUtil.loadTeamImageDefault(context,data.getAwayLogo(),holder.iv_away_logo);
+        GlideUtil.loadTeamImageDefault(context,data.getAwayLogo(),holder.iv_away_logo2);
+
+        if(data.getAwayDisplayScore().contains("0/0")){
+            holder.tv_away_score.setText("Yet To Bat");
+        }else{
+            holder.tv_away_score.setText(data.getAwayDisplayScore());
+        }
+        if(data.getHomeDisplayScore().contains("0/0")){
+            holder.tv_home_score.setText("Yet To Bat");
+        }else{
+            holder.tv_home_score.setText(data.getAwayDisplayScore());
+        }
+        if(data.getStatus() == 0){
+            holder.iv_watch_live.setImageResource(R.mipmap.icon_live_btn);
+            holder.iv_watch_live.setVisibility(View.VISIBLE);
+            holder.tv_time.setVisibility(View.GONE);
+            holder.iv_subscribe.setVisibility(View.VISIBLE);
+            if (data.getIsSubscribe() == 1) {
+                holder.iv_subscribe.setImageResource(R.mipmap.subscribe);
+            } else {
+                holder.iv_subscribe.setImageResource(R.mipmap.unsubscribe);
+            }
+
+            holder.iv_subscribe.setOnClickListener(v->{
+                getSubscribeType(data, holder.iv_subscribe);
+            });
+
+            //倒计时
+/*            long time = getStringToDate(data.getScheduled(), "yyyy-MM-dd HH:mm:ss");
+            long countTime = time - new Date().getTime();
+            if (data.getFastStatus() == 1 && countTime > 0) {
+                //开始倒计时
+                new CountDownTimer(countTime, 1000) {
+                    public void onTick(long millisUntilFinished) {
+                        if(position+1 == holder.getPosition()){
+                            holder.tv_time.setText(TimeUtils.timeConversion(millisUntilFinished / 1000));
+                        }
+                    }
+
+                    public void onFinish() {
+                        data.setStatus(1);
+                        notifyItemChanged(holder.getLayoutPosition());
+                    }
+                }.start();
+            }*/
+        }else if(data.getStatus() == 1){
+            holder.iv_subscribe.setVisibility(View.GONE);
+            holder.iv_watch_live.setVisibility(View.VISIBLE);
+            holder.tv_time.setVisibility(View.VISIBLE);
+            holder.iv_watch_live.setImageResource(R.mipmap.icon_live_btn_play);
+            holder.tv_time.setText(context.getString(R.string.live2));
+        }else{
+            holder.iv_watch_live.setVisibility(View.GONE);
+            holder.tv_time.setVisibility(View.GONE);
+            holder.iv_subscribe.setVisibility(View.GONE);
+        }
+
+    }
+
+    class BannerViewHolder extends RecyclerView.ViewHolder{
+        public ImageView iv_cover,iv_subscribe,iv_home_logo,iv_home_logo2,iv_away_logo,iv_away_logo2,iv_watch_live;
+        public TextView tv_time,tv_title,tv_result,tv_home_name,tv_home_score,tv_away_name,tv_away_score;
+        public BannerViewHolder(@NonNull View itemView) {
+            super(itemView);
+            iv_cover = itemView.findViewById(R.id.iv_cover);
+            tv_time = itemView.findViewById(R.id.tv_time);
+            tv_title = itemView.findViewById(R.id.tv_title);
+            tv_result = itemView.findViewById(R.id.tv_result);
+            tv_home_name = itemView.findViewById(R.id.tv_home_name);
+            tv_home_score = itemView.findViewById(R.id.tv_home_score);
+            tv_away_name = itemView.findViewById(R.id.tv_away_name);
+            tv_away_score = itemView.findViewById(R.id.tv_away_score);
+            iv_subscribe = itemView.findViewById(R.id.iv_subscribe);
+            iv_home_logo2 = itemView.findViewById(R.id.iv_home_logo2);
+            iv_home_logo = itemView.findViewById(R.id.iv_home_logo);
+            iv_away_logo = itemView.findViewById(R.id.iv_away_logo);
+            iv_away_logo2 = itemView.findViewById(R.id.iv_away_logo2);
+            iv_watch_live = itemView.findViewById(R.id.iv_watch_live);
+        }
+    }
+
+    private void getSubscribeType(RecommendBannerBean item, ImageView subscribeIv) {//订阅推送消息
+        subscribeIv.setEnabled(false);
+        new SubscribePresenter().getSubscribeType(item.getId(), new ApiCallback() {
+            @Override
+            public void onSuccess(String data, String msg) {
+                subscribeIv.setEnabled(true);
+                if (data != null) {
+                    List<SubscribeTypeBean> list = JSONObject.parseArray(JSONObject.parseObject(data).getString("list"), SubscribeTypeBean.class);
+                    //这里先弹出一个订阅消息的内容选择框  待选择好后点击确定订阅按钮再调用订阅接口
+                    DialogUtil.showSelectSubscribeDialog(context, item.getHomeName() + " VS " + item.getAwayName(), list, new DialogUtil.SelectSubscribeBack() {
+                        @Override
+                        public void onSelectSubscribe(String type) {
+                            doSubscribe(item.getId() + "", type, subscribeIv);
+                        }
+                    });
+                }
+            }
+
+            @Override
+            public void onFailure(String msg) {
+                subscribeIv.setEnabled(true);
+            }
+
+            @Override
+            public void onError(String msg) {
+                subscribeIv.setEnabled(true);
+            }
+
+            @Override
+            public void onFinish() {
+
+            }
+        });
+    }
+
+    private void doSubscribe(String matchId, String type, ImageView subscribeIv) {//订阅推送消息
+        new SubscribePresenter().doSubscribe(matchId, type, new ApiCallback() {
+            @Override
+            public void onSuccess(String data, String msg) {
+                if (!TextUtils.isEmpty(type)) {
+                    subscribeIv.setImageResource(R.mipmap.subscribe);
+                    ToastUtil.show(context,R.string.notice_turned_on);
+                } else {
+                    subscribeIv.setImageResource(R.mipmap.unsubscribe);
+                    ToastUtil.show(context,R.string.notice_turned_off);
+                }
+            }
+
+            @Override
+            public void onFailure(String msg) {
+                ToastUtil.show(context, msg);
+            }
+
+            @Override
+            public void onError(String msg) {
+                ToastUtil.show(context, msg);
+            }
+
+            @Override
+            public void onFinish() {
+
+            }
+        });
+    }
+
+
+}

+ 250 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/adapter/RecommendGroupAdapter.java

@@ -0,0 +1,250 @@
+package org.telegram.cricdit.adapter;
+
+import android.graphics.Bitmap;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.widget.ImageView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.resource.bitmap.CircleCrop;
+import com.bumptech.glide.request.RequestOptions;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import org.telegram.cricdit.base.RecommendGroupBean;
+import org.telegram.cricdit.bean.MoreGroupBean;
+import org.telegram.cricdit.net.ApiService;
+import org.telegram.cricdit.net.Parameter;
+import org.telegram.cricdit.net.RetrofitClient;
+import org.telegram.cricdit.utils.Base64Utils;
+import org.telegram.cricdit.utils.ToastUtil;
+import org.telegram.messenger.AndroidUtilities;
+import org.telegram.messenger.ApplicationLoader;
+import org.telegram.messenger.ChatObject;
+import org.telegram.messenger.LocaleController;
+import org.telegram.messenger.MessagesController;
+import org.telegram.messenger.MessagesStorage;
+import org.telegram.messenger.R;
+import org.telegram.messenger.UserConfig;
+import org.telegram.onecric.utils.GlideUtil;
+import org.telegram.tgnet.ConnectionsManager;
+import org.telegram.tgnet.TLObject;
+import org.telegram.tgnet.TLRPC;
+import org.telegram.ui.ActionBar.AlertDialog;
+import org.telegram.ui.ActionBar.BaseFragment;
+import org.telegram.ui.ChatActivity;
+import org.telegram.ui.Components.AvatarDrawable;
+import org.telegram.ui.Components.BackupImageView;
+import org.telegram.ui.Components.JoinGroupAlert;
+import org.telegram.ui.LoginActivity;
+
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+
+import okhttp3.ResponseBody;
+import retrofit2.Call;
+import retrofit2.Callback;
+import retrofit2.Response;
+
+public class RecommendGroupAdapter extends BaseQuickAdapter<MoreGroupBean.MoreGroupItem, BaseViewHolder> {
+    private BaseFragment fragment;
+    private final AlertDialog alertDialog;
+    
+    public RecommendGroupAdapter(int layoutResId, BaseFragment fragment, @Nullable List<MoreGroupBean.MoreGroupItem> data) {
+        super(layoutResId, data);
+        this.fragment = fragment;
+        alertDialog = new AlertDialog(fragment.getParentActivity(), 3);
+    }
+
+    @Override
+    protected void convert(@NonNull BaseViewHolder helper, MoreGroupBean.MoreGroupItem item) {
+        helper.setText(R.id.tv_name,item.name);
+        if (TextUtils.isEmpty(item.face_url)) {
+            GlideUtil.loadGroupDefault(mContext,"",helper.getView(R.id.iv_head));
+        } else {
+            try {
+                Glide.with(helper.itemView)
+                        .load(Base64Utils.base64ToBitmap(item.face_url))
+                        .placeholder(R.drawable.book_group)
+                        .error(R.drawable.book_group)
+                        .apply(RequestOptions.bitmapTransform(new CircleCrop()))
+                        .into((ImageView) helper.getView(R.id.iv_head));
+            } catch (Exception e) {
+
+            }
+        }
+
+        helper.itemView.setOnClickListener(v -> {
+            if (UserConfig.getInstance(fragment.getCurrentAccount()).isClientActivated()) {
+                //跳转到对应群组聊天页
+                long chatID = Long.parseLong(item.group_id);
+                ConcurrentHashMap<Long, TLRPC.Chat> chats = fragment.getMessagesController().getChats();
+                TLRPC.Chat chat = chats.get(chatID);
+                if (chat != null) {
+                    Bundle bundle = new Bundle();
+                    bundle.putLong("chat_id", chatID);
+                    fragment.presentFragment(new ChatActivity(bundle));
+                    syncitemToCricdit(chat);
+                } else {
+                    if (alertDialog != null) {
+                        alertDialog.show();
+                    }
+                    if (!TextUtils.isEmpty(item.private_link)) {
+                        newSkipUrl(item.private_link);
+                    } else {
+                        if (!TextUtils.isEmpty(item.public_link)) {
+                            if (item.public_link.startsWith("https://t.me/")) {
+                                newSkipUrl(item.public_link);
+                            } else {
+                                newSkipUrl("https://t.me/" + item.public_link);
+                            }
+                        } else {
+                            if (alertDialog != null) {
+                                alertDialog.dismiss();
+                            }
+                            ToastUtil.show(fragment.getParentActivity(), LocaleController.getString(R.string.CdExpiredGroup));
+                        }
+                    }
+                }
+            } else {
+                fragment.presentFragment(new LoginActivity());
+            }
+        });
+        
+    }
+
+    public void newSkipUrl(String finalWorkingText) {
+        if (finalWorkingText.contains("https://t.me/")) {
+            int index = finalWorkingText.indexOf("https://t.me/");
+            int end = finalWorkingText.indexOf(" ", index);
+            String gName;
+            String group = "";
+            if (end != -1) {
+                gName = finalWorkingText.substring(index + "https://t.me/".length(), end);
+            } else {
+                gName = finalWorkingText.substring(index + "https://t.me/".length());
+            }
+            if (gName.startsWith("+")) {
+                group = gName.replace("+", "");
+                if (AndroidUtilities.isNumeric(group)) {
+                    gName = group;
+                    group = null;
+                }
+            }
+            if (TextUtils.isEmpty(group)) {
+                if (gName != null) {
+                    TLObject req;
+                    if (AndroidUtilities.isNumeric(gName)) {
+                        TLRPC.TL_contacts_resolvePhone resolvePhone = new TLRPC.TL_contacts_resolvePhone();
+                        resolvePhone.phone = gName;
+                        req = resolvePhone;
+                    } else {
+                        TLRPC.TL_contacts_resolveUsername resolveUsername = new TLRPC.TL_contacts_resolveUsername();
+                        resolveUsername.username = gName;
+                        req = resolveUsername;
+                    }
+
+                    ConnectionsManager.getInstance(0).sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
+                        if (alertDialog != null) {
+                            alertDialog.dismiss();
+                        }
+                        TLRPC.TL_contacts_resolvedPeer res = (TLRPC.TL_contacts_resolvedPeer) response;
+                        if (error == null && res != null && res.users != null) {
+                            MessagesController.getInstance(0).putUsers(res.users, false);
+                            MessagesController.getInstance(0).putChats(res.chats, false);
+                            MessagesStorage.getInstance(0).putUsersAndChats(res.users, res.chats, false, true);
+                            Bundle args = new Bundle();
+                            if (!res.chats.isEmpty()) {
+                                args.putLong("chat_id", res.chats.get(0).id);
+                            } else {
+                                args.putLong("user_id", res.users.get(0).id);
+                            }
+                            fragment.presentFragment(new ChatActivity(args));
+                            syncitemToCricdit(res.chats.get(0));
+
+                        } else {
+                            ToastUtil.show(fragment.getParentActivity(), LocaleController.getString("ExpiredLink", R.string.ExpiredLink));
+                        }
+                    }));
+                }
+            } else {
+                final TLRPC.TL_messages_checkChatInvite req = new TLRPC.TL_messages_checkChatInvite();
+                req.hash = group;
+                String finalGroup = group;
+                ConnectionsManager.getInstance(0).sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
+                    if (alertDialog != null) {
+                        alertDialog.dismiss();
+                    }
+                    if (error == null) {
+                        TLRPC.ChatInvite invite = (TLRPC.ChatInvite) response;
+                        if (invite.chat != null && (!ChatObject.isLeftFromChat(invite.chat) || !invite.chat.kicked && (!TextUtils.isEmpty(invite.chat.username) || invite instanceof TLRPC.TL_chatInvitePeek || invite.chat.has_geo))) {
+                            MessagesController.getInstance(0).putChat(invite.chat, false);
+                            ArrayList<TLRPC.Chat> chats = new ArrayList<>();
+                            chats.add(invite.chat);
+                            MessagesStorage.getInstance(0).putUsersAndChats(null, chats, false, true);
+                            Bundle args = new Bundle();
+                            args.putLong("chat_id", invite.chat.id);
+                            fragment.presentFragment(new ChatActivity(args));
+                            syncitemToCricdit(invite.chat);
+                        } else {
+                            if (fragment != null) {
+                                fragment.showDialog(new JoinGroupAlert(fragment.getParentActivity(), invite, finalGroup, fragment, (fragment instanceof ChatActivity ? ((ChatActivity) fragment).themeDelegate : null)));
+                            }
+                        }
+                    } else {
+                        if (fragment != null && fragment.getParentActivity() != null) {
+                            ToastUtil.show(fragment.getParentActivity(), LocaleController.getString("ExpiredLink", R.string.ExpiredLink));
+                        }
+                    }
+                }));
+            }
+        }
+    }
+
+    //TODO 同步群组资料至Cricdit数据库
+    public void syncitemToCricdit(TLRPC.Chat chat) {
+
+        AndroidUtilities.runOnUIThread(() -> {
+            if (chat == null) {
+                return;
+            }
+            TLRPC.User currentUser = UserConfig.getInstance(0).getCurrentUser();
+            Parameter parameter = new Parameter();
+            parameter.add("group_id", chat.id + "");
+            parameter.add("name", chat.title + "");
+            parameter.add("creator_user_id", currentUser.id + "");
+
+            if (chat.photo != null && chat.photo.stripped_thumb != null) {
+                BackupImageView backupImageView = new BackupImageView(ApplicationLoader.applicationContext);
+                backupImageView.setForUserOrChat(chat, new AvatarDrawable(chat));
+                Bitmap bitmap = backupImageView.getImageReceiver().getBitmap();
+
+                ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+                //该方法用来压缩图片,第一个参数为图片格式,第二个参数为截取图片的保留率,如当前为90,则保留之前图片90%的区域
+                bitmap.compress(Bitmap.CompressFormat.JPEG, 90, outputStream);
+                byte[] imagebyte = outputStream.toByteArray();
+                String toBase64 = Base64Utils.toBase64(imagebyte);
+                parameter.add("face_url", toBase64);
+            }
+
+            ApiService apiService = RetrofitClient.getInstance().getRetrofit().create(ApiService.class);
+            Call<ResponseBody> responseCall = apiService.createGroup(parameter.buildJsonBody());
+            responseCall.enqueue(new Callback<ResponseBody>() {
+                @Override
+                public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
+                }
+
+                @Override
+                public void onFailure(Call<ResponseBody> call, Throwable t) {
+                }
+            });
+        }, 1000);
+
+    }
+
+
+}

+ 3 - 2
TMessagesProj/src/main/java/org/telegram/cricdit/base/BaseTabActivity.java

@@ -13,6 +13,7 @@ import android.widget.TextView;
 import androidx.constraintlayout.widget.ConstraintLayout;
 import androidx.core.graphics.ColorUtils;
 
+import org.telegram.cricdit.ui.NewNewsActivity;
 import org.telegram.cricdit.ui.NewsActivity;
 import org.telegram.cricdit.ui.MeActivity;
 import org.telegram.cricdit.ui.RankListActivity;
@@ -146,8 +147,8 @@ public abstract class BaseTabActivity<P extends IPresenter> extends BaseFragment
                 if (getParentLayout() == null || getParentLayout().getLastFragment() == null) {
                     return;
                 }
-                if (!(getParentLayout().getLastFragment() instanceof NewsActivity)) {
-                    presentFragment(new NewsActivity(), true, 0);
+                if (!(getParentLayout().getLastFragment() instanceof NewNewsActivity)) {
+                    presentFragment(new NewNewsActivity(), true, 0);
                 }
             }
         });

+ 14 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/base/NewsRecommendBean.java

@@ -0,0 +1,14 @@
+package org.telegram.cricdit.base;
+
+import java.util.List;
+
+public class NewsRecommendBean {
+    public List<BannerBean> banners;
+    public List<GroupBean> groups;
+    public static class BannerBean{
+
+    }
+    public static class GroupBean{
+
+    }
+}

+ 271 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/base/RecommendBannerBean.java

@@ -0,0 +1,271 @@
+package org.telegram.cricdit.base;
+
+import android.os.CountDownTimer;
+import android.widget.TextView;
+
+public class RecommendBannerBean {
+    private String awayName;
+    private Integer fastStatus;
+    private String homeDisplayScore;
+    private String scheduled;
+    private Integer channel;
+    private String tournamentId;
+    private String matchResultType;
+    private Integer matchLive;
+    private Integer awayId;
+    private String matchNum;
+    private String awayDisplayScore;
+    private String homeName;
+    private String matchResult;
+    private Integer homeId;
+    private Integer id;
+    private String liveStatus;
+    private Integer islive;
+    private String awayLogo;
+    private String liveTime;
+    private String tname;
+    private String todaystart;
+    private String matchStatus;
+    private Integer liveId;
+    private String homeLogo;
+    private String ttype;
+    private String liveUid;
+    private Integer liveTimeUnix;
+    private Integer isSubscribe;
+    private Integer status;
+    public CountDownTimer timer;
+
+
+
+    public String getAwayName() {
+        return awayName;
+    }
+
+    public void setAwayName(String awayName) {
+        this.awayName = awayName;
+    }
+
+    public Integer getFastStatus() {
+        return fastStatus;
+    }
+
+    public void setFastStatus(Integer fastStatus) {
+        this.fastStatus = fastStatus;
+    }
+
+    public String getHomeDisplayScore() {
+        return homeDisplayScore;
+    }
+
+    public void setHomeDisplayScore(String homeDisplayScore) {
+        this.homeDisplayScore = homeDisplayScore;
+    }
+
+    public String getScheduled() {
+        return scheduled;
+    }
+
+    public void setScheduled(String scheduled) {
+        this.scheduled = scheduled;
+    }
+
+    public Integer getChannel() {
+        return channel;
+    }
+
+    public void setChannel(Integer channel) {
+        this.channel = channel;
+    }
+
+    public String getTournamentId() {
+        return tournamentId;
+    }
+
+    public void setTournamentId(String tournamentId) {
+        this.tournamentId = tournamentId;
+    }
+
+    public String getMatchResultType() {
+        return matchResultType;
+    }
+
+    public void setMatchResultType(String matchResultType) {
+        this.matchResultType = matchResultType;
+    }
+
+    public Integer getMatchLive() {
+        return matchLive;
+    }
+
+    public void setMatchLive(Integer matchLive) {
+        this.matchLive = matchLive;
+    }
+
+    public Integer getAwayId() {
+        return awayId;
+    }
+
+    public void setAwayId(Integer awayId) {
+        this.awayId = awayId;
+    }
+
+    public String getMatchNum() {
+        return matchNum;
+    }
+
+    public void setMatchNum(String matchNum) {
+        this.matchNum = matchNum;
+    }
+
+    public String getAwayDisplayScore() {
+        return awayDisplayScore;
+    }
+
+    public void setAwayDisplayScore(String awayDisplayScore) {
+        this.awayDisplayScore = awayDisplayScore;
+    }
+
+    public String getHomeName() {
+        return homeName;
+    }
+
+    public void setHomeName(String homeName) {
+        this.homeName = homeName;
+    }
+
+    public String getMatchResult() {
+        return matchResult;
+    }
+
+    public void setMatchResult(String matchResult) {
+        this.matchResult = matchResult;
+    }
+
+    public Integer getHomeId() {
+        return homeId;
+    }
+
+    public void setHomeId(Integer homeId) {
+        this.homeId = homeId;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getLiveStatus() {
+        return liveStatus;
+    }
+
+    public void setLiveStatus(String liveStatus) {
+        this.liveStatus = liveStatus;
+    }
+
+    public Integer getIslive() {
+        return islive;
+    }
+
+    public void setIslive(Integer islive) {
+        this.islive = islive;
+    }
+
+    public String getAwayLogo() {
+        return awayLogo;
+    }
+
+    public void setAwayLogo(String awayLogo) {
+        this.awayLogo = awayLogo;
+    }
+
+    public String getLiveTime() {
+        return liveTime;
+    }
+
+    public void setLiveTime(String liveTime) {
+        this.liveTime = liveTime;
+    }
+
+    public String getTname() {
+        return tname;
+    }
+
+    public void setTname(String tname) {
+        this.tname = tname;
+    }
+
+    public String getTodaystart() {
+        return todaystart;
+    }
+
+    public void setTodaystart(String todaystart) {
+        this.todaystart = todaystart;
+    }
+
+    public String getMatchStatus() {
+        return matchStatus;
+    }
+
+    public void setMatchStatus(String matchStatus) {
+        this.matchStatus = matchStatus;
+    }
+
+    public Integer getLiveId() {
+        return liveId;
+    }
+
+    public void setLiveId(Integer liveId) {
+        this.liveId = liveId;
+    }
+
+    public String getHomeLogo() {
+        return homeLogo;
+    }
+
+    public void setHomeLogo(String homeLogo) {
+        this.homeLogo = homeLogo;
+    }
+
+    public String getTtype() {
+        return ttype;
+    }
+
+    public void setTtype(String ttype) {
+        this.ttype = ttype;
+    }
+
+    public String getLiveUid() {
+        return liveUid;
+    }
+
+    public void setLiveUid(String liveUid) {
+        this.liveUid = liveUid;
+    }
+
+    public Integer getLiveTimeUnix() {
+        return liveTimeUnix;
+    }
+
+    public void setLiveTimeUnix(Integer liveTimeUnix) {
+        this.liveTimeUnix = liveTimeUnix;
+    }
+
+    public Integer getIsSubscribe() {
+        return isSubscribe;
+    }
+
+    public void setIsSubscribe(Integer isSubscribe) {
+        this.isSubscribe = isSubscribe;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+}

+ 17 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/base/RecommendGroupBean.java

@@ -0,0 +1,17 @@
+package org.telegram.cricdit.base;
+
+public class RecommendGroupBean {
+    public String group_id;
+    public String group_image;
+//    public int group_members;
+    public String group_name;
+//    public String last_user_name;
+//    public long last_time;
+//    public int group_num;
+//    public float group_credit;
+//    public String last_sms;
+    public String public_link;
+    public String private_link;
+
+
+}

+ 4 - 20
TMessagesProj/src/main/java/org/telegram/cricdit/bean/MoreGroupBean.java

@@ -6,11 +6,11 @@ import java.util.List;
 
 public class MoreGroupBean {
         public Integer limit;
-        public List<ListDTO> list;
+        public List<MoreGroupItem> list;
         public Integer start;
         public Integer total;
 
-        public static class ListDTO {
+        public static class MoreGroupItem {
             public String group_id;
             public String name;
             public String face_url;
@@ -19,23 +19,7 @@ public class MoreGroupBean {
             public String private_link;
             public String public_link;
             public String type;
-    }
-//        public Integer limit;
-//        public List<ListDTO> list;
-//        public Integer start;
-//        public Integer total;
-//
-//        public static class ListDTO {
-//            public String groupId;
-//            public String name;
-//            public String faceUrl;
-//            public Integer groupNum;
-//            public String introduction;
-//            public String privateLink;
-//            public String publicLink;
-//            public Integer limit;
-//            public Integer start;
-//        }
-
+            public int is_top;
+        }
 
 }

+ 83 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/mvp/NewsPresenter.java

@@ -1,20 +1,45 @@
 package org.telegram.cricdit.mvp;
 
+import android.annotation.SuppressLint;
 import android.text.TextUtils;
+import android.widget.ImageView;
+
+import com.alibaba.fastjson.JSONObject;
 
 import org.telegram.cricdit.base.BaseObserver;
 import org.telegram.cricdit.base.BasePresenter;
 import org.telegram.cricdit.base.IPresenter;
 import org.telegram.cricdit.base.IView;
+import org.telegram.cricdit.base.RecommendBannerBean;
+import org.telegram.cricdit.base.RecommendGroupBean;
+import org.telegram.cricdit.bean.MoreGroupBean;
 import org.telegram.cricdit.bean.NewsBean;
 import org.telegram.cricdit.bean.RankListBean;
 import org.telegram.cricdit.net.ApiService;
 import org.telegram.cricdit.net.Parameter;
 import org.telegram.cricdit.utils.ParamsUtil;
+import org.telegram.cricdit.utils.ToastUtil;
 import org.telegram.messenger.UserConfig;
+import org.telegram.onecric.mvp.CricketAllBean;
+import org.telegram.onecric.mvp.CricketFiltrateBean;
+import org.telegram.onecric.mvp.CricketNewBean;
+import org.telegram.onecric.mvp.bean.CricketLiveBean;
+import org.telegram.onecric.mvp.bean.CricketMatchBean;
+import org.telegram.onecric.mvp.bean.MatchSearchBean;
+import org.telegram.onecric.mvp.bean.SubscribeTypeBean;
+import org.telegram.onecric.mvp.presenter.SubscribePresenter;
+import org.telegram.onecric.net.ApiCallback;
+import org.telegram.onecric.net.ApiClient;
+import org.telegram.onecric.net.ApiStores;
+import org.telegram.onecric.ui.activity.CricketDetailActivity;
+import org.telegram.onecric.utils.DialogUtil;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.TimeZone;
+
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
 
 
 public class NewsPresenter extends BasePresenter<NewsView> {
@@ -147,4 +172,62 @@ public class NewsPresenter extends BasePresenter<NewsView> {
         });
     }
 
+    @SuppressLint("CheckResult")
+    public void getRecommendBanner(){
+        ApiClient.retrofit().create(ApiStores.class)
+                .getNewsBanner(TimeZone.getDefault().getID())
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribeWith(new ApiCallback() {
+                    @Override
+                    public void onSuccess(String data, String msg) {
+                        try{
+                            List<RecommendBannerBean> list = JSONObject.parseArray(data, RecommendBannerBean.class);
+                            getView().showRecommendBanner(list);
+                        }catch (Exception e){
+                            getView().showRecommendBanner(null);
+                        }
+                    }
+
+                    @Override
+                    public void onFailure(String msg) {
+                        getView().showRecommendBanner(null);
+                    }
+
+                    @Override
+                    public void onError(String msg) {
+                        getView().showRecommendBanner(null);
+                    }
+
+                    @Override
+                    public void onFinish() {
+
+                    }
+                });
+
+    }
+
+    public void getRecommendGroup(){
+        Parameter parameter = new Parameter();
+        addSubscribe(create(ApiService.class).getTopGroup(parameter.buildJsonBody()), new BaseObserver<MoreGroupBean>() {
+            @Override
+            protected void onSuccess(MoreGroupBean data) {
+                if (data != null && getView() != null) {
+                    getView().showRecommendGroup(data.list);
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                if (getView() != null) {
+                    getView().showError(e);
+                }
+                super.onError(e);
+            }
+        });
+
+    }
+
+
+
 }

+ 9 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/mvp/NewsView.java

@@ -1,11 +1,20 @@
 package org.telegram.cricdit.mvp;
 
 import org.telegram.cricdit.base.IView;
+import org.telegram.cricdit.base.NewsRecommendBean;
+import org.telegram.cricdit.base.RecommendBannerBean;
+import org.telegram.cricdit.base.RecommendGroupBean;
+import org.telegram.cricdit.bean.MoreGroupBean;
 import org.telegram.cricdit.bean.NewsBean;
+import org.telegram.onecric.mvp.CricketNewBean;
+
+import java.util.List;
 
 public interface NewsView extends IView {
     void showList(NewsBean mList);
     void showError(Throwable e);
     void setCacheList(NewsBean bean,int topNum);
     void showCacheList(Throwable e);
+    void showRecommendBanner(List<RecommendBannerBean> bean);
+    void showRecommendGroup(List<MoreGroupBean.MoreGroupItem> bean);
 }

+ 3 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/net/ApiService.java

@@ -188,4 +188,7 @@ public interface ApiService {
     @POST("https://pf.cricdit.com/index.php/api/Rank/GetCategories")
     Call<ResponseBody> publicRanking(@Body RequestBody requestBody);
 
+    //置顶的群
+    @POST(Constants.APP_AUTH_URL + "/demo/top_group")
+    Observable<BaseResponse<MoreGroupBean>> getTopGroup(@Body RequestBody requestBody);
 }

+ 34 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/ui/CopyrightActivity.java

@@ -0,0 +1,34 @@
+package org.telegram.cricdit.ui;
+import android.text.method.ScrollingMovementMethod;
+import android.view.View;
+import android.widget.TextView;
+
+import org.telegram.cricdit.base.BaseActivity;
+import org.telegram.cricdit.mvp.NewsPresenter;
+import org.telegram.messenger.LocaleController;
+import org.telegram.messenger.R;
+
+public class CopyrightActivity extends BaseActivity{
+    TextView tv_main;
+    @Override
+    protected void initView(View view) {
+        tv_main = view.findViewById(R.id.tv_main);
+        tv_main.setMovementMethod(ScrollingMovementMethod.getInstance());
+    }
+
+    @Override
+    protected int getLayoutResId() {
+        return R.layout.activity_copyright;
+    }
+
+    @Override
+    public String setActionBarTitle() {
+        return LocaleController.getString("CopyrightDeclaration", R.string.copyright_declaration2);
+    }
+
+    @Override
+    protected NewsPresenter createPresenter() {
+        return new NewsPresenter();
+    }
+
+}

+ 394 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/ui/HeadlinesFragment.java

@@ -0,0 +1,394 @@
+package org.telegram.cricdit.ui;
+
+
+import static org.telegram.cricdit.utils.TimeUtils.getStringToDate;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.os.CountDownTimer;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.lxj.xpopup.XPopup;
+import com.scwang.smart.refresh.layout.SmartRefreshLayout;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
+import com.youth.banner.Banner;
+import com.youth.banner.indicator.BaseIndicator;
+import com.youth.banner.listener.OnPageChangeListener;
+
+import org.greenrobot.eventbus.Subscribe;
+import org.greenrobot.eventbus.ThreadMode;
+import org.telegram.cricdit.adapter.NewsAdapter;
+import org.telegram.cricdit.adapter.NewsBannerAdapter;
+import org.telegram.cricdit.adapter.RecommendGroupAdapter;
+import org.telegram.cricdit.base.RecommendBannerBean;
+import org.telegram.cricdit.base.RecommendGroupBean;
+import org.telegram.cricdit.bean.BaseViewFragment;
+import org.telegram.cricdit.bean.MoreGroupBean;
+import org.telegram.cricdit.bean.NewsBean;
+import org.telegram.cricdit.bean.NewsItemEvent;
+import org.telegram.cricdit.bean.NewsMsgEvent;
+import org.telegram.cricdit.bean.ShieldIdListBean;
+import org.telegram.cricdit.mvp.NewsPresenter;
+import org.telegram.cricdit.mvp.NewsView;
+import org.telegram.cricdit.utils.ACache;
+import org.telegram.cricdit.utils.EventBusHelper;
+import org.telegram.cricdit.utils.GsonHel;
+import org.telegram.cricdit.utils.SPUtils;
+import org.telegram.cricdit.utils.TimeUtils;
+import org.telegram.cricdit.view.BannerIndicatorView;
+import org.telegram.cricdit.view.popup.ChooeseBottomPopup;
+import org.telegram.messenger.R;
+import org.telegram.onecric.ui.activity.CricketDetailActivity;
+import org.telegram.onecric.ui.activity.NewMatchActivity;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+public class HeadlinesFragment implements BaseViewFragment, NewsView {
+    public View view;
+    private Context mContext;
+    private NewNewsActivity mFragment;
+    private RecyclerView mRecyclerView;
+    private SmartRefreshLayout smartRefreshlayout;
+    private TextView tv_live_num;
+//    private TextView tv_back_top;
+    private Banner banner_headlines;
+    private BannerIndicatorView indicatorView;
+    private RecyclerView recycler_group;
+    private RelativeLayout rl_live;
+    private RelativeLayout rl_group;
+    private String newsType = "news";
+
+    private int page = 1, pagesize = 10, offset = 0, topNum = 0;
+    private NewsAdapter adapter;
+    private int jumpPosition = -1;
+    private NewsPresenter presenter;
+    private int distance;
+    private boolean topVisible = false;
+    private NewsBannerAdapter bannerAdapter;
+    private RecommendGroupAdapter groupAdapter;
+
+    public HeadlinesFragment(NewNewsActivity fragment) {
+        mContext = fragment.getContext();
+        mFragment = fragment;
+        presenter = new NewsPresenter();
+        presenter.attachView(this);
+        view = View.inflate(mContext, R.layout.fragment_headlines, null);
+        initView(view);
+        showCacheList(null);
+    }
+
+    private void initData() {
+        page = 1;
+        presenter.getData(newsType, page, pagesize);
+        presenter.getRecommendBanner();
+        presenter.getRecommendGroup();
+    }
+
+    private void initView(View view) {
+        EventBusHelper.register(this);
+        mRecyclerView = view.findViewById(R.id.mRecyclerView);
+        smartRefreshlayout = view.findViewById(R.id.smart_refreshlayout);
+
+        tv_live_num = view.findViewById(R.id.tv_live_num);
+//        tv_back_top = view.findViewById(R.id.tv_back_top);
+        banner_headlines = view.findViewById(R.id.banner_headlines);
+        indicatorView = view.findViewById(R.id.indicator);
+        recycler_group = view.findViewById(R.id.recycler_group);
+        rl_live = view.findViewById(R.id.rl_live);
+        rl_group = view.findViewById(R.id.rl_group);
+
+        banner_headlines.setIndicator(new BaseIndicator(mContext), false);
+        banner_headlines.addOnPageChangeListener(new OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+                if (bannerAdapter.getItemCount() > 0) {
+                    indicatorView.changeSelected(position);
+                }
+            }
+
+            @Override
+            public void onPageSelected(int position) {
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int state) {
+            }
+        });
+
+        bannerAdapter = new NewsBannerAdapter(mContext,new ArrayList<>());
+        banner_headlines.setAdapter(bannerAdapter);
+
+        recycler_group.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
+        groupAdapter = new RecommendGroupAdapter(R.layout.item_recommend_group,mFragment,new ArrayList<>());
+        recycler_group.setAdapter(groupAdapter);
+
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mContext);
+        linearLayoutManager.setOrientation(RecyclerView.VERTICAL);
+        mRecyclerView.setLayoutManager(linearLayoutManager);
+        adapter = new NewsAdapter(new ArrayList<>(), mFragment, presenter, newsType);
+
+        adapter.setmOnItemClickListener((v, position, bean) -> {
+            jumpPosition = position;
+            NewsDetailCommentFragment.newsBean = bean;
+            mFragment.presentFragment(new NewsDetailCommentFragment(new Bundle()));
+        });
+
+        adapter.setOnReportClickListener((id, username) -> new XPopup.Builder(mFragment.getContext())
+                .moveUpToKeyboard(false) //如果不加这个,评论弹窗会移动到软键盘上面
+                .enableDrag(true)
+                .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
+                .asCustom(new ChooeseBottomPopup(mFragment.getContext(), id, username, userID -> {
+                    String shieldIds = SPUtils.getInstance().get("shield_ids", "");
+                    if (TextUtils.isEmpty(shieldIds)) {
+                        ShieldIdListBean shieldIdListBean = new ShieldIdListBean();
+                        shieldIdListBean.shieldIdsList = new ArrayList<>();
+                        shieldIdListBean.shieldIdsList.add(userID);
+                        SPUtils.getInstance().save("shield_ids", GsonHel.toJson(shieldIdListBean));
+                        shieldData(userID);
+                    } else {
+                        ShieldIdListBean shieldIdListBean = GsonHel.fromJson(shieldIds, ShieldIdListBean.class);
+                        if (shieldIdListBean != null && shieldIdListBean.shieldIdsList != null && !shieldIdListBean.shieldIdsList.contains(userID)) {
+                            shieldIdListBean.shieldIdsList.add(userID);
+                            SPUtils.getInstance().save("shield_ids", GsonHel.toJson(shieldIdListBean));
+                            shieldData(userID);
+                        }
+                    }
+                }))
+                .show());
+
+        mRecyclerView.setAdapter(adapter);
+
+        smartRefreshlayout.setOnRefreshListener(refreshLayout -> {
+            page = 1;
+            offset = 0;
+            presenter.getData(newsType, page, pagesize);
+            presenter.getRecommendBanner();
+            presenter.getRecommendGroup();
+        });
+
+        smartRefreshlayout.setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore(RefreshLayout refreshLayout) {
+                if (adapter.getItemCount() == page * pagesize + topNum) {
+                    page++;
+                    offset = page * pagesize + topNum;
+                    presenter.getData(newsType, page, pagesize);
+                } else {
+                    smartRefreshlayout.finishLoadMore();
+                }
+            }
+        });
+
+/*        mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
+            @Override
+            public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
+                super.onScrolled(recyclerView, dx, dy);
+                if (distance < -ViewConfiguration.getTouchSlop() && !topVisible) {
+                    int currentPosition = ((RecyclerView.LayoutParams) recyclerView.getChildAt(0).getLayoutParams()).getViewAdapterPosition();
+                    if(currentPosition < 2){
+                        showTodayBtnAnim(1);
+                        topVisible = false;
+                    }else{
+                        showTodayBtnAnim(0);
+                        topVisible = true;
+                    }
+                    distance = 0;
+
+                } else if (distance > ViewConfiguration.getTouchSlop() && topVisible) {
+                    showTodayBtnAnim(1);
+                    distance = 0;
+                    topVisible = false;
+                }
+                if ((dy > 0 && topVisible) || (dy < 0 && !topVisible))
+                    distance += dy;
+            }
+        });
+
+        tv_back_top.setOnClickListener(v -> {
+            mRecyclerView.smoothScrollToPosition(0);
+            distance = 0;
+            topVisible = true;
+        });
+        showTodayBtnAnim(1);*/
+
+
+        view.findViewById(R.id.tv_all_live).setOnClickListener(v -> {
+            //更多直播
+            mFragment.presentFragment(new NewMatchActivity(), true, 0);
+        });
+
+        view.findViewById(R.id.tv_all_group).setOnClickListener(v -> {
+            //更多群组
+            mFragment.selectTab(3);
+        });
+
+        initData();
+    }
+
+    private List<NewsBean.NewsFeedBean> shieldData(String userID) {
+        List<NewsBean.NewsFeedBean> data = adapter.getData();
+        Iterator<NewsBean.NewsFeedBean> iterator = data.iterator();
+        while (iterator.hasNext()) {
+            NewsBean.NewsFeedBean next = iterator.next();
+            if ((next.getUserId() + "").equals(userID)) {
+                iterator.remove();
+            }
+        }
+        adapter.notifyDataSetChanged();
+        return data;
+    }
+
+    @Override
+    public View getView() {
+        return view;
+    }
+
+/*    private void showTodayBtnAnim(int type){
+        switch (type){
+            case 0:
+                if(tv_back_top.isSelected()){
+                    transAnimX(tv_back_top,tv_back_top.getMeasuredHeight() + UIUtil.dip2px(mContext,12),0);
+                    tv_back_top.setSelected(false);
+                }
+                break;
+            case 1:
+                if(!tv_back_top.isSelected()){
+                    transAnimX(tv_back_top,0,tv_back_top.getMeasuredHeight() + UIUtil.dip2px(mContext,12));
+                    tv_back_top.setSelected(true);
+                }
+                break;
+        }
+    }*/
+
+
+    @Override
+    public void showList(NewsBean mList) {
+        smartRefreshlayout.setVisibility(View.VISIBLE);
+        smartRefreshlayout.finishRefresh();
+        smartRefreshlayout.finishLoadMore();
+
+        List<NewsBean.NewsFeedBean> list = mList.getList();
+
+        String shieldIds = SPUtils.getInstance().get("shield_ids", "");
+        if (!TextUtils.isEmpty(shieldIds)) {
+            ShieldIdListBean shieldIdListBean = GsonHel.fromJson(shieldIds,ShieldIdListBean.class);
+            if (shieldIdListBean.shieldIdsList.size()>0) {
+                for (String userID : shieldIdListBean.shieldIdsList) {
+                    Iterator<NewsBean.NewsFeedBean> iterator =list.iterator();
+                    while (iterator.hasNext()) {
+                        NewsBean.NewsFeedBean next = iterator.next();
+                        if ((next.getUserId()).equals(userID)) {
+                            iterator.remove();
+                        }
+                    }
+                }
+            }
+        }
+
+        if (offset == 0) {
+            adapter.setData(list);
+        } else {
+            adapter.addData(list);
+        }
+    }
+
+    @Override
+    public void showError(Throwable e) {
+        smartRefreshlayout.finishRefresh();
+        smartRefreshlayout.finishLoadMore();
+    }
+
+    @Override
+    public void setCacheList(NewsBean bean, int topSize) {
+        ACache mACache = ACache.get(mContext);
+        mACache.put("cache_news_news_list", bean, ACache.TIME_DAY);
+        if (newsType == "news" && topSize != -1) {
+            this.topNum = topSize;
+        }
+        if (bean != null) {
+            showList(bean);
+        }
+    }
+
+    @Override
+    public void showCacheList(Throwable e) {
+        ACache mACache = ACache.get(mContext);
+        NewsBean data = (NewsBean) mACache.getAsObject("cache_news_news_list");
+        if (data != null && adapter.getItemCount() == 0) {
+            showList(data);
+        } else {
+            showError(e);
+        }
+    }
+
+    @Override
+    public void showRecommendBanner(List<RecommendBannerBean> bean) {
+        if(bean != null && bean.size()>0){
+            rl_live.setVisibility(View.VISIBLE);
+            tv_live_num.setText(mContext.getString(R.string.watch_live)+"("+bean.size()+")");
+
+            banner_headlines.setDatas(bean);
+            banner_headlines.setOnBannerListener((data, position) -> {
+                if(data instanceof RecommendBannerBean){
+                    RecommendBannerBean b = (RecommendBannerBean) data;
+                    if(b.getStatus() == 1){
+                        CricketDetailActivity.forward(mContext, b.getId(),2);
+                    }else{
+                        CricketDetailActivity.forward(mContext, b.getId());
+                    }
+                }
+            });
+            indicatorView.setCount(bean.size());
+        }else{
+            rl_live.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    public void showRecommendGroup(List<MoreGroupBean.MoreGroupItem> bean) {
+        if(bean != null && bean.size()>0){
+            rl_group.setVisibility(View.VISIBLE);
+            groupAdapter.setNewData(bean);
+        }else{
+            rl_group.setVisibility(View.GONE);
+        }
+
+    }
+
+    /**
+     * 更改登录状态后要刷新列表数据
+     */
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    public void refreshFocusOnData(NewsMsgEvent event) {
+/*        if(TextUtils.isEmpty(event.newsType) && NewsActivity.tabPosition<2){
+            adapter.notifyDataSetChanged();
+            return;
+        }*/
+
+        if (newsType.equals(event.newsType)) {
+            page = 1;
+            offset = 0;
+            presenter.getData(event.newsType, page, pagesize);
+        }
+    }
+
+    /**
+     * 更新本地的单条数据
+     */
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    public void refreshItem(NewsItemEvent event) {
+        if (newsType.equals(event.newsType) && jumpPosition != -1) {
+            adapter.updateItemData(jumpPosition);
+        }
+    }
+}

+ 2 - 2
TMessagesProj/src/main/java/org/telegram/cricdit/ui/MoreGroupFragment.java

@@ -45,7 +45,7 @@ public class MoreGroupFragment implements BaseViewFragment, MoreGroupView {
     private RecyclerView mRecyclerView;
     private SmartRefreshLayout mRefreshLayout;
     private MoreGroupAdapter mAdapter;
-    private List<MoreGroupBean.ListDTO> mMoreGroupBeanList;
+    private List<MoreGroupBean.MoreGroupItem> mMoreGroupBeanList;
     private AlertDialog alertDialog;
 
 
@@ -76,7 +76,7 @@ public class MoreGroupFragment implements BaseViewFragment, MoreGroupView {
         mAdapter.setEmptyView(inflate);
         mAdapter.setOnItemClickListener((adapter, view1, position) -> {
             if (UserConfig.getInstance(0).isClientActivated()) {
-                MoreGroupBean.ListDTO groupData = mAdapter.getData().get(position);
+                MoreGroupBean.MoreGroupItem groupData = mAdapter.getData().get(position);
                 alertDialog.show();
                 if (!TextUtils.isEmpty(groupData.private_link)) {
                     newSkipUrl(groupData.private_link);

+ 154 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewNewsActivity.java

@@ -0,0 +1,154 @@
+package org.telegram.cricdit.ui;
+
+import android.os.Bundle;
+import android.view.View;
+import android.widget.TextView;
+
+import androidx.viewpager.widget.ViewPager;
+
+import com.google.android.material.tabs.TabLayout;
+import com.lzy.ninegrid.NineGridView;
+
+import org.telegram.cricdit.GlideImageLoader;
+import org.telegram.cricdit.adapter.NewsViewPagerAdapter;
+import org.telegram.cricdit.base.BaseTabActivity;
+import org.telegram.cricdit.bean.BaseViewFragment;
+import org.telegram.cricdit.mvp.NewsPresenter;
+import org.telegram.cricdit.utils.ColorUtil;
+import org.telegram.messenger.LocaleController;
+import org.telegram.messenger.R;
+import org.telegram.messenger.UserConfig;
+import org.telegram.ui.ActionBar.ActionBar;
+import org.telegram.ui.ActionBar.ActionBarMenu;
+import org.telegram.ui.LoginActivity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class NewNewsActivity extends BaseTabActivity<NewsPresenter> {
+    private ActionBarMenu menu;
+    public ViewPager mViewPager;
+    private TabLayout tabLayout;
+    private TextView tv_search;
+    public static int tabPosition;
+    private List<String> tabTitles;
+    private List<BaseViewFragment> frameLayouts;
+
+    @Override
+    protected void initView(View view) {
+        //初始化NineGridView图片加载器
+        NineGridView.setImageLoader(new GlideImageLoader());
+
+        mViewPager = view.findViewById(R.id.test_viewpager);
+        tabLayout = view.findViewById(R.id.test_tab);
+        tv_search = view.findViewById(R.id.tv_search);
+        tv_search.setOnClickListener(v -> {
+            //选中的是哪个
+            if(tabPosition == 0){
+                Bundle bundle = new Bundle();
+                bundle.putString("news_type", "feed");
+                presentFragment(new NewsSearchActivity(bundle));
+            }else if(tabPosition == 1){
+                Bundle bundle = new Bundle();
+                bundle.putString("news_type", "news");
+                presentFragment(new NewsSearchActivity(bundle));
+            }else if (!UserConfig.getInstance(currentAccount).isClientActivated()) {
+                presentFragment(new LoginActivity());
+            }else{
+                presentFragment(new SearchGroupActivity());
+            }
+        });
+
+        tabTitles = new ArrayList<>();
+        frameLayouts = new ArrayList<>();
+        tabTitles.add(getContext().getString(R.string.news_tab1));
+        tabTitles.add(getContext().getString(R.string.news_tab2));
+        tabTitles.add(getContext().getString(R.string.news_tab3));
+        tabTitles.add(getContext().getString(R.string.news_tab4));
+        for (String title : tabTitles) {
+            TabLayout.Tab tabView = tabLayout.newTab();
+            tabLayout.addTab(tabView.setText(title));
+        }
+        tabLayout.setupWithViewPager(mViewPager);
+
+        Bundle bundle = new Bundle();
+        bundle.putString("news_type", "feed");
+        frameLayouts.add(new NewsFragment(this, bundle));
+        frameLayouts.add(new HeadlinesFragment(this));
+        frameLayouts.add(new NewsGroupFragment(this));
+        frameLayouts.add(new MoreGroupFragment(this));
+        NewsViewPagerAdapter adapter = new NewsViewPagerAdapter(frameLayouts, tabTitles);
+        mViewPager.setAdapter(adapter);
+
+        mViewPager.setOffscreenPageLimit(3);
+        mViewPager.setCurrentItem(1);
+
+        updateTabView(tabLayout.getTabAt(1), true);
+        tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
+            @Override
+            public void onTabSelected(TabLayout.Tab tab) {
+                tabPosition = tab.getPosition();
+                updateTabView(tab, true);
+            }
+
+            @Override
+            public void onTabUnselected(TabLayout.Tab tab) {
+                updateTabView(tab, false);
+            }
+
+            @Override
+            public void onTabReselected(TabLayout.Tab tab) {
+            }
+        });
+    }
+
+    private void updateTabView(TabLayout.Tab tab, boolean isSelect) {
+        if (tab == null || tab.getText() == null) {
+            return;
+        }
+        if (isSelect) {
+            //选中
+            if(tabPosition == 1){
+                tv_search.setText(getContext().getString(R.string.news_search_hint1));
+            }else if(tabPosition == 2){
+                tv_search.setText(getContext().getString(R.string.news_search_hint2));
+            }else{
+                tv_search.setText(getContext().getString(R.string.news_search_hint3));
+            }
+        }
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        setNavigationBarColor(ColorUtil.COLOR_WHITE);
+    }
+
+    @Override
+    protected int getLayoutResId() {
+        return R.layout.activity_news;
+    }
+
+    @Override
+    public String setActionBarTitle() {
+        //Key的含义不太清楚,暂时直接写成和id名一样的
+        return LocaleController.getString("CdtNews", R.string.CdNews);
+    }
+
+    @Override
+    protected NewsPresenter createPresenter() {
+        return new NewsPresenter();
+    }
+
+    @Override
+    protected void initActionBar(ActionBar actionBar) {
+        super.initActionBar(actionBar);
+        actionBar.setCastShadows(false);
+        actionBar.setBackButtonImage(0);
+        actionBar.setAddToContainer(false);
+    }
+
+    public void selectTab(int tabPosition){
+        mViewPager.setCurrentItem(tabPosition);
+    }
+}

+ 12 - 10
TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsDetailCommentFragment.java

@@ -177,7 +177,6 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
     private TextView tvTitle;
     //    private LinearLayout llHead;
     private ImageView ivHead;
-    private TextView tvUserName;
     private TextView tvPublicTime;
     private LinearLayout llFollow;
     private ImageView ivHeart;
@@ -210,6 +209,7 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
     private TextView tv_join_info2;
     private ImageView iv_group_arrow;
     private ImageView iv_group_arrow2;
+    private TextView tvCopyright;
 
 
     //    private CommentFragment commentFragment;
@@ -956,7 +956,6 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
         tvTitle = view.findViewById(R.id.tv_title);
 //        llHead = view.findViewById(R.id.ll_head);
         ivHead = view.findViewById(R.id.iv_head);
-        tvUserName = view.findViewById(R.id.tv_user_name);
         tvPublicTime = view.findViewById(R.id.tv_public_time);
         llFollow = view.findViewById(R.id.ll_follow);
         ivHeart = view.findViewById(R.id.iv_heart);
@@ -976,14 +975,15 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
         ll_head_feed = view.findViewById(R.id.ll_head_feed);
         tv_user_name_feed = view.findViewById(R.id.tv_user_name_feed);
         tv_public_time_feed = view.findViewById(R.id.tv_public_time_feed);
+        tvCopyright = view.findViewById(R.id.tv_copyright);
 
         tvTitle.setTextColor(ColorUtil.COLOR_BLACK_TEXT);
-        tvUserName.setTextColor(ColorUtil.COLOR_BLUE_TEXT);
         tvContentTop.setTextColor(ColorUtil.COLOR_BLACK_TEXT);
         tvContentDown.setTextColor(ColorUtil.COLOR_BLACK_TEXT);
         tvCommentsNum.setTextColor(ColorUtil.COLOR_BLACK_TEXT);
         tvFollow.setTextColor(ColorUtil.COLOR_WHITE);
         tvEnd.setTextColor(ColorUtil.COLOR_GRAY_TEXT);
+        tvCopyright.setTextColor(ColorUtil.COLOR_GRAY_TEXT);
         viewLine.setBackgroundColor(ColorUtil.COLOR_LINE_GRAY);
         nestedScrollview.setOverScrollMode(View.OVER_SCROLL_NEVER);
 
@@ -1145,8 +1145,7 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
             }
         } else {
             ll_head_news.setVisibility(View.VISIBLE);
-            tvUserName.setText(" " + (!TextUtils.isEmpty(nickname) ? nickname : TextUtils.isEmpty(newsBean.getUserName()) ? "" : newsBean.getUserName()));
-            tvPublicTime.setText(" " + getString(R.string.news_updated_on) + " " + TimeUtils.timeEngMonthStr(getContext(), Long.parseLong(newsBean.getPublishTime() + "000")));
+            tvPublicTime.setText(" " + getString(R.string.news_updated_on) + " " + TimeUtils.timeFromNow(getContext(), Long.parseLong(newsBean.getPublishTime() + "000")));
             tvContentDown.setText(Html.fromHtml(newsBean.getContent()));
             showRankGroup(itemBean.getGroup1(), itemBean.getGroup2());
         }
@@ -1208,11 +1207,6 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
             }
         });
 
-        tvUserName.setOnClickListener(view1 -> {
-            //fixme ltt 跳转至机构发布的新闻列表
-
-        });
-
         if (TextUtils.isEmpty(newsBean.getVideo())) {
             String url = newsBean.getMedium();
             if (!TextUtils.isEmpty(url)) {
@@ -1310,6 +1304,14 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
             tvNumZan.setVisibility(View.GONE);
             ivShare.setVisibility(View.GONE);
         }
+
+        if(!"feed".equals(newsType)){
+            tvCopyright.setVisibility(View.VISIBLE);
+            tvCopyright.setOnClickListener(v -> {
+                presentFragment(new CopyrightActivity());
+            });
+        }
+
         setHeadViewHolder(new ListHeadViewHolder(view));
     }
 

+ 36 - 4
TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsFragment.java

@@ -2,8 +2,10 @@ package org.telegram.cricdit.ui;
 
 import static org.telegram.cricdit.utils.TimeUtils.getDayInfo;
 import static org.telegram.onecric.utils.AnimUtil.transAnim;
+import static org.telegram.onecric.utils.AnimUtil.transAnimX;
 
 import android.content.Context;
+import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.view.View;
@@ -26,7 +28,11 @@ import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
 import org.greenrobot.eventbus.Subscribe;
 import org.greenrobot.eventbus.ThreadMode;
 import org.telegram.cricdit.adapter.NewsAdapter;
+import org.telegram.cricdit.base.NewsRecommendBean;
+import org.telegram.cricdit.base.RecommendBannerBean;
+import org.telegram.cricdit.base.RecommendGroupBean;
 import org.telegram.cricdit.bean.BaseViewFragment;
+import org.telegram.cricdit.bean.MoreGroupBean;
 import org.telegram.cricdit.bean.NewsBean;
 import org.telegram.cricdit.bean.NewsItemEvent;
 import org.telegram.cricdit.bean.NewsMsgEvent;
@@ -43,8 +49,11 @@ import org.telegram.cricdit.view.popup.ChooeseBottomPopup;
 import org.telegram.cricdit.view.popup.ReportBottomPopup;
 import org.telegram.messenger.R;
 import org.telegram.messenger.UserConfig;
+import org.telegram.onecric.mvp.CricketNewBean;
 import org.telegram.ui.ActionBar.BaseFragment;
 import org.telegram.ui.Components.AlertsCreator;
+import org.telegram.ui.Components.Premium.StarParticlesView;
+import org.telegram.ui.LoginActivity;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -57,6 +66,7 @@ public class NewsFragment implements BaseViewFragment, NewsView {
     private RecyclerView mRecyclerView;
     private SmartRefreshLayout smartRefreshlayout;
     private TextView tv_back_top;
+    private TextView tv_send_feed;
     private int page = 1, pagesize = 10, offset = 0, topNum = 0;
     private String newsType = "feed";
     private NewsAdapter adapter;
@@ -110,6 +120,7 @@ public class NewsFragment implements BaseViewFragment, NewsView {
         } else {
             adapter.addData(list);
         }
+        topVisible = false;
     }
 
     @Override
@@ -141,6 +152,16 @@ public class NewsFragment implements BaseViewFragment, NewsView {
         }
     }
 
+    @Override
+    public void showRecommendBanner(List<RecommendBannerBean> bean) {
+
+    }
+
+    @Override
+    public void showRecommendGroup(List<MoreGroupBean.MoreGroupItem> bean) {
+
+    }
+
     /**
      * 更改登录状态后要刷新列表数据
      */
@@ -173,7 +194,8 @@ public class NewsFragment implements BaseViewFragment, NewsView {
         mRecyclerView = view.findViewById(R.id.mRecyclerView);
         smartRefreshlayout = view.findViewById(R.id.smart_refreshlayout);
         tv_back_top = view.findViewById(R.id.tv_back_top);
-
+        tv_send_feed = view.findViewById(R.id.tv_send_feed);
+        tv_send_feed.setVisibility(View.VISIBLE);
         LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mContext);
         linearLayoutManager.setOrientation(RecyclerView.VERTICAL);
         mRecyclerView.setLayoutManager(linearLayoutManager);
@@ -258,9 +280,17 @@ public class NewsFragment implements BaseViewFragment, NewsView {
             mRecyclerView.smoothScrollToPosition(0);
             distance = 0;
             topVisible = true;
+            showTodayBtnAnim(1);
+        });
+
+        tv_send_feed.setOnClickListener(v -> {
+            if (!UserConfig.getInstance(UserConfig.selectedAccount).isClientActivated()) {
+                mFragment.presentFragment(new LoginActivity());
+            } else {
+                mFragment.presentFragment(new SendAnFeedActivity());
+            }
         });
 
-        showTodayBtnAnim(1);
         initData();
     }
 
@@ -283,19 +313,21 @@ public class NewsFragment implements BaseViewFragment, NewsView {
     }
 
     private void showTodayBtnAnim(int type){
+        tv_back_top.setVisibility(View.VISIBLE);
         switch (type){
             case 0:
                 if(tv_back_top.isSelected()){
-                    transAnim(tv_back_top,tv_back_top.getMeasuredHeight() + UIUtil.dip2px(mContext,20),0);
+                    transAnimX(tv_back_top,tv_back_top.getMeasuredWidth() + UIUtil.dip2px(mContext,12),0);
                     tv_back_top.setSelected(false);
                 }
                 break;
             case 1:
                 if(!tv_back_top.isSelected()){
-                    transAnim(tv_back_top,0,tv_back_top.getMeasuredHeight() + UIUtil.dip2px(mContext,20));
+                    transAnimX(tv_back_top,0,tv_back_top.getMeasuredWidth() + UIUtil.dip2px(mContext,12));
                     tv_back_top.setSelected(true);
                 }
                 break;
         }
     }
+
 }

+ 21 - 3
TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsTagActivity.java

@@ -1,6 +1,7 @@
 package org.telegram.cricdit.ui;
 
 import static org.telegram.onecric.utils.AnimUtil.transAnim;
+import static org.telegram.onecric.utils.AnimUtil.transAnimX;
 
 import android.os.Bundle;
 import android.text.TextUtils;
@@ -16,6 +17,9 @@ import com.classic.common.MultipleStatusView;
 import com.scwang.smart.refresh.layout.SmartRefreshLayout;
 import org.telegram.cricdit.adapter.NewsAdapter;
 import org.telegram.cricdit.base.BaseActivity;
+import org.telegram.cricdit.base.RecommendBannerBean;
+import org.telegram.cricdit.base.RecommendGroupBean;
+import org.telegram.cricdit.bean.MoreGroupBean;
 import org.telegram.cricdit.bean.NewsBean;
 import org.telegram.cricdit.mvp.NewsPresenter;
 import org.telegram.cricdit.mvp.NewsView;
@@ -25,7 +29,10 @@ import org.telegram.cricdit.utils.UIUtil;
 import org.telegram.messenger.LocaleController;
 import org.telegram.messenger.R;
 import org.telegram.messenger.UserConfig;
+import org.telegram.onecric.mvp.CricketNewBean;
+
 import java.util.ArrayList;
+import java.util.List;
 
 public class NewsTagActivity extends BaseActivity<NewsPresenter> implements NewsView {
     private String newsTag;
@@ -112,9 +119,9 @@ public class NewsTagActivity extends BaseActivity<NewsPresenter> implements News
             mRecyclerView.smoothScrollToPosition(0);
             distance = 0;
             topVisible = true;
+            showTodayBtnAnim(1);
         });
 
-        showTodayBtnAnim(1);
         initData();
     }
 
@@ -165,6 +172,16 @@ public class NewsTagActivity extends BaseActivity<NewsPresenter> implements News
     }
 
     @Override
+    public void showRecommendBanner(List<RecommendBannerBean> bean) {
+
+    }
+
+    @Override
+    public void showRecommendGroup(List<MoreGroupBean.MoreGroupItem> bean) {
+
+    }
+
+    @Override
     protected int getLayoutResId() {
         return R.layout.fragment_detail;
     }
@@ -189,16 +206,17 @@ public class NewsTagActivity extends BaseActivity<NewsPresenter> implements News
     }
 
     private void showTodayBtnAnim(int type){
+        tv_back_top.setVisibility(View.VISIBLE);
         switch (type){
             case 0:
                 if(tv_back_top.isSelected()){
-                    transAnim(tv_back_top,tv_back_top.getMeasuredHeight() + UIUtil.dip2px(getContext(),20),0);
+                    transAnimX(tv_back_top,tv_back_top.getMeasuredWidth() + UIUtil.dip2px(getContext(),12),0);
                     tv_back_top.setSelected(false);
                 }
                 break;
             case 1:
                 if(!tv_back_top.isSelected()){
-                    transAnim(tv_back_top,0,tv_back_top.getMeasuredHeight() + UIUtil.dip2px(getContext(),20));
+                    transAnimX(tv_back_top,0,tv_back_top.getMeasuredHeight() + UIUtil.dip2px(getContext(),12));
                     tv_back_top.setSelected(true);
                 }
                 break;

+ 2 - 1
TMessagesProj/src/main/java/org/telegram/cricdit/ui/RankListActivity.java

@@ -226,7 +226,8 @@ public class RankListActivity extends BaseTabActivity<RankListPresenter> impleme
             bannerRankList.setDatas(bannerBeans);
             indicator.setCount(hotBean.getBanner().size());
         }
-        List<RankListBean.TitleBean> list = hotBean.getList().subList(0, 5);
+
+        List<RankListBean.TitleBean> list = hotBean.getList().size()>5?hotBean.getList().subList(0, 5):hotBean.getList();
         mHotList.clear();
         mHotList.addAll(list);
         hotAdapter.notifyDataSetChanged();

+ 4 - 1
TMessagesProj/src/main/java/org/telegram/cricdit/utils/TimeUtils.java

@@ -225,7 +225,10 @@ public class TimeUtils {
         } else if (ago <= ONE_DAY){//时
             long hour = ago / ONE_HOUR;
             result = hour +  " "  + (hour==1?context.getString(R.string.time_hour):context.getString(R.string.time_hours)) + " " + context.getString(R.string.time_ago);
-        }else {
+        }else if(ago <= ONE_MONTH){//天
+            long day = ago / ONE_DAY;
+            result = day +  " "  + (day==1?context.getString(R.string.time_day):context.getString(R.string.time_days)) + " " + context.getString(R.string.time_ago);
+        }else{
             SimpleDateFormat sf = new SimpleDateFormat("MMM dd", Locale.ENGLISH);
             result = sf.format(date);
         }

+ 3 - 2
TMessagesProj/src/main/java/org/telegram/cricdit/view/BannerIndicatorView.java

@@ -2,6 +2,7 @@ package org.telegram.cricdit.view;
 
 import android.content.Context;
 import android.graphics.Canvas;
+import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.RectF;
 import android.util.AttributeSet;
@@ -47,13 +48,13 @@ public class BannerIndicatorView extends View{
     private void init() {
         mPaint = new Paint();
         mPaint.setAntiAlias(true);
-        mPaint.setColor(ColorUtil.COLOR_BLUE_ACTIONBAR);
+        mPaint.setColor(ColorUtil.COLOR_GRAY_TEXT);
         mPaint.setTextSize(14);
         mPaint.setStyle(Paint.Style.FILL);
 
         mRect = new Paint();
         mRect.setAntiAlias(true);
-        mRect.setColor(ColorUtil.COLOR_GRAY_TEXT);
+        mRect.setColor(0xff4c8eca);
         mRect.setTextSize(14);
         mRect.setStyle(Paint.Style.FILL);
 

+ 6 - 0
TMessagesProj/src/main/java/org/telegram/onecric/net/ApiStores.java

@@ -854,4 +854,10 @@ public interface ApiStores {
     //新获取公开赛列表
     @POST("api/Cricketnew/get_cricket_tournament")
     Observable<JsonObject> getTournamentList(@Query("name") String name);
+
+    //news banner
+    @GET("api/Cricketnew/cricket_match")
+    Observable<JsonObject> getNewsBanner(@Query("timezone") String timezone);
+
+
 }

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

@@ -21,4 +21,18 @@ public class AnimUtil {
         });
         mObjectAnimator.start(); // 开始播放动画
     }
+    public static void transAnimX(View view, float start, float end) {
+        ObjectAnimator mObjectAnimator = ObjectAnimator.ofFloat(view, "translationX",start,end);
+        mObjectAnimator.setDuration(500);
+        mObjectAnimator.setInterpolator(new LinearInterpolator());
+
+        mObjectAnimator.addListener(new AnimatorListenerAdapter() {
+            @Override
+            public void onAnimationEnd(Animator animation) {
+                super.onAnimationEnd(animation);
+
+            }
+        });
+        mObjectAnimator.start(); // 开始播放动画
+    }
 }

+ 8 - 0
TMessagesProj/src/main/java/org/telegram/onecric/utils/GlideUtil.java

@@ -45,4 +45,12 @@ public class GlideUtil {
     public static void loadRoundImageDefault(Context mContext, String path, ImageView mImageView, int radius) {
         Glide.with(mContext).load(path).transform(new CenterCrop(), new GlideRoundTransform(radius)).into(mImageView);
     }
+
+    //设置群头像
+    public static void loadGroupDefault(Context mContext, String path, ImageView mImageView) {
+        if (mContext != null) {
+            Glide.with(mContext).load(path).placeholder(R.drawable.book_group).dontAnimate().error(R.drawable.book_group)
+                    .into(mImageView);
+        }
+    }
 }

+ 2 - 1
TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java

@@ -92,6 +92,7 @@ import org.telegram.cricdit.config.Constants;
 import org.telegram.cricdit.net.ApiService;
 import org.telegram.cricdit.net.Parameter;
 import org.telegram.cricdit.net.RetrofitClient;
+import org.telegram.cricdit.ui.NewNewsActivity;
 import org.telegram.cricdit.ui.NewsActivity;
 import org.telegram.cricdit.ui.MeActivity;
 import org.telegram.cricdit.ui.RankListActivity;
@@ -3500,7 +3501,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
         ((TextView) mMainBottomTabContainer.findViewById(R.id.main_bottom_tab_rank_text)).setTextColor(ColorUtil.COLOR_GRAY5_TEXT);
 
 
-        mMainBottomTabContainer.findViewById(R.id.main_bottom_tab_news).setOnClickListener(v -> presentFragment(new NewsActivity(), true, 0));
+        mMainBottomTabContainer.findViewById(R.id.main_bottom_tab_news).setOnClickListener(v -> presentFragment(new NewNewsActivity(), true, 0));
 
         mMainBottomTabContainer.findViewById(R.id.main_bottom_tab_match).setOnClickListener(v -> presentFragment(new NewMatchActivity(), true, 0));
 

+ 2 - 1
TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java

@@ -99,6 +99,7 @@ import org.telegram.cricdit.net.ApiService;
 import org.telegram.cricdit.net.Parameter;
 import org.telegram.cricdit.net.RetrofitClient;
 import org.telegram.cricdit.service.SyncDataService;
+import org.telegram.cricdit.ui.NewNewsActivity;
 import org.telegram.cricdit.ui.NewsDetailCommentFragment;
 import org.telegram.cricdit.utils.AppInfoUtils;
 import org.telegram.cricdit.utils.DialogUtils;
@@ -632,7 +633,7 @@ public class LaunchActivity extends BasePermissionsActivity implements ActionBar
                 } else if (id == 20) {
 
                     //跳转至新闻
-                    presentFragment(new NewsActivity());
+                    presentFragment(new NewNewsActivity());
                     drawerLayoutContainer.closeDrawer(false);
                 } else if (id == 21) {
                     //跳转至排行榜

BIN
TMessagesProj/src/main/res/drawable-mdpi/icon_fervent.png


BIN
TMessagesProj/src/main/res/drawable-xhdpi/icon_fervent.png


BIN
TMessagesProj/src/main/res/drawable-xxhdpi/icon_fervent.png


BIN
TMessagesProj/src/main/res/drawable-xxxhdpi/icon_fervent.png


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

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <gradient android:startColor="@color/transparent"
+        android:endColor="#80000000"
+        android:angle="270"/>
+</shape>

+ 57 - 0
TMessagesProj/src/main/res/drawable/select_news_tab_bg.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <!-- 选择状态 -->
+    <item android:state_selected="true">
+
+        <layer-list>
+            <!-- 设置间隔背景为透明色 -->
+            <item>
+                <shape>
+                    <solid android:color="@android:color/transparent"/>
+                </shape>
+            </item>
+
+            <!-- 实际背景色 -->
+            <item android:left="4dp" android:right="4dp" >
+                <shape>
+                    <corners
+                        android:topLeftRadius="15dp"
+                        android:topRightRadius="15dp"
+                        android:bottomLeftRadius="15dp"
+                        android:bottomRightRadius="15dp" />
+                    <solid android:color="@color/c_30DC3C23"/>
+                    <stroke android:color="@color/c_DC3C23" android:width="1dp"/>
+                </shape>
+            </item>
+
+        </layer-list>
+    </item>
+
+    <!-- 默认状态 -->
+    <item android:state_selected="false">
+        <layer-list>
+            <!-- 设置间隔背景为透明色 -->
+            <item>
+                <shape>
+                    <solid android:color="@android:color/transparent"/>
+                </shape>
+            </item>
+
+            <!-- 实际背景色 -->
+            <item android:left="4dp" android:right="4dp">
+                <shape>
+                    <corners
+                        android:topLeftRadius="15dp"
+                        android:topRightRadius="15dp"
+                        android:bottomLeftRadius="15dp"
+                        android:bottomRightRadius="15dp" />
+                    <solid android:color="@color/white"/>
+                    <stroke android:color="@color/c_DCDBE0" android:width="1dp"/>
+                </shape>
+            </item>
+
+        </layer-list>
+    </item>
+
+</selector>

+ 6 - 0
TMessagesProj/src/main/res/drawable/shape_bg_80black_rect.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="2dp"/>
+    <solid android:color="#80000000"/>
+</shape>

+ 12 - 0
TMessagesProj/src/main/res/layout/activity_copyright.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/tv_main"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:padding="12dp"
+    android:textSize="@dimen/sp_14"
+    android:lineSpacingExtra="4dp"
+    android:scrollbars="none"
+    android:text="@string/copyright_detail"
+    android:textColor="@color/c_111111"
+    android:background="@color/white"/>

+ 2 - 2
TMessagesProj/src/main/res/layout/activity_cricket_detail.xml

@@ -42,8 +42,8 @@
                     android:layout_width="50dp"
                     android:layout_height="50dp"
                     android:paddingStart="7dp"
-                    android:paddingTop="14dp"
-                    android:paddingEnd="14dp"
+                    android:paddingTop="12dp"
+                    android:paddingEnd="12dp"
                     android:paddingBottom="14dp"
                     app:layout_constraintBottom_toBottomOf="@id/btn_left"
                     app:layout_constraintEnd_toStartOf="@id/inner_report"

+ 0 - 1
TMessagesProj/src/main/res/layout/activity_match_new.xml

@@ -39,7 +39,6 @@
         <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="vertical"
             android:background="@drawable/bg_gradient_d4d3d8_to_white">
 
             <androidx.recyclerview.widget.RecyclerView

+ 58 - 20
TMessagesProj/src/main/res/layout/activity_news.xml

@@ -1,31 +1,69 @@
 <?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:gravity="center"
     android:orientation="vertical">
 
-
-    <com.google.android.material.tabs.TabLayout
-        android:id="@+id/test_tab"
+    <FrameLayout
         android:layout_width="match_parent"
-        android:layout_height="45dp"
-        android:elevation="10dp"
-        app:layout_constraintTop_toTopOf="parent"
-        app:tabIndicator="@drawable/tab_indicator"
-        app:tabIndicatorColor="#fff"
-        app:tabIndicatorFullWidth="false"
-        app:tabIndicatorHeight="3dp"
-        app:tabRippleColor="@android:color/transparent"
-        app:tabTextAppearance="@style/TabLayoutTextStyle"
-        app:tabTextColor="#fff" />
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:background="@color/c_1D2550"
+        android:paddingTop="45dp">
+        <TextView
+            android:id="@+id/tv_search"
+            android:layout_width="match_parent"
+            android:layout_height="37dp"
+            android:drawablePadding="9dp"
+            android:layout_marginLeft="15dp"
+            android:layout_marginRight="15dp"
+            android:layout_marginBottom="11dp"
+            android:gravity="center_vertical"
+            android:paddingLeft="15dp"
+            android:text="@string/match_search_hint"
+            android:textColor="@color/c_70809B"
+            android:drawableLeft="@mipmap/icon_live_search"
+            android:textSize="14dp"
+            android:background="@drawable/shape_e8e9ed_25dp_rec"
+            android:foreground="@drawable/selector_foreground_search"/>
+    </FrameLayout>
 
-    <androidx.viewpager.widget.ViewPager
-        android:id="@+id/test_viewpager"
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="0dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/test_tab" />
+        android:layout_height="match_parent"
+        android:background="@color/white"
+        android:orientation="vertical">
+
+        <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:paddingTop="@dimen/dp_10"
+            android:paddingBottom="@dimen/dp_10"
+            android:background="@drawable/bg_gradient_d4d3d8_to_white">
+
+            <com.google.android.material.tabs.TabLayout
+                android:id="@+id/test_tab"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:elevation="10dp"
+                app:tabIndicatorColor="@color/transparent"
+                app:tabIndicatorFullWidth="false"
+                app:tabMode="auto"
+                app:tabGravity="fill"
+                app:tabRippleColor="@android:color/transparent"
+                app:tabTextAppearance="@style/TabLayoutTextStyle2"
+                app:tabTextColor="@color/colorBlue"
+                app:tabSelectedTextColor="@color/c_DC3C23"
+                app:tabBackground="@drawable/select_news_tab_bg" />
+
+        </FrameLayout>
+
+        <androidx.viewpager.widget.ViewPager
+            android:id="@+id/test_viewpager"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+    </LinearLayout>
 
-</androidx.constraintlayout.widget.ConstraintLayout>
+</LinearLayout>

+ 10 - 6
TMessagesProj/src/main/res/layout/activity_news_detail_comment.xml

@@ -41,12 +41,6 @@
                 android:orientation="horizontal"
                 android:padding="15dp">
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textColor="@color/c_999999"
-                    android:textSize="12sp"
-                    android:text="@string/news_by"/>
 
                 <TextView
                     android:id="@+id/tv_user_name"
@@ -159,6 +153,16 @@
                 android:textSize="@dimen/sp_16"/>
 
             <TextView
+                android:id="@+id/tv_copyright"
+                android:textSize="14sp"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="15dp"
+                android:layout_marginLeft="15dp"
+                android:text="@string/copyright_declaration"
+                android:visibility="gone"/>
+
+            <TextView
                 android:id="@+id/tv_end"
                 style="@style/TvTagStyle"
                 android:layout_width="match_parent"

+ 3 - 3
TMessagesProj/src/main/res/layout/activity_ranking_list.xml

@@ -55,7 +55,7 @@
                     android:layout_width="match_parent"
                     android:layout_height="20dp"
                     android:layout_alignBottom="@id/banner_rank_list"
-                    android:layout_marginTop="15dp"
+                    android:layout_marginTop="10dp"
                     android:layout_marginBottom="10dp"/>
 
                 <TextView
@@ -63,7 +63,7 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:fontFamily="@font/noto_sans_display_semibold"
-                    android:textSize="19sp"
+                    android:textSize="15sp"
                     android:layout_marginLeft="12dp"
                     android:layout_marginBottom="10dp"/>
 
@@ -86,7 +86,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:fontFamily="@font/noto_sans_display_semibold"
-                    android:textSize="19sp"
+                    android:textSize="15sp"
                     android:layout_marginTop="16dp"
                     android:layout_marginLeft="12dp"
                     android:layout_marginBottom="16dp"/>

+ 20 - 2
TMessagesProj/src/main/res/layout/fragment_detail.xml

@@ -31,7 +31,7 @@
         android:layout_height="43dp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="parent"
-        android:layout_marginBottom="20dp"
+        android:layout_marginBottom="60dp"
         android:layout_marginRight="12dp"
         android:drawableRight="@mipmap/ic_go_today_up"
         android:paddingLeft="11dp"
@@ -39,7 +39,25 @@
         android:gravity="center"
         android:fontFamily="@font/noto_sans_display_semibold"
         android:textColor="@color/white"
-        android:background="@drawable/bg_search_25"/>
+        android:background="@drawable/bg_search_25"
+        android:visibility="gone"/>
+
+    <TextView
+        android:id="@+id/tv_send_feed"
+        android:layout_width="wrap_content"
+        android:layout_height="43dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        android:layout_marginBottom="10dp"
+        android:layout_marginRight="12dp"
+        android:drawableRight="@drawable/floating_pencil"
+        android:paddingLeft="11dp"
+        android:paddingRight="11dp"
+        android:gravity="center"
+        android:fontFamily="@font/noto_sans_display_semibold"
+        android:textColor="@color/white"
+        android:background="@drawable/bg_search_25"
+        android:visibility="gone"/>
 
     <com.classic.common.MultipleStatusView
         android:id="@+id/status_view"

+ 165 - 0
TMessagesProj/src/main/res/layout/fragment_headlines.xml

@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.scwang.smart.refresh.layout.SmartRefreshLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/smart_refreshlayout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <include layout="@layout/base_head_refresh" />
+
+    <androidx.core.widget.NestedScrollView
+        android:id="@+id/nested_scrollview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:scrollbars="none">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+            <RelativeLayout
+                android:id="@+id/rl_live"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingTop="12dp"
+                android:paddingBottom="10dp"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/tv_live_num"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/watch_live"
+                    android:textColor="@color/c_111111"
+                    android:textSize="@dimen/sp_15"
+                    android:layout_marginLeft="12dp"
+                    android:fontFamily="@font/noto_sans_display_semibold"
+                    android:layout_alignParentLeft="true"/>
+
+                <TextView
+                    android:id="@+id/tv_all_live"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/see_all"
+                    android:textSize="14sp"
+                    android:textColor="@color/c_DC3C23"
+                    android:fontFamily="@font/noto_sans_display_semibold"
+                    android:layout_alignParentRight="true"
+                    android:layout_marginRight="12dp"/>
+
+                <com.youth.banner.Banner
+                    android:id="@+id/banner_headlines"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/tv_live_num"
+                    android:layout_marginTop="6dp"
+                    android:layout_marginLeft="8dp"
+                    android:layout_marginRight="8dp"/>
+
+                <org.telegram.cricdit.view.BannerIndicatorView
+                    android:id="@+id/indicator"
+                    android:layout_width="match_parent"
+                    android:layout_height="20dp"
+                    android:layout_below="@id/banner_headlines"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="12dp"
+                    android:layout_marginRight="12dp"/>
+
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/rl_group"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:paddingTop="12dp"
+                android:paddingBottom="10dp"
+                android:layout_below="@id/rl_live">
+
+                <TextView
+                    android:id="@+id/tv_group_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/recommended_group"
+                    android:textColor="@color/c_111111"
+                    android:textSize="@dimen/sp_15"
+                    android:fontFamily="@font/noto_sans_display_semibold"
+                    android:layout_alignParentLeft="true"
+                    android:paddingLeft="12dp"/>
+
+                <TextView
+                    android:id="@+id/tv_all_group"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/see_all"
+                    android:textSize="14sp"
+                    android:textColor="@color/c_DC3C23"
+                    android:fontFamily="@font/noto_sans_display_semibold"
+                    android:layout_alignParentRight="true"
+                    android:paddingRight="12dp"/>
+
+                <androidx.recyclerview.widget.RecyclerView
+                    android:id="@+id/recycler_group"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/tv_group_title"
+                    android:paddingTop="6dp"
+                    android:paddingBottom="10dp"
+                    android:layout_marginTop="6dp"/>
+
+                <View
+                    android:id="@+id/view_line"
+                    android:layout_width="match_parent"
+                    android:layout_height="8dp"
+                    android:background="@color/line_color"
+                    android:layout_below="@id/recycler_group" />
+
+            </RelativeLayout>
+
+            <TextView
+                android:id="@+id/tv_head"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="@string/headlines"
+                android:textColor="@color/c_111111"
+                android:textSize="@dimen/sp_15"
+                android:fontFamily="@font/noto_sans_display_semibold"
+                android:layout_alignParentLeft="true"
+                android:paddingTop="12dp"
+                android:paddingLeft="12dp"
+                android:layout_below="@id/rl_group"/>
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/mRecyclerView"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_below="@id/tv_head"/>
+
+            <TextView
+                android:id="@+id/tv_back_top"
+                android:layout_width="wrap_content"
+                android:layout_height="43dp"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentBottom="true"
+                android:layout_marginBottom="60dp"
+                android:layout_marginRight="12dp"
+                android:drawableRight="@mipmap/ic_go_today_up"
+                android:paddingLeft="11dp"
+                android:paddingRight="11dp"
+                android:gravity="center"
+                android:fontFamily="@font/noto_sans_display_semibold"
+                android:textColor="@color/white"
+                android:background="@drawable/bg_search_25"
+                android:visibility="gone"/>
+
+        </RelativeLayout>
+
+    </androidx.core.widget.NestedScrollView>
+
+    <include layout="@layout/base_head_loadmore" />
+
+</com.scwang.smart.refresh.layout.SmartRefreshLayout>
+

+ 0 - 1
TMessagesProj/src/main/res/layout/fragment_more_group.xml

@@ -3,7 +3,6 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/colorNormalBg2"
     android:orientation="vertical">
 
     <com.scwang.smart.refresh.layout.SmartRefreshLayout

+ 6 - 2
TMessagesProj/src/main/res/layout/item_cricket_day.xml

@@ -30,7 +30,9 @@
             android:textColor="@color/c_111111"
             android:paddingLeft="8dp"
             android:layout_toRightOf="@id/tv_day"
-            android:layout_alignBottom="@id/tv_day"/>
+            android:layout_alignBottom="@id/tv_day"
+            android:layout_alignTop="@id/tv_day"
+            android:gravity="center_vertical"/>
 
         <TextView
             android:id="@+id/tv_month"
@@ -41,7 +43,9 @@
             android:paddingLeft="8dp"
             android:layout_toRightOf="@id/tv_date"
             android:layout_alignParentRight="true"
-            android:layout_alignBottom="@id/tv_day"/>
+            android:layout_alignBottom="@id/tv_day"
+            android:layout_alignTop="@id/tv_day"
+            android:gravity="center_vertical"/>
 
         <View
             android:id="@+id/line"

+ 240 - 0
TMessagesProj/src/main/res/layout/item_headlines_banner.xml

@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.cardview.widget.CardView
+    android:id="@+id/cardView"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:card_view="http://schemas.android.com/apk/res-auto"
+    card_view:cardCornerRadius="5dp"
+    card_view:cardElevation="3dp"
+    card_view:cardMaxElevation="3dp"
+    card_view:cardPreventCornerOverlap="true"
+    card_view:cardUseCompatPadding="true"
+    android:layout_marginTop="2dp"
+    android:clickable="true"
+    android:foreground="?android:attr/selectableItemBackground">
+
+    <RelativeLayout
+        xmlns:tools="http://schemas.android.com/tools"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        xmlns:app="http://schemas.android.com/apk/res-auto"
+        android:background="@color/white">
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/cl_cover"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <ImageView
+                android:id="@+id/iv_cover"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                app:layout_constraintDimensionRatio="w,3:1"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                android:src="@mipmap/bg_recommend_1"
+                android:scaleType="fitXY"/>
+
+            <com.makeramen.roundedimageview.RoundedImageView
+                android:id="@+id/iv_home_logo2"
+                android:layout_width="85dp"
+                android:layout_height="85dp"
+                android:padding="18dp"
+                android:background="@drawable/poll_add_circle"
+                android:backgroundTint="@color/white"
+                android:src="@mipmap/img_team_logo_default"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintRight_toLeftOf="@id/view_center"/>
+
+            <View
+                android:id="@+id/view_center"
+                android:layout_width="1dp"
+                android:layout_height="1dp"
+                app:layout_constraintLeft_toRightOf="@id/iv_home_logo2"
+                app:layout_constraintRight_toLeftOf="@id/iv_away_logo2"
+                app:layout_constraintTop_toTopOf="parent"/>
+
+            <com.makeramen.roundedimageview.RoundedImageView
+                android:id="@+id/iv_away_logo2"
+                android:layout_width="85dp"
+                android:layout_height="85dp"
+                android:padding="18dp"
+                android:background="@drawable/poll_add_circle"
+                android:src="@mipmap/img_team_logo_default"
+                app:layout_constraintLeft_toRightOf="@id/view_center"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintRight_toRightOf="parent"/>
+
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                app:layout_constraintDimensionRatio="w,3:1"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                android:background="@mipmap/bg_recommend_tran"
+                android:src="@drawable/bg_gradient_bottom_tran_to_black"
+                android:scaleType="fitXY"/>
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <TextView
+            android:id="@+id/tv_time"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:background="@drawable/shape_bg_80black_rect"
+            android:textColor="@color/white"
+            android:textSize="11sp"
+            android:paddingTop="1dp"
+            android:paddingBottom="1dp"
+            android:paddingLeft="5dp"
+            android:paddingRight="5dp"
+            android:layout_marginLeft="8dp"
+            android:layout_marginTop="8dp"
+            tools:text="LIVE"/>
+
+        <ImageView
+            android:id="@+id/iv_subscribe"
+            android:layout_width="50dp"
+            android:layout_height="22dp"
+            android:paddingLeft="5dp"
+            android:paddingRight="8dp"
+            android:src="@mipmap/unsubscribe"
+            android:layout_alignParentRight="true"
+            android:layout_marginTop="5dp"/>
+
+        <TextView
+            android:id="@+id/tv_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="50dp"
+            android:layout_marginRight="50dp"
+            android:textColor="@color/white"
+            android:textSize="11sp"
+            android:singleLine="true"
+            android:ellipsize="end"
+            tools:text="T20 World Cup,Women,Warm-UpT20 World Cup,Women,Warm-Up"
+            android:layout_alignBottom="@id/cl_cover"
+            android:layout_centerHorizontal="true"
+            android:layout_marginBottom="8dp"/>
+
+        <ImageView
+            android:id="@+id/iv_watch_live"
+            android:layout_width="95dp"
+            android:layout_height="32dp"
+            android:src="@mipmap/icon_live_btn_play"
+            android:layout_below="@id/tv_title"
+            android:layout_centerHorizontal="true"
+            android:layout_marginTop="-8dp"/>
+
+        <ImageView
+            android:id="@+id/iv_v"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@mipmap/icon_live_vs"
+            android:layout_below="@id/iv_watch_live"
+            android:layout_centerHorizontal="true"/>
+
+        <TextView
+            android:id="@+id/tv_v"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/iv_v"
+            android:layout_alignLeft="@id/iv_v"
+            android:layout_alignRight="@id/iv_v"
+            android:text="|"
+            android:textSize="8sp"
+            android:gravity="center_horizontal"
+            android:textColor="@color/line_color"
+            android:layout_marginTop="-2dp"/>
+
+        <com.makeramen.roundedimageview.RoundedImageView
+            android:id="@+id/iv_home_logo"
+            android:layout_width="25dp"
+            android:layout_height="25dp"
+            android:src="@mipmap/img_team_logo_default"
+            android:layout_below="@id/cl_cover"
+            android:layout_marginLeft="10dp"
+            android:layout_marginTop="8dp"
+            android:layout_marginRight="8dp"/>
+
+        <TextView
+            android:id="@+id/tv_home_name"
+            android:layout_width="90dp"
+            android:layout_height="wrap_content"
+            android:textColor="@color/c_111111"
+            android:textSize="13sp"
+            android:maxLines="1"
+            android:ellipsize="end"
+            android:layout_below="@id/cl_cover"
+            android:layout_marginTop="13dp"
+            android:layout_toRightOf="@+id/iv_home_logo"
+            tools:text="Worid Glants Glants"/>
+
+        <TextView
+            android:id="@+id/tv_home_score"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor="@color/c_111111"
+            android:textSize="11sp"
+            android:maxLines="1"
+            android:ellipsize="end"
+            android:layout_below="@id/tv_home_name"
+            android:layout_alignLeft="@+id/tv_home_name"
+            tools:text="159/5"/>
+
+        <com.makeramen.roundedimageview.RoundedImageView
+            android:id="@+id/iv_away_logo"
+            android:layout_width="25dp"
+            android:layout_height="25dp"
+            android:src="@mipmap/img_team_logo_default"
+            android:layout_alignParentRight="true"
+            android:layout_below="@id/cl_cover"
+            android:layout_marginLeft="8dp"
+            android:layout_marginTop="8dp"
+            android:layout_marginRight="10dp"/>
+
+        <TextView
+            android:id="@+id/tv_away_name"
+            android:layout_width="90dp"
+            android:layout_height="wrap_content"
+            android:textColor="@color/c_111111"
+            android:textSize="13sp"
+            android:maxLines="1"
+            android:ellipsize="end"
+            android:layout_below="@id/cl_cover"
+            android:layout_marginTop="13dp"
+            android:layout_toLeftOf="@+id/iv_away_logo"
+            tools:text="Asla lins Asla lins"
+            android:gravity="right"/>
+
+        <TextView
+            android:id="@+id/tv_away_score"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor="@color/c_111111"
+            android:textSize="11sp"
+            android:maxLines="1"
+            android:ellipsize="end"
+            android:layout_below="@id/tv_away_name"
+            android:layout_alignRight="@+id/tv_away_name"
+            tools:text="159/5"/>
+
+        <TextView
+            android:id="@+id/tv_result"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor="@color/c_111111"
+            android:textSize="11sp"
+            android:layout_marginBottom="5dp"
+            android:layout_below="@id/tv_away_score"
+            android:layout_centerHorizontal="true"
+            tools:text="Match Starts at 10:30 PM"
+            android:layout_marginTop="2dp"/>
+
+    </RelativeLayout>
+
+</androidx.cardview.widget.CardView>

+ 4 - 6
TMessagesProj/src/main/res/layout/item_news_short.xml

@@ -21,22 +21,20 @@
             android:layout_toLeftOf="@id/iv_right"
             android:ellipsize="end"
             android:maxLines="2"
-            android:textSize="@dimen/sp_15"
+            android:textSize="@dimen/sp_14"
             android:lineSpacingExtra="@dimen/dp_4"
             android:textColor="@color/c_333333"
-            android:fontFamily="@font/noto_sans_display_semibold"/>
+            android:fontFamily="@font/noto_sans_display_regular"/>
 
         <TextView
             android:id="@+id/tv_user_name"
             style="@style/TvNormalStyle"
             android:layout_width="65dp"
             android:layout_height="wrap_content"
-            android:layout_below="@id/tv_content"
             android:layout_alignBottom="@id/iv_right"
-            android:minHeight="30dp"
-            android:gravity="bottom"
             android:ellipsize="end"
-            android:maxLines="1" />
+            android:maxLines="1"
+            android:visibility="gone"/>
 
         <TextView
             android:id="@+id/tv_date"

+ 3 - 2
TMessagesProj/src/main/res/layout/item_news_top.xml

@@ -15,10 +15,10 @@
         android:layout_marginBottom="9.5dp"
         android:maxLines="2"
         android:ellipsize="end"
-        android:textSize="@dimen/sp_15"
+        android:textSize="@dimen/sp_14"
         android:textColor="@color/c_333333"
         android:lineSpacingExtra="@dimen/dp_4"
-        android:fontFamily="@font/noto_sans_display_semibold"/>
+        android:fontFamily="@font/noto_sans_display_regular"/>
 
     <RelativeLayout
         android:id="@+id/rl_video"
@@ -84,6 +84,7 @@
             android:layout_weight="1"
             android:layout_height="wrap_content"
             android:layout_alignBottom="@id/iv_right"
+            android:drawableLeft="@drawable/icon_fervent"
             android:ellipsize="end"
             android:maxLines="1"/>
 

+ 2 - 2
TMessagesProj/src/main/res/layout/item_rank_list_hot.xml

@@ -45,7 +45,7 @@
                 android:drawablePadding="5dp"
                 android:lineSpacingExtra="2dp"
                 android:paddingBottom="5dp"
-                android:textSize="16sp"
+                android:textSize="14sp"
                 android:fontFamily="@font/noto_sans_display_regular"/>
 
             <TextView
@@ -57,7 +57,7 @@
                 android:drawableLeft="@drawable/icon_fervent"
                 android:drawablePadding="4dp"
                 android:text="0"
-                android:textSize="15sp"
+                android:textSize="13sp"
                 android:textStyle="bold"
                 android:fontFamily="@font/noto_sans_display_semibold"/>
 

+ 30 - 0
TMessagesProj/src/main/res/layout/item_recommend_group.xml

@@ -0,0 +1,30 @@
+<?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="wrap_content"
+    android:layout_height="wrap_content"
+    android:paddingLeft="@dimen/dp_10"
+    android:paddingRight="2dp">
+
+    <com.makeramen.roundedimageview.RoundedImageView
+        android:id="@+id/iv_head"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        app:riv_oval="true"
+        android:scaleType="centerCrop"
+        android:layout_gravity="center_horizontal"/>
+
+    <TextView
+        android:id="@+id/tv_name"
+        android:layout_width="60dp"
+        android:layout_height="wrap_content"
+        android:singleLine="true"
+        android:maxLines="1"
+        android:ellipsize="end"
+        android:textColor="@color/c_111111"
+        android:textSize="@dimen/sp_11"
+        android:gravity="center"
+        android:layout_marginTop="2dp"/>
+
+</LinearLayout>

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


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


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


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


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


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


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


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


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


BIN
TMessagesProj/src/main/res/mipmap-xxhdpi/icon_live_btn.png


BIN
TMessagesProj/src/main/res/mipmap-xxhdpi/icon_live_btn_play.png


+ 1 - 1
TMessagesProj/src/main/res/values/string-cricdit.xml

@@ -132,7 +132,7 @@
     <string name="post_resource_video_tip">Select a maximum of one video</string>
     <string name="post_resource_video_format_tip">Uploading this video format is not supported</string>
     <string name="news_by">By</string>
-    <string name="news_updated_on">Updated on</string>
+    <string name="news_updated_on">Updated on</string>
     <string name="leaderboard_title">Leaderboard title</string>
     <string name="please_enter_a_title">Please enter a title</string>
     <string name="voting_options">Voting Options</string>

+ 14 - 1
TMessagesProj/src/main/res/values/strings.xml

@@ -6077,5 +6077,18 @@
     <string name="match_search_hint">Search for tours and teams...</string>
     <string name="No_search_results_for_this_filter">No search results for this filter</string>
     <string name="RESET_FILTERS">RESET FILTERS</string>
-
+    <string name="watch_live">Watch Live</string>
+    <string name="see_all">See All</string>
+    <string name="recommended_group">Recommended Group</string>
+    <string name="news_search_hint1">Search trending topics, charts and news</string>
+    <string name="news_search_hint2">Search trending topics</string>
+    <string name="news_search_hint3">Search for popular groups and channels</string>
+    <string name="headlines">Headlines</string>
+    <string name="notice_turned_off">You\'ve turned off notifications</string>
+    <string name="notice_turned_on">You\'ve turned on notifications</string>
+    <string name="time_day">day</string>
+    <string name="time_days">days</string>
+    <string name="copyright_declaration">©Copyright Declaration</string>
+    <string name="copyright_declaration2">Copyright Declaration</string>
+    <string name="copyright_detail">Cricdit respects copyright law. If you believe that a post infringes your copyrights, you may submit to us a notification pursuant to applicable law so that we can solve it as soon as possible. Do not use this procedure for matters unrelated to copyright infringement.\n\nYour notification of claimed infringement must include the following information: (1) an electronic or physical signature of the owner or of the person authorized to act on behalf of the owner of the copyright interest; (2) identification of the copyrighted work (or works) that you claim has (or have) been infringed; (3) a description of the material that you claim is infringing, and the location where the original or an authorized copy of the copyrighted work exists (for example, the URL of the page of the website where it is lawfully found; the name, edition and pages of a book from which an excerpt was copied, etc.); (4) a clear description of where the infringing material is located, including as applicable its URL, so that we can locate the material; (5) your name, address, telephone number, and e-mail address; (6) a statement that you have a good-faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law; and (7) a statement by you, made under penalty of perjury, that the above information in your notice is accurate and that you are the copyright owner or authorized to act on the copyright owner’s behalf.\n\nYou can report alleged copyright infringement by emailing the above information to our email (support@cricshark.com)</string>
 </resources>

+ 1 - 1
TMessagesProj/src/main/res/values/styles.xml

@@ -334,7 +334,7 @@
     </style>
 
     <style name="TabLayoutTextStyle2" parent="TextAppearance.Design.Tab">
-        <item name="android:textSize">13sp</item>
+        <item name="android:textSize">12sp</item>
         <item name="android:textAllCaps">false</item>
         <item name="textAllCaps">false</item>
     </style>

+ 20 - 0
TMessagesProj_App/bundleAfat/release/output-metadata.json

@@ -0,0 +1,20 @@
+{
+  "version": 3,
+  "artifactType": {
+    "type": "APK",
+    "kind": "Directory"
+  },
+  "applicationId": "com.cricdit.cricdit",
+  "variantName": "bundleAfatRelease",
+  "elements": [
+    {
+      "type": "SINGLE",
+      "filters": [],
+      "attributes": [],
+      "versionCode": 30,
+      "versionName": "0.3.0",
+      "outputFile": "Cricdit0.3.0.apk"
+    }
+  ],
+  "elementType": "File"
+}

+ 2 - 2
gradle.properties

@@ -15,8 +15,8 @@
 #Sat Mar 12 05:53:50 MSK 2016
 #APP_VERSION_NAME=9.0.2
 #APP_VERSION_CODE=2808
-APP_VERSION_NAME=0.2.9
-APP_VERSION_CODE=29
+APP_VERSION_NAME=0.3.0
+APP_VERSION_CODE=30
 #APP_PACKAGE=org.telegram.messenger
 APP_PACKAGE=com.cricdit.cricdit
 RELEASE_KEY_PASSWORD=123456