Commit 684fc0ff by 霍志良

Merge remote-tracking branch 'origin/d/v4.3.92' into 心事动态发布优化

# Conflicts:
#	m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java
parents 0396bfba 41e5c709
......@@ -181,12 +181,11 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// kapt rootProject.ext.dependencies["dagger2-compiler"]
api rootProject.ext.dependencies["butterknife"]
kapt rootProject.ext.dependencies["butterknife-compiler"]
implementation(rootProject.ext.dependencies["design"])
implementation(rootProject.ext.dependencies["appcompat-v7"])
implementation(rootProject.ext.dependencies["espresso-core"])
implementation(rootProject.ext.dependencies["okhttp3"])
implementation("androidx.fragment:fragment:1.2.4")
// TPNS SDK 主工程依赖包
// implementation 'com.tencent.liteav:LiteAVSDK_TRTC:latest.release'
......
......@@ -27,53 +27,34 @@ import java.util.HashMap;
import java.util.Locale;
import java.util.Objects;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/**
* Created by haorui on 2019-10-28 .
* Des:
*/
public class PlayFragment extends Fragment implements View.OnClickListener,
SeekBar.OnSeekBarChangeListener, OnPlayerEventListener {
@BindView(R.id.ll_content)
LinearLayout llContent;
@BindView(R.id.iv_play_page_bg)
ImageView ivPlayingBg;
@BindView(R.id.iv_back)
ImageView ivBack;
@BindView(R.id.tv_title)
TextView tvTitle;
@BindView(R.id.tv_artist)
TextView tvArtist;
@BindView(R.id.sb_progress)
SeekBar sbProgress;
@BindView(R.id.tv_current_time)
TextView tvCurrentTime;
@BindView(R.id.tv_total_time)
TextView tvTotalTime;
@BindView(R.id.iv_mode)
ImageView ivMode;
@BindView(R.id.iv_play)
ImageView ivPlay;
@BindView(R.id.iv_next)
ImageView ivNext;
@BindView(R.id.iv_prev)
ImageView ivPrev;
@BindView(R.id.iv_cover)
ImageView ivCover;
private LinearLayout llContent;
private ImageView ivPlayingBg;
private ImageView ivBack;
private TextView tvTitle;
private TextView tvArtist;
private SeekBar sbProgress;
private TextView tvCurrentTime;
private TextView tvTotalTime;
private ImageView ivMode;
private ImageView ivPlay;
private ImageView ivNext;
private ImageView ivPrev;
private ImageView ivCover;
int mLastProgress;
boolean isDraggingProgress;
private Unbinder unbinder;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_play, container, false);
unbinder = ButterKnife.bind(this, rootView);
bindView(rootView);
return rootView ;
}
......@@ -91,12 +72,6 @@ public class PlayFragment extends Fragment implements View.OnClickListener,
setListener();
}
@Override
public void onDestroyView() {
super.onDestroyView();
unbinder.unbind();
}
protected void setListener() {
ivBack.setOnClickListener(this);
ivMode.setOnClickListener(this);
......@@ -299,4 +274,20 @@ public class PlayFragment extends Fragment implements View.OnClickListener,
public void onComplete() {
LogUtil.e("onComplete");
}
private void bindView(View bindSource) {
llContent = bindSource.findViewById(R.id.ll_content);
ivPlayingBg = bindSource.findViewById(R.id.iv_play_page_bg);
ivBack = bindSource.findViewById(R.id.iv_back);
tvTitle = bindSource.findViewById(R.id.tv_title);
tvArtist = bindSource.findViewById(R.id.tv_artist);
sbProgress = bindSource.findViewById(R.id.sb_progress);
tvCurrentTime = bindSource.findViewById(R.id.tv_current_time);
tvTotalTime = bindSource.findViewById(R.id.tv_total_time);
ivMode = bindSource.findViewById(R.id.iv_mode);
ivPlay = bindSource.findViewById(R.id.iv_play);
ivNext = bindSource.findViewById(R.id.iv_next);
ivPrev = bindSource.findViewById(R.id.iv_prev);
ivCover = bindSource.findViewById(R.id.iv_cover);
}
}
......@@ -36,7 +36,6 @@ buildscript {
classpath 'com.ydl.plugins:modular:1.0.3'
classpath 'com.ydl:notracepoint-gradle-plugin:0.0.3'
classpath 'com.ydl.plugins:restools:1.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc1'
}
}
......
......@@ -79,7 +79,6 @@ ext {
dagger2SdkVersion : "2.23.2",
glideSdkVersion : "4.12.0",
frescoSdkVersion : "2.1.0",
butterknifeSdkVersion : "9.0.0-rc1",
rxlifecycleSdkVersion : "1.0",
rxlifecycle2SdkVersion : "2.2.2",
espressoSdkVersion : "3.0.1",
......@@ -167,8 +166,6 @@ ext {
//view
"autolayout" : "com.zhy:autolayout:1.4.5",
"butterknife" : "com.jakewharton:butterknife:${version["butterknifeSdkVersion"]}",
"butterknife-compiler" : "com.jakewharton:butterknife-compiler:${version["butterknifeSdkVersion"]}",
"pickerview" : "com.contrarywind:Android-PickerView:3.2.5",
"photoview" : "com.github.chrisbanes.photoview:library:1.2.3",
"numberprogressbar" : "com.daimajia.numberprogressbar:library:1.2@aar",
......
......@@ -65,7 +65,6 @@ dependencies {
api 'com.github.princekin-f:EasyFloat:1.3.2'
api rootProject.ext.dependencies["ydl-user-router"]
api rootProject.ext.dependencies["butterknife"]
if (rootProject.ext.dev_mode){
//开发时使用
......
......@@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'resTools' // 资源重命名插件
apply plugin: 'com.jakewharton.butterknife'
// 配置资源重命名插件
resConfig {
......@@ -89,8 +88,6 @@ dependencies {
implementation 'com.pnikosis:materialish-progress:1.7'
implementation 'com.daimajia.numberprogressbar:library:1.4@aar'
implementation 'me.toptas.fancyshowcase:fancyshowcaseview:1.1.5'
kapt rootProject.ext.dependencies["butterknife-compiler"]
api rootProject.ext.dependencies["butterknife"]
api rootProject.ext.dependencies["ydl-user-router"]
if (rootProject.ext.dev_mode){
//开发时使用
......
......@@ -4,7 +4,6 @@ import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter
import androidx.viewpager.widget.ViewPager
import butterknife.ButterKnife
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.yidianling.dynamic.R
......@@ -41,7 +40,6 @@ class MyTrendsActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.dynamic_activity_mytrends)
ButterKnife.bind(this)
sendFragment = TrendsListFragment.newInstance(
1,
......
......@@ -13,7 +13,6 @@ import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.widget.ImageView
import butterknife.ButterKnife
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.adapter.BaseRecyclerAdapter
import com.ydl.ydlcommon.base.BaseActivity
......@@ -59,7 +58,6 @@ class TrendsReplyInfoActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.dynamic_activity_trends_reply_info)
ButterKnife.bind(this)
val bundle = intent.getBundleExtra(YDLConstants.BUNDLE)
reply_id = bundle.getString(REPLY_ID)
......
......@@ -13,7 +13,6 @@ import android.widget.TextView;
import com.ydl.ydl_image.module.GlideApp;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.common.view.WrapGridLayoutManager;
import com.yidianling.dynamic.model.Command;
......@@ -32,8 +31,6 @@ import org.json.JSONException;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
......@@ -838,28 +835,30 @@ class TrendLoadMoreViewHolder extends RecyclerView.ViewHolder {
//新版广告
class RecommendTrendAdViewHolder2 extends RecyclerView.ViewHolder {
@BindView(R2.id.item_recommend_trend_user_head_iv)
ImageView itemRecommendTrendUserHeadIv;
@BindView(R2.id.item_recommend_trend_user_name_tv)
TextView itemRecommendTrendUserNameTv;
@BindView(R2.id.item_recommend_trend_user_gender_iv)
ImageView itemRecommendTrendUserGenderIv;
@BindView(R2.id.item_recommend_trend_time_tv)
TextView itemRecommendTrendTimeTv;
@BindView(R2.id.item_recommend_trend_title_tv)
TextView itemRecommendTrendTitleTv;
@BindView(R2.id.item_recommend_trend_content_tv)
TextView itemRecommendTrendContentTv;
@BindView(R2.id.iv_ad_img)
ImageView ivAdImg;
@BindView(R2.id.item_recommend_trend_readed_tv)
TextView itemRecommendTrendReadedTv;
public RecommendTrendAdViewHolder2(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
bindView(itemView);
// ivAdImg.getLayoutParams().height = (ScreenUtil.getScreenWidth(YDLApplication.getInstance()) -
// SizeUtil.dp2px(YDLApplication.getInstance(), 30)) * 348 / 640;
// ivAdImg.requestLayout();
}
private void bindView(View bindSource) {
itemRecommendTrendUserHeadIv = bindSource.findViewById(R.id.item_recommend_trend_user_head_iv);
itemRecommendTrendUserNameTv = bindSource.findViewById(R.id.item_recommend_trend_user_name_tv);
itemRecommendTrendUserGenderIv = bindSource.findViewById(R.id.item_recommend_trend_user_gender_iv);
itemRecommendTrendTimeTv = bindSource.findViewById(R.id.item_recommend_trend_time_tv);
itemRecommendTrendTitleTv = bindSource.findViewById(R.id.item_recommend_trend_title_tv);
itemRecommendTrendContentTv = bindSource.findViewById(R.id.item_recommend_trend_content_tv);
ivAdImg = bindSource.findViewById(R.id.iv_ad_img);
itemRecommendTrendReadedTv = bindSource.findViewById(R.id.item_recommend_trend_readed_tv);
}
}
......@@ -19,15 +19,11 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.model.Command;
import com.yidianling.dynamic.router.DynamicIn;
import com.yidianling.dynamic.thank.data.ZJservice;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
......@@ -37,16 +33,11 @@ import io.reactivex.schedulers.Schedulers;
public class ShowIntroduceDialogFragment extends BaseDialogFragment {
@BindView(R2.id.sdv_head)
ImageView mHead;
@BindView(R2.id.name)
TextView mName;
@BindView(R2.id.introduce)
TextView mIntroduce;
@BindView(R2.id.changeimg)
ImageView mChangeImg;
@BindView(R2.id.changtext)
TextView mChangeText;
private ImageView mHead;
private TextView mName;
private TextView mIntroduce;
private ImageView mChangeImg;
private TextView mChangeText;
String docid;
......@@ -61,13 +52,16 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment {
String goodAt;
private ZJservice zjservice;
private View mLlBtn1;
private View mLlBtn2;
private View mIvClose;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dynamic_fragment_dialog_show_introduce, container, false);
ButterKnife.bind(this, view);
bindView(view);
init();
return view;
}
......@@ -87,8 +81,7 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment {
}
@OnClick({R2.id.ll_btn1, R2.id.ll_btn2, R2.id.iv_close})
void click(View view) {
private void click(View view) {
if (view.getId() == R.id.ll_btn1) {
if (zjservice.is_online.equals("1")) {
......@@ -167,4 +160,24 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment {
}
}).show();
}
private void bindView(View bindSource) {
mHead = bindSource.findViewById(R.id.sdv_head);
mName = bindSource.findViewById(R.id.name);
mIntroduce = bindSource.findViewById(R.id.introduce);
mChangeImg = bindSource.findViewById(R.id.changeimg);
mChangeText = bindSource.findViewById(R.id.changtext);
mLlBtn1 = bindSource.findViewById(R.id.ll_btn1);
mLlBtn2 = bindSource.findViewById(R.id.ll_btn2);
mIvClose = bindSource.findViewById(R.id.iv_close);
mLlBtn1.setOnClickListener(v -> {
click(v);
});
mLlBtn2.setOnClickListener(v -> {
click(v);
});
mIvClose.setOnClickListener(v -> {
click(v);
});
}
}
......@@ -14,7 +14,6 @@ import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.model.Command;
import com.yidianling.dynamic.thank.data.ThxData;
......@@ -25,8 +24,6 @@ import com.ydl.ydlcommon.data.http.RxUtils;
import org.jetbrains.annotations.NotNull;
import butterknife.BindView;
import butterknife.ButterKnife;
import de.greenrobot.event.EventBus;
import in.srain.cube.views.loadmore.LoadMoreContainer;
import in.srain.cube.views.loadmore.LoadMoreHandler;
......@@ -46,12 +43,9 @@ import io.reactivex.schedulers.Schedulers;
public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreHandler {
@BindView(R2.id.store_house_ptr_frame)
PtrFrameLayout store_house_ptr_frame;
@BindView(R2.id.load_more_list_view_container)
LoadMoreListViewContainer load_more_list_view_container;
@BindView(R2.id.lv_content)
ListView lv_content;
private PtrFrameLayout store_house_ptr_frame;
private LoadMoreListViewContainer load_more_list_view_container;
private ListView lv_content;
ThxZanListAdapter adapter;
int page = 1;
......@@ -223,7 +217,7 @@ public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreH
@Override
protected void initDataAndEvent() {
ButterKnife.bind(this);
bindView();
listNum = getIntent().getIntExtra("listNum", 0);
answerId = getIntent().getIntExtra("answerId", 0);
......@@ -238,6 +232,11 @@ public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreH
EventBus.getDefault().register(this);
}
private void bindView() {
store_house_ptr_frame = findViewById(R.id.store_house_ptr_frame);
load_more_list_view_container = findViewById(R.id.load_more_list_view_container);
lv_content = findViewById(R.id.lv_content);
}
class ISLoadMoreFooterView extends RelativeLayout
implements LoadMoreUIHandler {
......
......@@ -8,43 +8,30 @@ import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.thank.ThxStarMoney;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* 感谢的选择器
* Created by softrice on 15/12/3.
*/
public class ThxSelectView extends LinearLayout {
@BindView(R2.id.ll_left)
LinearLayout ll_left;
@BindView(R2.id.tv_left_up)
TextView tv_left_up;
@BindView(R2.id.tv_left_down)
TextView tv_left_down;
@BindView(R2.id.ll_center)
LinearLayout ll_center;
@BindView(R2.id.tv_center_up)
TextView tv_center_up;
@BindView(R2.id.tv_center_down)
TextView tv_center_down;
@BindView(R2.id.ll_right)
LinearLayout ll_right;
@BindView(R2.id.tv_right_up)
TextView tv_right_up;
@BindView(R2.id.tv_right_down)
TextView tv_right_down;
private LinearLayout ll_left;
private TextView tv_left_up;
private TextView tv_left_down;
private LinearLayout ll_center;
private TextView tv_center_up;
private TextView tv_center_down;
private LinearLayout ll_right;
private TextView tv_right_up;
private TextView tv_right_down;
int selectId = -1;
......@@ -56,14 +43,14 @@ public class ThxSelectView extends LinearLayout {
public ThxSelectView(Context context) {
super(context);
inflate(context, R.layout.dynamic_ui_thx_select, this);
ButterKnife.bind(this);
bindView(this);
}
public ThxSelectView(Context context, AttributeSet attrs) {
super(context, attrs);
inflate(context, R.layout.dynamic_ui_thx_select, this);
ButterKnife.bind(this);
bindView(this);
}
public void select(int position) {
......@@ -131,8 +118,7 @@ public class ThxSelectView extends LinearLayout {
}
@OnClick({R2.id.ll_left, R2.id.ll_center, R2.id.ll_right})
void click(View view) {
private void click(@NonNull View view) {
if (view.getId() == R.id.ll_left) {
select(0);
} else if (view.getId() == R.id.ll_center) {
......@@ -158,4 +144,25 @@ public class ThxSelectView extends LinearLayout {
tv_right_up.setText("×" + star_money.get(2).star_num);
}
}
private void bindView(View bindSource) {
ll_left = bindSource.findViewById(R.id.ll_left);
tv_left_up = bindSource.findViewById(R.id.tv_left_up);
tv_left_down = bindSource.findViewById(R.id.tv_left_down);
ll_center = bindSource.findViewById(R.id.ll_center);
tv_center_up = bindSource.findViewById(R.id.tv_center_up);
tv_center_down = bindSource.findViewById(R.id.tv_center_down);
ll_right = bindSource.findViewById(R.id.ll_right);
tv_right_up = bindSource.findViewById(R.id.tv_right_up);
tv_right_down = bindSource.findViewById(R.id.tv_right_down);
ll_left.setOnClickListener(v -> {
click(v);
});
ll_center.setOnClickListener(v -> {
click(v);
});
ll_right.setOnClickListener(v -> {
click(v);
});
}
}
package com.yidianling.dynamic.thank.view;
import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
......@@ -8,34 +9,25 @@ import android.widget.TextView;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydl_image.transform.GlideCircleTransform;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.thank.data.ThxZan;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 感谢回复
* Created by softrice on 15/12/3.
*/
public class ZanReplyListItemView extends LinearLayout {
@BindView(R2.id.sdv_head)
ImageView sdv_head;
@BindView(R2.id.tv_zan_num)
TextView tv_zan_num;
@BindView(R2.id.tv_name)
TextView tv_name;
@BindView(R2.id.tv_time)
TextView tv_time;
@BindView(R2.id.tv_content)
TextView tv_content;
private ImageView sdv_head;
private TextView tv_zan_num;
private TextView tv_name;
private TextView tv_time;
private TextView tv_content;
public ZanReplyListItemView(Context context) {
super(context);
inflate(context,R.layout.dynamic_ui_zan_reply_list,this);
ButterKnife.bind(this);
bindView(this);
}
......@@ -57,4 +49,11 @@ public class ZanReplyListItemView extends LinearLayout {
}
private void bindView(View bindSource) {
sdv_head = bindSource.findViewById(R.id.sdv_head);
tv_zan_num = bindSource.findViewById(R.id.tv_zan_num);
tv_name = bindSource.findViewById(R.id.tv_name);
tv_time = bindSource.findViewById(R.id.tv_time);
tv_content = bindSource.findViewById(R.id.tv_content);
}
}
......@@ -44,7 +44,6 @@ import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.yidianling.common.tools.LogUtil;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.adapter.TopicDetailMemberAdapter;
import com.yidianling.dynamic.model.Focus;
import com.yidianling.dynamic.model.TopicDetailBean;
......@@ -53,11 +52,6 @@ import com.yidianling.dynamic.router.DynamicIn;
import com.yidianling.dynamic.trendList.TrendListInFragment;
import com.yidianling.dynamic.trendList.adapter.RecommendTopAdapter;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* 话题详情页
* Refactor by Jim on 2017/12/27 0027.
......@@ -65,67 +59,36 @@ import butterknife.OnClick;
@Route(path = "/topic/detail")
public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicDetailPresenterImpl> implements SwipeRefreshLayout.OnRefreshListener, TopicDetailView {
@BindView(R2.id.topic_detail_top_bg_iv)
ImageView mTopicDetailTopBgIv;
@BindView(R2.id.topic_detail_title_tv)
TextView mTopicDetailTitleTv;
@BindView(R2.id.topic_detail_survey_tv)
TextView mTopicDetailSurveyTv;
@BindView(R2.id.topic_detail_visit_num_tv)
TextView mTopicDetailVisitNumTv;
@BindView(R2.id.topic_detail_visit_zj_tv)
TextView mTopicDetailVisitZjTv;
@BindView(R2.id.topic_detail_trend_num_tv)
TextView mTopicDetailTrendNumTv;
@BindView(R2.id.topic_detail_focus_tv)
TextView mTopicDetailFocusTv;
@BindView(R2.id.topic_detail_users_num_tv)
TextView mTopicDetailUsersNumTv;
@BindView(R2.id.topic_detail_users_rcv)
RecyclerView mTopicDetailUsersRcv;
@BindView(R2.id.topic_detail_users_rel)
RelativeLayout mTopicDetailUsersRel;
@BindView(R2.id.topic_detail_top_rel)
RelativeLayout mTopicDetailTopRel;
@BindView(R2.id.item_topic_detail_new_tv)
TextView mItemTopicDetailNewTv;
@BindView(R2.id.item_topic_detail_new_hint_tv)
View mItemTopicDetailNewHintTv;
@BindView(R2.id.item_topic_detail_new_rel)
RelativeLayout mItemTopicDetailNewRel;
@BindView(R2.id.item_topic_detail_hot_tv)
TextView mItemTopicDetailHotTv;
@BindView(R2.id.item_topic_detail_hot_hint_tv)
View mItemTopicDetailHotHintTv;
@BindView(R2.id.item_topic_detail_hot_rel)
RelativeLayout mItemTopicDetailHotRel;
@BindView(R2.id.topic_detail_type_lin)
LinearLayout mTopicDetailTypeLin;
@BindView(R2.id.app_bar)
AppBarLayout mAppBar;
@BindView(R2.id.topic_detail_vp)
ViewPager mTopicDetailVp;
@BindView(R2.id.swl)
SwipeRefreshLayout mSwl;
@BindView(R2.id.toolbar)
Toolbar mToolbar;
@BindView(R2.id.collapsingToolbarLayout)
CollapsingToolbarLayout collapsingToolbarLayout;
@BindView(R2.id.mine_next_iv)
ImageView mMineNextIv;
@BindView(R2.id.topic_detail_title_back_iv)
ImageView mTopicDetailTitleBackIv;
@BindView(R2.id.topic_detail_title_top_right_tv)
ImageView mTopicDetailTitleTopRightTv;
@BindView(R2.id.publish_trend_btn)
FloatingActionButton mPublishTrendBtn;
@BindView(R2.id.top_trends_rcv)
RecyclerView topTrendsRcv;
@BindView(R2.id.divide_line)
View divideLine;
@BindView(R2.id.v_loading)
LogoLoadingView vLoading;
private ImageView mTopicDetailTopBgIv;
private TextView mTopicDetailTitleTv;
private TextView mTopicDetailSurveyTv;
private TextView mTopicDetailVisitNumTv;
private TextView mTopicDetailVisitZjTv;
private TextView mTopicDetailTrendNumTv;
private TextView mTopicDetailFocusTv;
private TextView mTopicDetailUsersNumTv;
private RecyclerView mTopicDetailUsersRcv;
private RelativeLayout mTopicDetailUsersRel;
private RelativeLayout mTopicDetailTopRel;
private TextView mItemTopicDetailNewTv;
private View mItemTopicDetailNewHintTv;
private RelativeLayout mItemTopicDetailNewRel;
private TextView mItemTopicDetailHotTv;
private View mItemTopicDetailHotHintTv;
private RelativeLayout mItemTopicDetailHotRel;
private LinearLayout mTopicDetailTypeLin;
private AppBarLayout mAppBar;
private ViewPager mTopicDetailVp;
private SwipeRefreshLayout mSwl;
private Toolbar mToolbar;
private CollapsingToolbarLayout collapsingToolbarLayout;
private ImageView mMineNextIv;
private ImageView mTopicDetailTitleBackIv;
private ImageView mTopicDetailTitleTopRightTv;
private FloatingActionButton mPublishTrendBtn;
private RecyclerView topTrendsRcv;
private View divideLine;
private LogoLoadingView vLoading;
private TopicDetailMemberAdapter adapter;
......@@ -151,7 +114,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dynamic_activity_topic_detail);
ButterKnife.bind(this);
bindView();
initDatas();
initViews();
fetchDatas();
......@@ -336,9 +299,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD
}
@OnClick({R2.id.item_topic_detail_new_rel, R2.id.item_topic_detail_hot_rel, R2.id.publish_trend_btn, R2.id.topic_detail_focus_tv,
R2.id.topic_detail_users_rel, R2.id.topic_detail_title_top_right_tv, R2.id.topic_detail_title_back_iv})
void doClick(View view) {
private void doClick(View view) {
if (view.getId() == R.id.item_topic_detail_new_rel) {
mTopicDetailVp.setCurrentItem(0);
setTabSelection(0);
......@@ -596,4 +557,58 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD
protected void initDataAndEvent() {
}
private void bindView() {
mTopicDetailTopBgIv = findViewById(R.id.topic_detail_top_bg_iv);
mTopicDetailTitleTv = findViewById(R.id.topic_detail_title_tv);
mTopicDetailSurveyTv = findViewById(R.id.topic_detail_survey_tv);
mTopicDetailVisitNumTv = findViewById(R.id.topic_detail_visit_num_tv);
mTopicDetailVisitZjTv = findViewById(R.id.topic_detail_visit_zj_tv);
mTopicDetailTrendNumTv = findViewById(R.id.topic_detail_trend_num_tv);
mTopicDetailFocusTv = findViewById(R.id.topic_detail_focus_tv);
mTopicDetailUsersNumTv = findViewById(R.id.topic_detail_users_num_tv);
mTopicDetailUsersRcv = findViewById(R.id.topic_detail_users_rcv);
mTopicDetailUsersRel = findViewById(R.id.topic_detail_users_rel);
mTopicDetailTopRel = findViewById(R.id.topic_detail_top_rel);
mItemTopicDetailNewTv = findViewById(R.id.item_topic_detail_new_tv);
mItemTopicDetailNewHintTv = findViewById(R.id.item_topic_detail_new_hint_tv);
mItemTopicDetailNewRel = findViewById(R.id.item_topic_detail_new_rel);
mItemTopicDetailHotTv = findViewById(R.id.item_topic_detail_hot_tv);
mItemTopicDetailHotHintTv = findViewById(R.id.item_topic_detail_hot_hint_tv);
mItemTopicDetailHotRel = findViewById(R.id.item_topic_detail_hot_rel);
mTopicDetailTypeLin = findViewById(R.id.topic_detail_type_lin);
mAppBar = findViewById(R.id.app_bar);
mTopicDetailVp = findViewById(R.id.topic_detail_vp);
mSwl = findViewById(R.id.swl);
mToolbar = findViewById(R.id.toolbar);
collapsingToolbarLayout = findViewById(R.id.collapsingToolbarLayout);
mMineNextIv = findViewById(R.id.mine_next_iv);
mTopicDetailTitleBackIv = findViewById(R.id.topic_detail_title_back_iv);
mTopicDetailTitleTopRightTv = findViewById(R.id.topic_detail_title_top_right_tv);
mPublishTrendBtn = findViewById(R.id.publish_trend_btn);
topTrendsRcv = findViewById(R.id.top_trends_rcv);
divideLine = findViewById(R.id.divide_line);
vLoading = findViewById(R.id.v_loading);
mItemTopicDetailNewRel.setOnClickListener(v -> {
doClick(v);
});
mItemTopicDetailHotRel.setOnClickListener(v -> {
doClick(v);
});
mPublishTrendBtn.setOnClickListener(v -> {
doClick(v);
});
mTopicDetailFocusTv.setOnClickListener(v -> {
doClick(v);
});
mTopicDetailUsersRel.setOnClickListener(v -> {
doClick(v);
});
mTopicDetailTitleTopRightTv.setOnClickListener(v -> {
doClick(v);
});
mTopicDetailTitleBackIv.setOnClickListener(v -> {
doClick(v);
});
}
}
\ No newline at end of file
......@@ -7,9 +7,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/**
* Created by Jim on 2017/9/25 0025.
*/
......@@ -18,7 +15,6 @@ public abstract class BaseLazyFragment extends Fragment {
protected boolean isVisible;
protected boolean isUseLazyMode=true;
private Unbinder mUnBinder;
@Nullable
......@@ -31,7 +27,6 @@ public abstract class BaseLazyFragment extends Fragment {
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mUnBinder = ButterKnife.bind(this, view);
afterViewCreated(savedInstanceState);
}
......@@ -68,9 +63,4 @@ public abstract class BaseLazyFragment extends Fragment {
public abstract void lazyLoad();
@Override
public void onDestroyView() {
super.onDestroyView();
mUnBinder.unbind();
}
}
......@@ -24,7 +24,6 @@ import com.yidianling.common.tools.LogUtil;
import com.yidianling.dynamic.DynamicFragment;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.members.MembersActivity;
import com.yidianling.dynamic.model.Command;
......@@ -37,7 +36,7 @@ import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter;
import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity;
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.utils.BuryPointUtils;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager;
......@@ -45,9 +44,6 @@ import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
......@@ -60,15 +56,10 @@ import io.reactivex.schedulers.Schedulers;
public class TrendListInFragment extends DynamicFragment implements ITrendsListView {
Context context;
@BindView(R2.id.recommend_dynamic_rcv)
RecyclerView trendsRcv;
@BindView(R2.id.trend_no_data_iv)
ImageView mTrendNoDataIv;
@BindView(R2.id.trend_no_data_tv)
TextView mTrendNoDataTv;
@BindView(R2.id.trend_no_data_rel)
NestedScrollView mTrendNoDataRel;
Unbinder unbinder;
private RecyclerView trendsRcv;
private ImageView mTrendNoDataIv;
private TextView mTrendNoDataTv;
private NestedScrollView mTrendNoDataRel;
int totalItemCount, lastVisibleItem, visibleItemCount, firstVisibleItem;
private List<TrendsListBean.Trend> trendsDatas;
......@@ -113,7 +104,7 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dynamic_fragment_trend_list_in, container, false);
unbinder = ButterKnife.bind(this, view);
bindView(view);
initFileds();
initView();
fetchDatas();
......@@ -397,9 +388,6 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV
@Override
public void onDestroyView() {
super.onDestroyView();
if (unbinder != null) {
unbinder.unbind();
}
if (mHandler != null) {
mHandler.removeCallbacksAndMessages(null);
}
......@@ -536,4 +524,11 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV
mPresenter.onDestroy();
}
}
private void bindView(View bindSource) {
trendsRcv = bindSource.findViewById(R.id.recommend_dynamic_rcv);
mTrendNoDataIv = bindSource.findViewById(R.id.trend_no_data_iv);
mTrendNoDataTv = bindSource.findViewById(R.id.trend_no_data_tv);
mTrendNoDataRel = bindSource.findViewById(R.id.trend_no_data_rel);
}
}
......@@ -24,7 +24,6 @@ import android.text.Html;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.style.ImageSpan;
import android.util.EventLog;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
......@@ -69,11 +68,9 @@ import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity2;
import com.yidianling.dynamic.common.emoji.EmoticonPickerView;
import com.yidianling.dynamic.common.emoji.IEmoticonSelectedListener;
import com.yidianling.dynamic.event.LoginStateEvent;
import com.yidianling.dynamic.event.dynamicFocusEvent;
import com.yidianling.dynamic.members.MembersActivity;
import com.yidianling.dynamic.model.CommentBean;
......@@ -95,9 +92,6 @@ import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.TimeUnit;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import de.greenrobot.event.EventBus;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
......@@ -114,125 +108,85 @@ import static android.view.View.VISIBLE;
@Route(path = "/trends/detail")
public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITrendsDetailPresenterImpl> implements ITrendsDetailView, IEmoticonSelectedListener, SwipeRefreshLayout.OnRefreshListener, MyScrollview.ScrollViewListener {
@BindView(R2.id.item_trend_info_title)
TextView tvTrendInfoTitle;
private TextView tvTrendInfoTitle;
@BindView(R2.id.text_userName)
TextView tvUserName;
private TextView tvUserName;
@BindView(R2.id.item_recommend_trend_user_head_iv)
ImageView ivUserHead;
private ImageView ivUserHead;
@BindView(R2.id.img_sex)
ImageView ivSex;
private ImageView ivSex;
@BindView(R2.id.text_time)
TextView tvTime;
private TextView tvTime;
@BindView(R2.id.item_recommend_from)
TextView tvFrom;
private TextView tvFrom;
@BindView(R2.id.text_guanzhu)
TextView tvGuanzhu;
private TextView tvGuanzhu;
@BindView(R2.id.text_content)
TextView tvContent;
private TextView tvContent;
@BindView(R2.id.recy_ico_list)
RecyclerView rcvZanListImag;
private RecyclerView rcvZanListImag;
@BindView(R2.id.item_recommend_trend_ad_rel)
RelativeLayout relTrendAd;
private RelativeLayout relTrendAd;
@BindView(R2.id.item_recommend_trend_ad_iv)
ImageView ivAd;
private ImageView ivAd;
@BindView(R2.id.item_recommend_trend_ad_tv)
TextView tvAdTitle;
private TextView tvAdTitle;
@BindView(R2.id.text_huati)
TextView tvHuati;
private TextView tvHuati;
@BindView(R2.id.item_recommend_trend_readed_tv)
TextView tvReadNum;
private TextView tvReadNum;
@BindView(R2.id.item_recommend_trend_zannum_tv)
TextView tvZanNum;
private TextView tvZanNum;
@BindView(R2.id.text_talk_num)
TextView tvCommentNum;
private TextView tvCommentNum;
@BindView(R2.id.talk_recyView)
RecyclerViewForScrollView rcvCommentsList;
private RecyclerViewForScrollView rcvCommentsList;
@BindView(R2.id.lin_nullTip)
LinearLayout linNullTip;
private LinearLayout linNullTip;
@BindView(R2.id.lin_content)
LinearLayout linContent;
private LinearLayout linContent;
@BindView(R2.id.trend_detail_swl)
SwipeRefreshLayout swl;
private SwipeRefreshLayout swl;
@BindView(R2.id.rela_nullTip)
RelativeLayout relNotExist;
private RelativeLayout relNotExist;
@BindView(R2.id.img_more)
ImageView ivZanListMore;
private ImageView ivZanListMore;
@BindView(R2.id.list_img)
RecyclerViewForScrollView rcvContentImags;
private RecyclerViewForScrollView rcvContentImags;
@BindView(R2.id.lin_zan_list1)
LinearLayout linZanList;
private LinearLayout linZanList;
@BindView(R2.id.lin_comment)
LinearLayout linComment;
private LinearLayout linComment;
@BindView(R2.id.img_wennuan)
ImageView ivLike;
private ImageView ivLike;
@BindView(R2.id.edit_content)
EditText edCommentContent;
private EditText edCommentContent;
@BindView(R2.id.trend_disscuss_send_lin)
LinearLayout linCommentSend;
private LinearLayout linCommentSend;
@BindView(R2.id.trend_disscuss_bottom_img_lin)
LinearLayout linBottomLikeShare;
private LinearLayout linBottomLikeShare;
@BindView(R2.id.emoticon_picker_view)
EmoticonPickerView mEmoticonPickerView;
private EmoticonPickerView mEmoticonPickerView;
@BindView(R2.id.publish_emoji_iv)
ImageView ivChooseEmoji;
private ImageView ivChooseEmoji;
@BindView(R2.id.myScrollView)
MyScrollview myScrollView;
private MyScrollview myScrollView;
@BindView(R2.id.text_show_all)
TextView tvShowAllComment;
private TextView tvShowAllComment;
@BindView(R2.id.fl_ads)
FrameLayout flAds;
private FrameLayout flAds;
@BindView(R2.id.vp_ads)
ViewPager vpAds;
private ViewPager vpAds;
@BindView(R2.id.circle_indicator)
CircleIndicator circleIndicator;
private CircleIndicator circleIndicator;
@BindView(R2.id.tv_no_comments)
TextView tvNoComments;
private TextView tvNoComments;
@BindView(R2.id.iv_fm)
ImageView iv_fm;
private ImageView iv_fm;
@BindView(R2.id.ll_has_load)
LinearLayout llHasLoad;
private LinearLayout llHasLoad;
@BindView(R2.id.v_loading)
LogoLoadingView vLoading;
private LogoLoadingView vLoading;
private boolean isFirstLoad = true;
......@@ -380,7 +334,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
super.onCreate(savedInstanceState);
EventBus.getDefault().register(this);
setContentView(R.layout.dynamic_activity_trend_details);
ButterKnife.bind(this);
bindView();
initDatas();
initViews();
onRefresh();
......@@ -748,6 +702,86 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
}
private void bindView() {
tvTrendInfoTitle = findViewById(R.id.item_trend_info_title);
tvUserName = findViewById(R.id.text_userName);
ivUserHead = findViewById(R.id.item_recommend_trend_user_head_iv);
ivSex = findViewById(R.id.img_sex);
tvTime = findViewById(R.id.text_time);
tvFrom = findViewById(R.id.item_recommend_from);
tvGuanzhu = findViewById(R.id.text_guanzhu);
tvContent = findViewById(R.id.text_content);
rcvZanListImag = findViewById(R.id.recy_ico_list);
relTrendAd = findViewById(R.id.item_recommend_trend_ad_rel);
ivAd = findViewById(R.id.item_recommend_trend_ad_iv);
tvAdTitle = findViewById(R.id.item_recommend_trend_ad_tv);
tvHuati = findViewById(R.id.text_huati);
tvReadNum = findViewById(R.id.item_recommend_trend_readed_tv);
tvZanNum = findViewById(R.id.item_recommend_trend_zannum_tv);
tvCommentNum = findViewById(R.id.text_talk_num);
rcvCommentsList = findViewById(R.id.talk_recyView);
linNullTip = findViewById(R.id.lin_nullTip);
linContent = findViewById(R.id.lin_content);
swl = findViewById(R.id.trend_detail_swl);
relNotExist = findViewById(R.id.rela_nullTip);
ivZanListMore = findViewById(R.id.img_more);
rcvContentImags = findViewById(R.id.list_img);
linZanList = findViewById(R.id.lin_zan_list1);
linComment = findViewById(R.id.lin_comment);
ivLike = findViewById(R.id.img_wennuan);
edCommentContent = findViewById(R.id.edit_content);
linCommentSend = findViewById(R.id.trend_disscuss_send_lin);
linBottomLikeShare = findViewById(R.id.trend_disscuss_bottom_img_lin);
mEmoticonPickerView = findViewById(R.id.emoticon_picker_view);
ivChooseEmoji = findViewById(R.id.publish_emoji_iv);
myScrollView = findViewById(R.id.myScrollView);
tvShowAllComment = findViewById(R.id.text_show_all);
flAds = findViewById(R.id.fl_ads);
vpAds = findViewById(R.id.vp_ads);
circleIndicator = findViewById(R.id.circle_indicator);
tvNoComments = findViewById(R.id.tv_no_comments);
iv_fm = findViewById(R.id.iv_fm);
llHasLoad = findViewById(R.id.ll_has_load);
vLoading = findViewById(R.id.v_loading);
View mTrendDisscussSendTv = findViewById(R.id.trend_disscuss_send_tv);
View mImageBack = findViewById(R.id.image_back);
View mImageRight = findViewById(R.id.image_right);
View mImgShare = findViewById(R.id.img_share);
relTrendAd.setOnClickListener(v -> {
doClick(v);
});
ivChooseEmoji.setOnClickListener(v -> {
doClick(v);
});
mTrendDisscussSendTv.setOnClickListener(v -> {
doClick(v);
});
mImageBack.setOnClickListener(v -> {
doClick(v);
});
ivLike.setOnClickListener(v -> {
doClick(v);
});
mImageRight.setOnClickListener(v -> {
doClick(v);
});
mImgShare.setOnClickListener(v -> {
doClick(v);
});
ivUserHead.setOnClickListener(v -> {
doClick(v);
});
tvHuati.setOnClickListener(v -> {
doClick(v);
});
tvGuanzhu.setOnClickListener(v -> {
doClick(v);
});
linZanList.setOnClickListener(v -> {
doClick(v);
});
}
private interface ItemLikeActionCallBack {
void callBack(int result);
}
......@@ -1108,8 +1142,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
}
@OnClick({R2.id.item_recommend_trend_ad_rel, R2.id.publish_emoji_iv, R2.id.trend_disscuss_send_tv, R2.id.image_back, R2.id.img_wennuan, R2.id.image_right, R2.id.img_share, R2.id.item_recommend_trend_user_head_iv, R2.id.text_huati, R2.id.text_guanzhu, R2.id.lin_zan_list1})
public void doClick(View v) {
private void doClick(View v) {
if (v.getId() == R.id.trend_disscuss_send_tv) {
LogUtil.d("click send comment");
if (DynamicIn.INSTANCE.loginByOneKeyLogin(TrendsDetailActivity.this,true)) {
......
......@@ -4,18 +4,14 @@ import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
......@@ -25,13 +21,11 @@ import com.alibaba.android.arouter.facade.annotation.Route;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.base.BaseFragment;
import com.ydl.ydlcommon.utils.BuryPointUtils;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.ScreenUtil;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.yidianling.common.tools.RxDeviceTool;
import com.yidianling.common.tools.RxImageTool;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.common.view.LooperTextView;
import com.yidianling.dynamic.dialog.TrendsAndQuestionDialog;
......@@ -47,10 +41,6 @@ import com.yidianling.dynamic.trendsHome.view.TrendsHomeBannerView;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
import static com.yidianling.dynamic.bean.DynamicConstants.YDL_USER_ASK_PAGE_STAY_VISIT;
......@@ -67,62 +57,39 @@ import static com.yidianling.dynamic.bean.DynamicConstants.YDL_USER_THOUGHTS_GRO
@Route(path = "/dynamic/dynamic")
public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView, SwipeRefreshLayout.OnRefreshListener {
@BindView(R2.id.trend_home_swl)
SwipeRefreshLayout swl;
@BindView(R2.id.vp_content)
ViewPager vpContent;
@BindView(R2.id.trends_topic_iv1)
ImageView topicRoundIv1;
@BindView(R2.id.trends_topic_iv2)
ImageView topicRoundIv2;
@BindView(R2.id.trends_topic_iv3)
ImageView topicRoundIv3;
@BindView(R2.id.trends_home_csl)
ConstraintLayout mConstraintLayout;
@BindView(R2.id.trends_tv_mind_group)
TextView tvMindGroup;
@BindView(R2.id.trends_tv_mind_more)
TextView tvMindMore;
@BindView(R2.id.frl_topic_iv3)
FrameLayout frlTopicIv3;
@BindView(R2.id.frl_topic_iv2)
FrameLayout frlTopicIv2;
@BindView(R2.id.frl_topic_iv1)
FrameLayout frlTopicIv1;
@BindView(R2.id.trends_home_appBar)
AppBarLayout mAppBarLayout;
@BindView(R2.id.item_recommend_tv)
TextView mItemRecommendTv;
@BindView(R2.id.item_hot_tv)
TextView mItemHotTv;
@BindView(R2.id.item_focus_tv)
TextView mItemFocusTv;
@BindView(R2.id.trends_topic_tv3)
TextView trendsTopicTv3;
@BindView(R2.id.trends_topic_tv2)
TextView trendsTopicTv2;
@BindView(R2.id.trends_topic_tv1)
TextView trendsTopicTv1;
@BindView(R2.id.publish_trend_btn)
FloatingActionButton mPublishTrendButton;
@BindView(R2.id.ternd_loop_tv)
LooperTextView mLooperTextView;
@BindView(R2.id.toolbar_tv)
Toolbar mToolBarTv;
@BindView(R2.id.v_banner)
TrendsHomeBannerView v_banner;
private Unbinder mUnbinder;
private SwipeRefreshLayout swl;
private ViewPager vpContent;
private ImageView topicRoundIv1;
private ImageView topicRoundIv2;
private ImageView topicRoundIv3;
private ConstraintLayout mConstraintLayout;
private TextView tvMindGroup;
private TextView tvMindMore;
private FrameLayout frlTopicIv3;
private FrameLayout frlTopicIv2;
private FrameLayout frlTopicIv1;
private AppBarLayout mAppBarLayout;
private TextView mItemRecommendTv;
private TextView mItemHotTv;
private TextView mItemFocusTv;
private TextView trendsTopicTv3;
private TextView trendsTopicTv2;
private TextView trendsTopicTv1;
private FloatingActionButton mPublishTrendButton;
private LooperTextView mLooperTextView;
private Toolbar mToolBarTv;
private TrendsHomeBannerView v_banner;
private TrendsHomePresenter mPresenter;
private Fragment[] mFragments;
private TrendsHomeVpAdapter vpAdapter;
......@@ -150,7 +117,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
@Override
public void initDataAndEvent() {
mUnbinder = ButterKnife.bind(this, getView());
bindView(getView());
initViews();
initDatas();
......@@ -342,8 +309,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
}
@OnClick({R2.id.trends_tv_mind_more, R2.id.publish_trend_btn, R2.id.item_recommend_tv, R2.id.item_hot_tv, R2.id.item_focus_tv})
public void doClick(View view) {
private void doClick(View view) {
if (view.getId() == R.id.item_recommend_tv) {
ActionCountUtils.Companion.count(YDL_USER_ASK_TYPE_CLICK, "推荐");
vpContent.setCurrentItem(1);
......@@ -418,13 +384,6 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
}
@Override
public void onDestroyView() {
super.onDestroyView();
mUnbinder.unbind();
}
@Override
public void onRefresh() {
swl.setRefreshing(true);
new Handler().postDelayed(new Runnable() {
......@@ -501,4 +460,44 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
public void setGoneLooperTextView() {
mLooperTextView.setVisibility(View.GONE);
}
private void bindView(View bindSource) {
swl = bindSource.findViewById(R.id.trend_home_swl);
vpContent = bindSource.findViewById(R.id.vp_content);
topicRoundIv1 = bindSource.findViewById(R.id.trends_topic_iv1);
topicRoundIv2 = bindSource.findViewById(R.id.trends_topic_iv2);
topicRoundIv3 = bindSource.findViewById(R.id.trends_topic_iv3);
mConstraintLayout = bindSource.findViewById(R.id.trends_home_csl);
tvMindGroup = bindSource.findViewById(R.id.trends_tv_mind_group);
tvMindMore = bindSource.findViewById(R.id.trends_tv_mind_more);
frlTopicIv3 = bindSource.findViewById(R.id.frl_topic_iv3);
frlTopicIv2 = bindSource.findViewById(R.id.frl_topic_iv2);
frlTopicIv1 = bindSource.findViewById(R.id.frl_topic_iv1);
mAppBarLayout = bindSource.findViewById(R.id.trends_home_appBar);
mItemRecommendTv = bindSource.findViewById(R.id.item_recommend_tv);
mItemHotTv = bindSource.findViewById(R.id.item_hot_tv);
mItemFocusTv = bindSource.findViewById(R.id.item_focus_tv);
trendsTopicTv3 = bindSource.findViewById(R.id.trends_topic_tv3);
trendsTopicTv2 = bindSource.findViewById(R.id.trends_topic_tv2);
trendsTopicTv1 = bindSource.findViewById(R.id.trends_topic_tv1);
mPublishTrendButton = bindSource.findViewById(R.id.publish_trend_btn);
mLooperTextView = bindSource.findViewById(R.id.ternd_loop_tv);
mToolBarTv = bindSource.findViewById(R.id.toolbar_tv);
v_banner = bindSource.findViewById(R.id.v_banner);
tvMindMore.setOnClickListener(v -> {
doClick(v);
});
mPublishTrendButton.setOnClickListener(v -> {
doClick(v);
});
mItemRecommendTv.setOnClickListener(v -> {
doClick(v);
});
mItemHotTv.setOnClickListener(v -> {
doClick(v);
});
mItemFocusTv.setOnClickListener(v -> {
doClick(v);
});
}
}
......@@ -16,13 +16,9 @@ import com.yidianling.fm.response.FM;
*/
public class FMListItemView extends LinearLayout {
// @BindView(R.id.sdv_head)
private ImageView sdv_head;
// @BindView(R.id.tv_title)
private TextView tv_title;
// @BindView(R.id.tv_anchor)
private TextView tv_anchor;
// @BindView(R.id.tv_listen_num)
private TextView tv_listen_num;
public FMListItemView(Context context) {
......
......@@ -39,11 +39,8 @@ public class FMListViewFragment extends BaseFragment implements PtrHandler, Load
int tagId;
// @BindView(R.id.lv_content)
private ListView lv_content;
// @BindView(R.id.load_more_list_view_container)
private LoadMoreListViewContainer load_more_list_view_container;
// @BindView(R.id.store_house_ptr_frame)
private PtrFrameLayout store_house_ptr_frame;
private TextView ll_empty_txt;
......
......@@ -13,11 +13,8 @@ import com.yidianling.im.bean.MsgData;
*/
public class MsgListItemView extends LinearLayout {
// @BindView(R.id.tv_content)
TextView tv_content;
// @BindView(R.id.tv_time)
TextView tv_time;
// @BindView(R.id.title)
TextView title;
private int type = 0;
......
......@@ -36,17 +36,12 @@ import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
*/
public class SystemItemView extends LinearLayout {
// @BindView(R.id.banner)
ImageView banner;
// @BindView(R.id.content)
TextView content;
// @BindView(R.id.recycler_list)
RecyclerView recycler_list;
// //列表适配器
private BaseRecyclerAdapter<SystemMsgBean.SystemMBean> adapter;
// @BindView(R.id.time)
TextView time;
// @BindView(R.id.rela_body)
RelativeLayout rela_body;
Context context;
......
......@@ -31,6 +31,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.SPUtils;
......@@ -73,6 +74,8 @@ import com.yidianling.uikit.custom.widget.SafeHelpRemindDialog;
import com.yidianling.user.api.service.IUserService;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -649,12 +652,25 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
fillHwPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue());
fillOppoPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue());
fillVivoPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue());
payload.put("sessionId", NimUIKit.getAccount());
payload.put("sessionType", container.sessionType.getValue());
fillApnsPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue());
msg.setPushPayload(payload);
return msg;
}
private void fillApnsPayload(Map<String, Object> pushPayload, String sessionId, int sessionType) {
try {
Map<String, Object> apns = new HashMap<>();
apns.put("toUid", sessionId);
apns.put("sessionType", sessionType);
apns.put("chatType", 1);
String json = JSON.toJSONString(apns);
String encode = URLEncoder.encode(json, "UTF-8");
String finalUrl = "ydl-user://chat/private?params=" + encode;
pushPayload.put("route_ios", finalUrl);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
private void fillHwPayload(Map<String, Object> pushPayload, String sessionId, int sessionType) {
//华为
Intent hwIntent = new Intent(Intent.ACTION_VIEW);
......
......@@ -55,15 +55,10 @@ public class AccountHistoryActivity extends BaseActivity implements PtrHandler,
private String available = "0.00";
LoadMoreFooterView loadMoreFooterView;
// @BindView(R.id.title_bar)
TitleBar title_bar;
// @BindView(R.id.lv_content)
ListView lv_content;
// @BindView(R.id.ll_empty)
LinearLayout ll_empty;
// @BindView(R.id.load_more_list_view_container)
LoadMoreListViewContainer load_more_list_view_container;
// @BindView(R.id.store_house_ptr_frame)
PtrFrameLayout store_house_ptr_frame;
@NotNull
......
......@@ -24,14 +24,10 @@ import org.jetbrains.annotations.NotNull;
*/
public class ContactCustomerServiceActivity extends BaseActivity {
// @BindView(R.id.tb_title)
TitleBar tb_title;
// @BindView(R.id.jtv_custom_service)
JumpTextView jtv_custom_service;
// @BindView(R.id.jtv_wechat)
JumpTextView jtv_wechat;
// @BindView(R.id.tv_service_time)
TextView tvServiceTime;
String work_time = PlatformDataManager.INSTANCE.getRam().getGlobalInfo() == null ? "早8:30-凌晨2:00" : PlatformDataManager.INSTANCE.getRam().getGlobalInfo().info.work_time;
......
......@@ -17,11 +17,8 @@ import org.jetbrains.annotations.NotNull;
public class HelpActivity extends BaseActivity implements View.OnClickListener {
// @BindView(R.id.jtv_about_us)
JumpTextView jtv_about_us;
// @BindView(R.id.jtv_feed_back)
JumpTextView jtv_feed_back;
// @BindView(R.id.jtv_custom_service)
JumpTextView jtv_custom_service;
@Override
......
......@@ -32,15 +32,10 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
public class PersonalDesActivity extends BaseActivity {
// @BindView(R.id.image_back)
ImageView imageBack;
// @BindView(R.id.tv_center_title)
TextView tvCenterTitle;
// @BindView(R.id.text_save)
TextView textSave;
// @BindView(R.id.rela_toolBar)
RelativeLayout relaToolBar;
// @BindView(R.id.edit_des)
EditText editDes;
@NotNull
@Override
......
......@@ -26,9 +26,7 @@ import io.reactivex.functions.Consumer;
*/
public class PwdCheckActivity extends BaseActivity {
// @BindView(R.id.check_password)
EditText check_password;
// @BindView(R.id.change_next)
RoundCornerButton change_next;
@NotNull
......
......@@ -48,15 +48,10 @@ public class RechargeActivity extends BaseActivity {
return new StatusBarOptions(true,true);
}
// @BindView(R.id.recharge_rgv)
RechargeGridView recharge_rgv;
// @BindView(R.id.recharge_design)
TextView recharge_design;
// @BindView(R.id.recharge_tv)
TextView recharge_tv;
// @BindView(R.id.recharge_et)
EditText recharge_et;
// @BindView(R.id.rcb_next)
RoundCornerButton rcb_next;
private List<String> prices = new ArrayList<>();
......
......@@ -19,17 +19,11 @@ public class RechargeGridView extends LinearLayout {
List<RoundCornerButton> mList = new ArrayList<>();
// @BindView(R.id.rcb_01)
RoundCornerButton rcb_01;
// @BindView(R.id.rcb_02)
RoundCornerButton rcb_02;
// @BindView(R.id.rcb_03)
RoundCornerButton rcb_03;
// @BindView(R.id.rcb_04)
RoundCornerButton rcb_04;
// @BindView(R.id.rcb_05)
RoundCornerButton rcb_05;
// @BindView(R.id.rcb_06)
RoundCornerButton rcb_06;
private ItemClickListener itemClickListener;
......
......@@ -41,9 +41,7 @@ public class SetInfoActivity extends BaseActivity {
String mTitle;
String mOldString;
// @BindView(R.id.det_set_info)
DeleteEditTextView det_set_info;
// @BindView(R.id.tb_title_bar)
TitleBar tb_title_bar;
Animation shake;
......
......@@ -16,17 +16,11 @@ class RedPacketGridView : LinearLayout {
internal var mList: MutableList<RoundCornerButton> = ArrayList()
// @BindView(R.id.rcb_01)
internal var rcb_01: RoundCornerButton?=null
// @BindView(R.id.rcb_02)
internal var rcb_02: RoundCornerButton?=null
// @BindView(R.id.rcb_03)
internal var rcb_03: RoundCornerButton?=null
// @BindView(R.id.rcb_04)
internal var rcb_04: RoundCornerButton?=null
// @BindView(R.id.rcb_05)
internal var rcb_05: RoundCornerButton?=null
// @BindView(R.id.rcb_06)
internal var rcb_06: RoundCornerButton?=null
private var itemClickListener: ItemClickListener? = null
......
......@@ -27,10 +27,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
*/
public class LoopViewPager extends RelativeLayout {
// @BindView(R.id.viewPager)
DisallowParentTouchViewPager viewPager;
// @BindView(R.id.index_viewGroup)
LinearLayout group;//放小点的View
ImageView[] mImageViews;//装图片的数组
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment