Commit 9d9a5c10 by 刘鹏

Merge branch 'feat/lp/lp_confide_2.0' into 'd/v_confide_2.0'

合并release

See merge request app_android_lib/YDL-Component!62
parents a65cdba3 6202a283
...@@ -184,12 +184,11 @@ dependencies { ...@@ -184,12 +184,11 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// kapt rootProject.ext.dependencies["dagger2-compiler"] // 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["design"])
implementation(rootProject.ext.dependencies["appcompat-v7"]) implementation(rootProject.ext.dependencies["appcompat-v7"])
implementation(rootProject.ext.dependencies["espresso-core"]) implementation(rootProject.ext.dependencies["espresso-core"])
implementation(rootProject.ext.dependencies["okhttp3"]) implementation(rootProject.ext.dependencies["okhttp3"])
implementation("androidx.fragment:fragment:1.2.4")
// TPNS SDK 主工程依赖包 // TPNS SDK 主工程依赖包
// implementation 'com.tencent.liteav:LiteAVSDK_TRTC:latest.release' // implementation 'com.tencent.liteav:LiteAVSDK_TRTC:latest.release'
......
...@@ -8,8 +8,8 @@ import com.ydl.component.mvp.DemoPresenter ...@@ -8,8 +8,8 @@ import com.ydl.component.mvp.DemoPresenter
import com.ydl.ydlcommon.bean.StatusBarOptions import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.yidianling.consultant.ExpertSearchFragment import com.yidianling.consultant.ExpertSearchFragment
//import com.yidianling.consultant.ExpertSearchFragment
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
//import com.yidianling.consultant.ExpertSearchFragment
import com.yidianling.home.ui.fragment.YdlHomeFragment import com.yidianling.home.ui.fragment.YdlHomeFragment
//import com.yidianling.dynamic.trendsHome.TrendsHomeFragment //import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
//import com.yidianling.home.ui.fragment.YdlHomeFragment //import com.yidianling.home.ui.fragment.YdlHomeFragment
......
...@@ -27,53 +27,34 @@ import java.util.HashMap; ...@@ -27,53 +27,34 @@ import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Objects; import java.util.Objects;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/** /**
* Created by haorui on 2019-10-28 . * Created by haorui on 2019-10-28 .
* Des: * Des:
*/ */
public class PlayFragment extends Fragment implements View.OnClickListener, public class PlayFragment extends Fragment implements View.OnClickListener,
SeekBar.OnSeekBarChangeListener, OnPlayerEventListener { SeekBar.OnSeekBarChangeListener, OnPlayerEventListener {
@BindView(R.id.ll_content) private LinearLayout llContent;
LinearLayout llContent; private ImageView ivPlayingBg;
@BindView(R.id.iv_play_page_bg) private ImageView ivBack;
ImageView ivPlayingBg; private TextView tvTitle;
@BindView(R.id.iv_back) private TextView tvArtist;
ImageView ivBack; private SeekBar sbProgress;
@BindView(R.id.tv_title) private TextView tvCurrentTime;
TextView tvTitle; private TextView tvTotalTime;
@BindView(R.id.tv_artist) private ImageView ivMode;
TextView tvArtist; private ImageView ivPlay;
@BindView(R.id.sb_progress) private ImageView ivNext;
SeekBar sbProgress; private ImageView ivPrev;
@BindView(R.id.tv_current_time) private ImageView ivCover;
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;
int mLastProgress; int mLastProgress;
boolean isDraggingProgress; boolean isDraggingProgress;
private Unbinder unbinder;
@Nullable @Nullable
@Override @Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_play, container, false); View rootView = inflater.inflate(R.layout.fragment_play, container, false);
unbinder = ButterKnife.bind(this, rootView); bindView(rootView);
return rootView ; return rootView ;
} }
...@@ -91,12 +72,6 @@ public class PlayFragment extends Fragment implements View.OnClickListener, ...@@ -91,12 +72,6 @@ public class PlayFragment extends Fragment implements View.OnClickListener,
setListener(); setListener();
} }
@Override
public void onDestroyView() {
super.onDestroyView();
unbinder.unbind();
}
protected void setListener() { protected void setListener() {
ivBack.setOnClickListener(this); ivBack.setOnClickListener(this);
ivMode.setOnClickListener(this); ivMode.setOnClickListener(this);
...@@ -299,4 +274,20 @@ public class PlayFragment extends Fragment implements View.OnClickListener, ...@@ -299,4 +274,20 @@ public class PlayFragment extends Fragment implements View.OnClickListener,
public void onComplete() { public void onComplete() {
LogUtil.e("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);
}
} }
...@@ -34,7 +34,6 @@ buildscript { ...@@ -34,7 +34,6 @@ buildscript {
classpath 'com.ydl.plugins:modular:1.0.3' classpath 'com.ydl.plugins:modular:1.0.3'
classpath 'com.ydl:notracepoint-gradle-plugin:0.0.3' classpath 'com.ydl:notracepoint-gradle-plugin:0.0.3'
classpath 'com.ydl.plugins:restools:1.0.1' classpath 'com.ydl.plugins:restools:1.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc1'
} }
} }
......
...@@ -6,12 +6,12 @@ ext { ...@@ -6,12 +6,12 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.84", "m-confide" : "0.0.49.84",
"m-consultant" : "0.0.60.21", "m-consultant" : "0.0.60.25",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.11",
"m-home" : "0.0.23.60", "m-home" : "0.0.23.60",
"m-im" : "0.0.21.45", "m-im" : "0.0.21.45",
"m-dynamic" : "0.0.7.37", "m-dynamic" : "0.0.7.73",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.28",
...@@ -33,7 +33,7 @@ ext { ...@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.23",
//第一步 //第一步
"ydl-platform" : "0.0.41.16", "ydl-platform" : "0.0.41.16",
...@@ -79,7 +79,6 @@ ext { ...@@ -79,7 +79,6 @@ ext {
dagger2SdkVersion : "2.23.2", dagger2SdkVersion : "2.23.2",
glideSdkVersion : "4.12.0", glideSdkVersion : "4.12.0",
frescoSdkVersion : "2.1.0", frescoSdkVersion : "2.1.0",
butterknifeSdkVersion : "9.0.0-rc1",
rxlifecycleSdkVersion : "1.0", rxlifecycleSdkVersion : "1.0",
rxlifecycle2SdkVersion : "2.2.2", rxlifecycle2SdkVersion : "2.2.2",
espressoSdkVersion : "3.0.1", espressoSdkVersion : "3.0.1",
...@@ -92,12 +91,12 @@ ext { ...@@ -92,12 +91,12 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.84", "m-confide" : "0.0.49.84",
"m-consultant" : "0.0.60.21", "m-consultant" : "0.0.60.25",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.11",
"m-home" : "0.0.23.60", "m-home" : "0.0.23.60",
"m-im" : "0.0.21.45", "m-im" : "0.0.21.45",
"m-dynamic" : "0.0.7.37", "m-dynamic" : "0.0.7.73",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.28",
...@@ -117,7 +116,7 @@ ext { ...@@ -117,7 +116,7 @@ ext {
"m-dynamic-api" : "0.0.3.71", "m-dynamic-api" : "0.0.3.71",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//mdt组件 //mdt组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.23",
//第一步 //第一步
"ydl-platform" : "0.0.41.16", "ydl-platform" : "0.0.41.16",
...@@ -167,8 +166,6 @@ ext { ...@@ -167,8 +166,6 @@ ext {
//view //view
"autolayout" : "com.zhy:autolayout:1.4.5", "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", "pickerview" : "com.contrarywind:Android-PickerView:3.2.5",
"photoview" : "com.github.chrisbanes.photoview:library:1.2.3", "photoview" : "com.github.chrisbanes.photoview:library:1.2.3",
"numberprogressbar" : "com.daimajia.numberprogressbar:library:1.2@aar", "numberprogressbar" : "com.daimajia.numberprogressbar:library:1.2@aar",
...@@ -264,6 +261,7 @@ ext { ...@@ -264,6 +261,7 @@ ext {
"ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar", "ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar",
"ydl-router" : "com.ydl:ydl-router:1.4.1-SNAPSHOT@aar", "ydl-router" : "com.ydl:ydl-router:1.4.1-SNAPSHOT@aar",
"xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar", "xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar",
"mmkv" : "com.tencent:mmkv-static:1.2.6",
"arouter-api" : "com.alibaba:arouter-api:1.4.1", "arouter-api" : "com.alibaba:arouter-api:1.4.1",
"arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2", "arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2",
"exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0", "exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0",
......
...@@ -242,7 +242,7 @@ class ExpertSearchAdapter( ...@@ -242,7 +242,7 @@ class ExpertSearchAdapter(
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C)) view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C))
}else{ }else{
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1) view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_E0E0E0)) view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_666666))
} }
holder.ll_tags.addView(view) holder.ll_tags.addView(view)
} }
......
...@@ -3,6 +3,9 @@ package com.yidianling.consultant.modular.singlton ...@@ -3,6 +3,9 @@ package com.yidianling.consultant.modular.singlton
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.ThrowableConsumer import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
...@@ -134,7 +137,6 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -134,7 +137,6 @@ class ConsultAssistantDialogUtils private constructor() {
}) })
} }
} }
}) })
} }
consultAssistantDialogFromHomePage?.show() consultAssistantDialogFromHomePage?.show()
...@@ -165,12 +167,12 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -165,12 +167,12 @@ class ConsultAssistantDialogUtils private constructor() {
} }
if (ConsultantIn.getUserImpl().isLogin()){ if (ConsultantIn.getUserImpl().isLogin()){
//获取用户uid //获取用户uid
getConsultAssistantUid("", activity, 17) jumpToDyOrH5(activity)
}else{ }else{
ConsultantIn.getUserImpl().loginByOneKeyLoginCallBack(activity,true,object :LoginCallBackListener{ ConsultantIn.getUserImpl().loginByOneKeyLoginCallBack(activity,true,object :LoginCallBackListener{
override fun loginSuccess() { override fun loginSuccess() {
//获取用户uid //获取用户uid
getConsultAssistantUid("", activity, 17) jumpToDyOrH5(activity)
} }
override fun notLogin() { override fun notLogin() {
} }
...@@ -183,6 +185,19 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -183,6 +185,19 @@ class ConsultAssistantDialogUtils private constructor() {
confideListDialog?.show() confideListDialog?.show()
} }
} }
/**
* 倾诉列表页导医跳转,oppo vivo 跳转99元3小时活动
* */
private fun jumpToDyOrH5(activity: Activity) {
val channelName = PlatformDataManager.getRam().getChannelName()
if (channelName.contains("oppo") || channelName.contains("vivo")) {
//oppo vivo
NewH5Activity.start(activity, H5Params("https://m.ydl.com/zx/activity/lowPrice", null))
} else {
//去导医
getConsultAssistantUid("", activity, 17)
}
}
/** /**
* 倾诉列表页隐藏 * 倾诉列表页隐藏
......
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
android:gravity="center" android:gravity="center"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:padding="3dp" android:padding="3dp"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_666666"
android:textSize="10sp" android:textSize="10sp"
tools:text="恋爱情感" /> tools:text="恋爱情感" />
...@@ -65,7 +65,6 @@ dependencies { ...@@ -65,7 +65,6 @@ dependencies {
api 'com.github.princekin-f:EasyFloat:1.3.2' api 'com.github.princekin-f:EasyFloat:1.3.2'
api rootProject.ext.dependencies["ydl-user-router"] api rootProject.ext.dependencies["ydl-user-router"]
api rootProject.ext.dependencies["butterknife"]
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
//开发时使用 //开发时使用
......
...@@ -3,7 +3,6 @@ apply plugin: 'kotlin-android' ...@@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
apply plugin: 'resTools' // 资源重命名插件 apply plugin: 'resTools' // 资源重命名插件
apply plugin: 'com.jakewharton.butterknife'
// 配置资源重命名插件 // 配置资源重命名插件
resConfig { resConfig {
...@@ -89,8 +88,6 @@ dependencies { ...@@ -89,8 +88,6 @@ dependencies {
implementation 'com.pnikosis:materialish-progress:1.7' implementation 'com.pnikosis:materialish-progress:1.7'
implementation 'com.daimajia.numberprogressbar:library:1.4@aar' implementation 'com.daimajia.numberprogressbar:library:1.4@aar'
implementation 'me.toptas.fancyshowcase:fancyshowcaseview:1.1.5' 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"] api rootProject.ext.dependencies["ydl-user-router"]
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
//开发时使用 //开发时使用
......
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name=".publishTrend.PublishTrendActivityTrends"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<activity
android:name=".topic.AllTopicActivity" android:name=".topic.AllTopicActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
......
...@@ -4,7 +4,6 @@ import android.os.Bundle ...@@ -4,7 +4,6 @@ import android.os.Bundle
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter import androidx.fragment.app.FragmentPagerAdapter
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import butterknife.ButterKnife
import com.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.bean.StatusBarOptions import com.ydl.ydlcommon.bean.StatusBarOptions
import com.yidianling.dynamic.R import com.yidianling.dynamic.R
...@@ -41,7 +40,6 @@ class MyTrendsActivity : BaseActivity() { ...@@ -41,7 +40,6 @@ class MyTrendsActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.dynamic_activity_mytrends) setContentView(R.layout.dynamic_activity_mytrends)
ButterKnife.bind(this)
sendFragment = TrendsListFragment.newInstance( sendFragment = TrendsListFragment.newInstance(
1, 1,
......
...@@ -13,7 +13,6 @@ import android.view.View ...@@ -13,7 +13,6 @@ import android.view.View
import android.view.View.GONE import android.view.View.GONE
import android.view.View.VISIBLE import android.view.View.VISIBLE
import android.widget.ImageView import android.widget.ImageView
import butterknife.ButterKnife
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.adapter.BaseRecyclerAdapter import com.ydl.ydlcommon.adapter.BaseRecyclerAdapter
import com.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
...@@ -59,7 +58,6 @@ class TrendsReplyInfoActivity : BaseActivity() { ...@@ -59,7 +58,6 @@ class TrendsReplyInfoActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.dynamic_activity_trends_reply_info) setContentView(R.layout.dynamic_activity_trends_reply_info)
ButterKnife.bind(this)
val bundle = intent.getBundleExtra(YDLConstants.BUNDLE) val bundle = intent.getBundleExtra(YDLConstants.BUNDLE)
reply_id = bundle.getString(REPLY_ID) reply_id = bundle.getString(REPLY_ID)
......
...@@ -13,7 +13,6 @@ import android.widget.TextView; ...@@ -13,7 +13,6 @@ import android.widget.TextView;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.common.view.WrapGridLayoutManager; import com.yidianling.dynamic.common.view.WrapGridLayoutManager;
import com.yidianling.dynamic.model.Command; import com.yidianling.dynamic.model.Command;
...@@ -32,8 +31,6 @@ import org.json.JSONException; ...@@ -32,8 +31,6 @@ import org.json.JSONException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
...@@ -838,28 +835,30 @@ class TrendLoadMoreViewHolder extends RecyclerView.ViewHolder { ...@@ -838,28 +835,30 @@ class TrendLoadMoreViewHolder extends RecyclerView.ViewHolder {
//新版广告 //新版广告
class RecommendTrendAdViewHolder2 extends RecyclerView.ViewHolder { class RecommendTrendAdViewHolder2 extends RecyclerView.ViewHolder {
@BindView(R2.id.item_recommend_trend_user_head_iv)
ImageView itemRecommendTrendUserHeadIv; ImageView itemRecommendTrendUserHeadIv;
@BindView(R2.id.item_recommend_trend_user_name_tv)
TextView itemRecommendTrendUserNameTv; TextView itemRecommendTrendUserNameTv;
@BindView(R2.id.item_recommend_trend_user_gender_iv)
ImageView itemRecommendTrendUserGenderIv; ImageView itemRecommendTrendUserGenderIv;
@BindView(R2.id.item_recommend_trend_time_tv)
TextView itemRecommendTrendTimeTv; TextView itemRecommendTrendTimeTv;
@BindView(R2.id.item_recommend_trend_title_tv)
TextView itemRecommendTrendTitleTv; TextView itemRecommendTrendTitleTv;
@BindView(R2.id.item_recommend_trend_content_tv)
TextView itemRecommendTrendContentTv; TextView itemRecommendTrendContentTv;
@BindView(R2.id.iv_ad_img)
ImageView ivAdImg; ImageView ivAdImg;
@BindView(R2.id.item_recommend_trend_readed_tv)
TextView itemRecommendTrendReadedTv; TextView itemRecommendTrendReadedTv;
public RecommendTrendAdViewHolder2(View itemView) { public RecommendTrendAdViewHolder2(View itemView) {
super(itemView); super(itemView);
ButterKnife.bind(this, itemView); bindView(itemView);
// ivAdImg.getLayoutParams().height = (ScreenUtil.getScreenWidth(YDLApplication.getInstance()) - // ivAdImg.getLayoutParams().height = (ScreenUtil.getScreenWidth(YDLApplication.getInstance()) -
// SizeUtil.dp2px(YDLApplication.getInstance(), 30)) * 348 / 640; // SizeUtil.dp2px(YDLApplication.getInstance(), 30)) * 348 / 640;
// ivAdImg.requestLayout(); // 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);
}
} }
package com.yidianling.dynamic.bean
import android.os.Parcel
import android.os.Parcelable
import com.ydl.ydlcommon.ui.ParcelableImage
class DynamicDraftBean (
var title:String?=null,
var content:String?=null,
var topicid:String?=null,
var topicTitle:String?=null,
var isExpertSeen:Int?=0,
var isUserAnonymous:Int?=0,
var publishTrendImgs: List<ParcelableImage> ?= null
) : Parcelable {
constructor(parcel: Parcel) : this(
parcel.readString(),
parcel.readString(),
parcel.readString(),
parcel.readString(),
parcel.readValue(Int::class.java.classLoader) as? Int,
parcel.readValue(Int::class.java.classLoader) as? Int,
parcel.createTypedArrayList(ParcelableImage.CREATOR)
) {
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeString(title)
parcel.writeString(content)
parcel.writeString(topicid)
parcel.writeString(topicTitle)
parcel.writeValue(isExpertSeen)
parcel.writeValue(isUserAnonymous)
parcel.writeTypedList(publishTrendImgs)
}
override fun describeContents(): Int {
return 0
}
companion object CREATOR : Parcelable.Creator<DynamicDraftBean> {
override fun createFromParcel(parcel: Parcel): DynamicDraftBean {
return DynamicDraftBean(parcel)
}
override fun newArray(size: Int): Array<DynamicDraftBean?> {
return arrayOfNulls(size)
}
}
}
\ No newline at end of file
package com.yidianling.dynamic.dialog
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.Gravity
import android.view.WindowManager
import com.yidianling.dynamic.R
import com.yidianling.dynamic.dialog.listener.DynamicQuestionSaveListener
import kotlinx.android.synthetic.main.dynamic_savedraft_dialog_layout.*
/**
* Created by xj on 2019/9/25.
*/
class DynamicSaveDraftDialog(val mContext: Context, val listener: DynamicQuestionSaveListener): Dialog(mContext, R.style.dialog_default_style) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.dynamic_savedraft_dialog_layout)
val params = window.attributes
params.width = WindowManager.LayoutParams.WRAP_CONTENT
params.height = WindowManager.LayoutParams.WRAP_CONTENT
params.gravity=Gravity.CENTER
window.attributes = params
window.decorView.setPadding(50,0,50,0)
setCanceledOnTouchOutside(false)
cancel_btn.setOnClickListener {
listener.notSave()
hide()
}
confirm_btn.setOnClickListener {
listener.save()
hide()
}
}
}
\ No newline at end of file
package com.yidianling.dynamic.dialog
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.Gravity
import android.view.WindowManager
import com.yidianling.dynamic.R
import com.yidianling.dynamic.dialog.listener.TrendsQuestionListener
import kotlinx.android.synthetic.main.dynamic_question_and_trends_dialog_layout.*
/**
* Created by xj on 2019/9/25.
*/
class TrendsAndQuestionDialog(val mContext: Context, val listener: TrendsQuestionListener): Dialog(mContext, R.style.dialog_default_style) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.dynamic_question_and_trends_dialog_layout)
val params = window.attributes
params.width = WindowManager.LayoutParams.MATCH_PARENT
params.height = WindowManager.LayoutParams.WRAP_CONTENT
params.gravity=Gravity.BOTTOM
window.attributes = params
setCanceledOnTouchOutside(true)
ll_publish_trends.setOnClickListener {
listener.publishTrends()
hide()
}
ll_publish_question.setOnClickListener {
listener.publishQuestion()
hide()
}
publish_close.setOnClickListener {
hide()
}
}
}
\ No newline at end of file
package com.yidianling.dynamic.dialog.listener
interface DynamicQuestionSaveListener {
fun notSave()
fun save()
}
\ No newline at end of file
package com.yidianling.dynamic.dialog.listener
interface TrendsQuestionListener {
fun publishTrends()//发布动态
fun publishQuestion()//提问题
}
\ No newline at end of file
package com.yidianling.dynamic.event
class DynamicSaveEvent (var saveOrNot:Boolean)
\ No newline at end of file
package com.yidianling.dynamic.event
class EditContentEvent (var containeText:Boolean)
\ No newline at end of file
package com.yidianling.dynamic.publishTrend;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.RequiresApi;
import androidx.recyclerview.widget.RecyclerView;
import com.miracle.view.imageeditor.utils.FileUtils;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydl_image.transform.GlideRoundTransform;
import com.ydl.ydlcommon.ui.ParcelableImage;
import com.yidianling.dynamic.R;
import java.util.List;
public class DynamicPublishImageAdapter extends RecyclerView.Adapter<PublishImageViewHolder> {
private static final String TAG = "RecommendTrendImgAdapte";
protected Context mContext;
protected List<ParcelableImage> mDatas;
protected LayoutInflater mInflater;
public interface OnItemClickLister {
void onItemClick(View view, int position);
void onItemLongClick(View view, int position);
}
public interface OnDeleteClickLister {
void onDeleteClick(View view, int position);
void onDeleteLongClick(View view, int position);
}
public interface OnAddClickLister {
void OnAddClick(View view, int position);
void OnAddLongClick(View view, int position);
}
private OnItemClickLister mOnItemClickLister;
private OnDeleteClickLister mOnDeleteClickLister;
private OnAddClickLister mOnAddClickLister;
public void setOnItemClickLister(OnItemClickLister lister) {
this.mOnItemClickLister = lister;
}
public void setOnDeleteClickLister(OnDeleteClickLister lister) {
this.mOnDeleteClickLister = lister;
}
public void setOnAddClickLister(OnAddClickLister lister) {
this.mOnAddClickLister = lister;
}
public DynamicPublishImageAdapter(List<ParcelableImage> mDatas, Context mContext) {
this.mContext = mContext;
this.mDatas = mDatas;
mInflater = LayoutInflater.from(mContext);
}
@Override
public PublishImageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = null;
view = mInflater.inflate(R.layout.dynamic_publish_img_item, parent, false);
PublishImageViewHolder viewHolder = new PublishImageViewHolder(view);
return viewHolder;
}
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
@Override
public void onBindViewHolder(PublishImageViewHolder holder, final int position) {
ParcelableImage trendImage = mDatas.get(position);
String path = trendImage.getImage_url();
if ("default".equals(path)) {
holder.bg_iv.setVisibility(View.VISIBLE);
holder.item_publish_iv.setVisibility(View.GONE);
holder.item_publish_cancel_iv.setVisibility(View.GONE);
} else {
holder.item_publish_cancel_iv.setVisibility(View.VISIBLE);
holder.bg_iv.setVisibility(View.GONE);
holder.item_publish_iv.setVisibility(View.VISIBLE);
Uri uriByPath = FileUtils.INSTANCE.getUriByPath(mContext, path);
GlideApp.with(mContext)
.load(uriByPath)
.error(R.drawable.dynamic_add_temp)
.transform(new GlideRoundTransform(mContext, 6))
// .centerCrop()
.into(holder.item_publish_iv);
}
setUpItemEvent(holder);
setUpDeleteEvent(holder);
setUpAddEvent(holder);
}
@Override
public int getItemCount() {
return mDatas.size();
}
public void updateDate(List<ParcelableImage> mDatas) {
this.mDatas = mDatas;
notifyDataSetChanged();
}
/**
* 添加据到指定位置
*
* @param pos 数据添加的位置
* @param trendImage 数据
*/
public void addData(int pos, ParcelableImage trendImage) {
mDatas.add(trendImage);
notifyItemInserted(pos);
}
/**
* 删除指定位置数据
*
* @param pos
*/
public void deleteData(int pos) {
mDatas.remove(pos);
notifyItemRemoved(pos);
}
/**
* 给item添加监听
*
* @param holder
*/
protected void setUpItemEvent(final PublishImageViewHolder holder) {
if (mOnItemClickLister != null) {
holder.item_publish_iv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int layoutPosition = holder.getLayoutPosition();
mOnItemClickLister.onItemClick(holder.item_publish_iv, layoutPosition);
}
});
holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
int layoutPosition = holder.getLayoutPosition();
mOnItemClickLister.onItemLongClick(holder.item_publish_iv, layoutPosition);
return false;
}
});
}
}
/**
* 添加监听
*
* @param holder
*/
protected void setUpDeleteEvent(final PublishImageViewHolder holder) {
if (mOnItemClickLister != null) {
holder.item_publish_cancel_iv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int layoutPosition = holder.getLayoutPosition();
mOnDeleteClickLister.onDeleteClick(holder.item_publish_cancel_iv, layoutPosition);
}
});
holder.item_publish_cancel_iv.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
int layoutPosition = holder.getLayoutPosition();
mOnDeleteClickLister.onDeleteLongClick(holder.item_publish_cancel_iv, layoutPosition);
return false;
}
});
}
}
/**
* 添加监听
*
* @param holder
*/
protected void setUpAddEvent(final PublishImageViewHolder holder) {
if (mOnAddClickLister != null) {
holder.bg_iv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int layoutPosition = holder.getLayoutPosition();
mOnAddClickLister.OnAddClick(holder.bg_iv, layoutPosition);
}
});
holder.bg_iv.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
int layoutPosition = holder.getLayoutPosition();
mOnAddClickLister.OnAddLongClick(holder.bg_iv, layoutPosition);
return false;
}
});
}
}
}
class PublishImageViewHolder extends RecyclerView.ViewHolder {
ImageView item_publish_iv, item_publish_cancel_iv, bg_iv;
public PublishImageViewHolder(View itemView) {
super(itemView);
bg_iv = (ImageView) itemView.findViewById(R.id.item_publish_defult_iv);
item_publish_iv = (ImageView) itemView.findViewById(R.id.item_publish_iv);
item_publish_cancel_iv = (ImageView) itemView.findViewById(R.id.item_publish_cancel_iv);
}
}
\ No newline at end of file
package com.yidianling.dynamic.publishTrend; package com.yidianling.dynamic.publishTrend;
import android.app.Activity; import android.app.Activity;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle; import android.os.Bundle;
...@@ -11,6 +12,7 @@ import androidx.viewpager.widget.ViewPager; ...@@ -11,6 +12,7 @@ import androidx.viewpager.widget.ViewPager;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.animation.AlphaAnimation; import android.view.animation.AlphaAnimation;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.TranslateAnimation; import android.view.animation.TranslateAnimation;
...@@ -25,17 +27,30 @@ import com.flyco.tablayout.listener.CustomTabEntity; ...@@ -25,17 +27,30 @@ import com.flyco.tablayout.listener.CustomTabEntity;
import com.flyco.tablayout.listener.OnTabSelectListener; import com.flyco.tablayout.listener.OnTabSelectListener;
import com.ydl.ydlcommon.base.BaseActivity; import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.base.config.YDLConstants; import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.bean.StatusBarOptions;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor; import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.StatusBarUtils; import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.view.NoScrollViewPager; import com.ydl.ydlcommon.view.NoScrollViewPager;
import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.dynamic.bean.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.bean.TrendTabEntity; import com.yidianling.dynamic.bean.TrendTabEntity;
import com.yidianling.dynamic.dialog.DynamicSaveDraftDialog;
import com.yidianling.dynamic.dialog.TrendsAndQuestionDialog;
import com.yidianling.dynamic.dialog.listener.DynamicQuestionSaveListener;
import com.yidianling.dynamic.event.DynamicSaveEvent;
import com.yidianling.dynamic.event.EditContentEvent;
import com.yidianling.dynamic.publishTrend.fragment.PublishQuestionAndTrendFragment; import com.yidianling.dynamic.publishTrend.fragment.PublishQuestionAndTrendFragment;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import de.greenrobot.event.EventBus;
/** /**
* 发布动态 * 发布动态
...@@ -46,16 +61,24 @@ public class PublishTrendActivity extends BaseActivity { ...@@ -46,16 +61,24 @@ public class PublishTrendActivity extends BaseActivity {
private static final String COVER = "Test_cover"; private static final String COVER = "Test_cover";
private static final String TITLE = "Test_title"; private static final String TITLE = "Test_title";
private static final String ISFROMFM = "isfromfm"; private static final String ISFROMFM = "isfromfm";
private ImageView mBackIv; private TextView mBackIv;
private TextView mToastView; private TextView mToastView;
private NoScrollViewPager mViewPager; private NoScrollViewPager mViewPager;
private CommonTabLayout mTableLayout; private CommonTabLayout mTableLayout;
private TextView publish_trend_sure_tv;
// private RelativeLayout mNoticeLayout; // private RelativeLayout mNoticeLayout;
private ArrayList<CustomTabEntity> titleList = new ArrayList<>(); private ArrayList<CustomTabEntity> titleList = new ArrayList<>();
private List<Fragment> fragmentList = new ArrayList<>(); private List<Fragment> fragmentList = new ArrayList<>();
private PopupWindow noticePopupWindow; private PopupWindow noticePopupWindow;
private Handler handler; private Handler handler;
private LinearLayout mPublishTrendTitle; private LinearLayout mPublishTrendTitle;
private DynamicSaveDraftDialog dynamicSaveDraftDialog = null;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EventBus.getDefault().register(this);
}
public static Intent newIntent(Activity activity, String url, String cover, String title) { public static Intent newIntent(Activity activity, String url, String cover, String title) {
Intent intent = new Intent(activity, PublishTrendActivity.class); Intent intent = new Intent(activity, PublishTrendActivity.class);
...@@ -68,6 +91,12 @@ public class PublishTrendActivity extends BaseActivity { ...@@ -68,6 +91,12 @@ public class PublishTrendActivity extends BaseActivity {
} }
@NotNull
@Override
public StatusBarOptions getStatusViewOptions() {
return new StatusBarOptions(true, true);
}
public static Intent newIntentForArticle(Activity activity, String url, String cover, String title) { public static Intent newIntentForArticle(Activity activity, String url, String cover, String title) {
Intent intent = new Intent(activity, PublishTrendActivity.class); Intent intent = new Intent(activity, PublishTrendActivity.class);
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
...@@ -105,14 +134,15 @@ public class PublishTrendActivity extends BaseActivity { ...@@ -105,14 +134,15 @@ public class PublishTrendActivity extends BaseActivity {
protected void initDataAndEvent() { protected void initDataAndEvent() {
SharedPreferencesEditor.putString("trend_state", ""); SharedPreferencesEditor.putString("trend_state", "");
handler = new Handler(); handler = new Handler();
mBackIv = findViewById(R.id.img_back); mBackIv = findViewById(R.id.mBackIv);
mPublishTrendTitle= findViewById(R.id.publish_trend_title_rel); mPublishTrendTitle= findViewById(R.id.publish_trend_title_rel);
mBackIv.setOnClickListener(v -> { mBackIv.setOnClickListener(v -> {
SaveOrNotDialog();
finish();
}); });
publish_trend_sure_tv=findViewById(R.id.publish_trend_sure_tv);
//发布按钮 //发布按钮
findViewById(R.id.publish_trend_sure_tv).setOnClickListener(v -> { publish_trend_sure_tv.setOnClickListener(v -> {
if (fragmentList.get(mViewPager.getCurrentItem()) != null) { if (fragmentList.get(mViewPager.getCurrentItem()) != null) {
((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).publish(); ((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).publish();
} }
...@@ -123,16 +153,50 @@ public class PublishTrendActivity extends BaseActivity { ...@@ -123,16 +153,50 @@ public class PublishTrendActivity extends BaseActivity {
mTableLayout = findViewById(R.id.tab_layout); mTableLayout = findViewById(R.id.tab_layout);
mToastView = findViewById(R.id.tv_coustom_toast_view); mToastView = findViewById(R.id.tv_coustom_toast_view);
initData(); initData();
StatusBarUtils.Companion.setCustomStatusView(this,mPublishTrendTitle); }
public void onEventMainThread(EditContentEvent event) {
if (event.getContaineText()){
publish_trend_sure_tv.setBackground(getDrawable(R.drawable.dynamic_bg_publish_button));
publish_trend_sure_tv.setTextColor(getResources().getColor(R.color.dynamic_white));
}else{
publish_trend_sure_tv.setBackground(getDrawable(R.drawable.dynamic_bg_publish_gray_button));
publish_trend_sure_tv.setTextColor(getResources().getColor(R.color.dynamic_d0d0d0));
}
}
private void SaveOrNotDialog() {
dynamicSaveDraftDialog=new DynamicSaveDraftDialog(this
, new DynamicQuestionSaveListener() {
@Override
public void notSave() {
EventBus.getDefault().post(new DynamicSaveEvent(false));
finish();
}
@Override
public void save() {
//发送通知给Fragment保留此次编辑
EventBus.getDefault().post(new DynamicSaveEvent(true));
finish();
}
});
dynamicSaveDraftDialog.show();
} }
private void initData() { private void initData() {
titleList.add(new TrendTabEntity("动态", 0, 0)); Integer dynamic_question = 1;
titleList.add(new TrendTabEntity("提问", 0, 0)); Bundle bundle = getIntent().getBundleExtra("bundle");
if (null != bundle) {
dynamic_question= bundle.getInt("dynamic_question", 1);
}
if (dynamic_question==1){
titleList.add(new TrendTabEntity("发动态", 0, 0));
fragmentList.add(PublishQuestionAndTrendFragment.getInstance(PublishQuestionAndTrendFragment.TYPE_TREND));
}else{
titleList.add(new TrendTabEntity("提问题", 0, 0));
fragmentList.add(PublishQuestionAndTrendFragment.getInstance(PublishQuestionAndTrendFragment.TYPE_QUESTION));
}
mTableLayout.setTabData(titleList); mTableLayout.setTabData(titleList);
fragmentList.add(PublishQuestionAndTrendFragment.getInstance(PublishQuestionAndTrendFragment.TYPE_TREND));
fragmentList.add(PublishQuestionAndTrendFragment.getInstance(PublishQuestionAndTrendFragment.TYPE_QUESTION));
FragmentPagerAdapter adapter = new FragmentPagerAdapter(getSupportFragmentManager()) { FragmentPagerAdapter adapter = new FragmentPagerAdapter(getSupportFragmentManager()) {
@Override @Override
...@@ -177,7 +241,7 @@ public class PublishTrendActivity extends BaseActivity { ...@@ -177,7 +241,7 @@ public class PublishTrendActivity extends BaseActivity {
} }
}); });
handler.postDelayed(() -> showNoticeView(), 300); // handler.postDelayed(() -> showNoticeView(), 300);
} }
/** /**
...@@ -189,7 +253,7 @@ public class PublishTrendActivity extends BaseActivity { ...@@ -189,7 +253,7 @@ public class PublishTrendActivity extends BaseActivity {
return; return;
} }
TextView textView = mTableLayout.getTitleView(1); TextView textView = mTableLayout.getTitleView(0);
textView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); textView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
int textViewWidth = textView.getMeasuredWidth(); int textViewWidth = textView.getMeasuredWidth();
View view = LayoutInflater.from(this).inflate(R.layout.dynamic_popup_notice, null); View view = LayoutInflater.from(this).inflate(R.layout.dynamic_popup_notice, null);
...@@ -243,16 +307,17 @@ public class PublishTrendActivity extends BaseActivity { ...@@ -243,16 +307,17 @@ public class PublishTrendActivity extends BaseActivity {
if (((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).getEmojiLayoutIsShow()) { if (((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).getEmojiLayoutIsShow()) {
((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).hideEmojiLayout(); ((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).hideEmojiLayout();
} else { } else {
super.onBackPressed(); SaveOrNotDialog();
} }
} else { } else {
super.onBackPressed(); SaveOrNotDialog();
} }
} }
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
EventBus.getDefault().unregister(this);
//解除任务 //解除任务
if (null != handler) { if (null != handler) {
handler.removeCallbacksAndMessages(null); handler.removeCallbacksAndMessages(null);
......
...@@ -19,15 +19,11 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog; ...@@ -19,15 +19,11 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.bean.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.model.Command; import com.yidianling.dynamic.model.Command;
import com.yidianling.dynamic.router.DynamicIn; import com.yidianling.dynamic.router.DynamicIn;
import com.yidianling.dynamic.thank.data.ZJservice; 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.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
...@@ -37,16 +33,11 @@ import io.reactivex.schedulers.Schedulers; ...@@ -37,16 +33,11 @@ import io.reactivex.schedulers.Schedulers;
public class ShowIntroduceDialogFragment extends BaseDialogFragment { public class ShowIntroduceDialogFragment extends BaseDialogFragment {
@BindView(R2.id.sdv_head) private ImageView mHead;
ImageView mHead; private TextView mName;
@BindView(R2.id.name) private TextView mIntroduce;
TextView mName; private ImageView mChangeImg;
@BindView(R2.id.introduce) private TextView mChangeText;
TextView mIntroduce;
@BindView(R2.id.changeimg)
ImageView mChangeImg;
@BindView(R2.id.changtext)
TextView mChangeText;
String docid; String docid;
...@@ -61,13 +52,16 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment { ...@@ -61,13 +52,16 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment {
String goodAt; String goodAt;
private ZJservice zjservice; private ZJservice zjservice;
private View mLlBtn1;
private View mLlBtn2;
private View mIvClose;
@Nullable @Nullable
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dynamic_fragment_dialog_show_introduce, container, false); View view = inflater.inflate(R.layout.dynamic_fragment_dialog_show_introduce, container, false);
ButterKnife.bind(this, view); bindView(view);
init(); init();
return view; return view;
} }
...@@ -87,8 +81,7 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment { ...@@ -87,8 +81,7 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment {
} }
@OnClick({R2.id.ll_btn1, R2.id.ll_btn2, R2.id.iv_close}) private void click(View view) {
void click(View view) {
if (view.getId() == R.id.ll_btn1) { if (view.getId() == R.id.ll_btn1) {
if (zjservice.is_online.equals("1")) { if (zjservice.is_online.equals("1")) {
...@@ -167,4 +160,24 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment { ...@@ -167,4 +160,24 @@ public class ShowIntroduceDialogFragment extends BaseDialogFragment {
} }
}).show(); }).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; ...@@ -14,7 +14,6 @@ import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.bean.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.model.Command; import com.yidianling.dynamic.model.Command;
import com.yidianling.dynamic.thank.data.ThxData; import com.yidianling.dynamic.thank.data.ThxData;
...@@ -25,8 +24,6 @@ import com.ydl.ydlcommon.data.http.RxUtils; ...@@ -25,8 +24,6 @@ import com.ydl.ydlcommon.data.http.RxUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import butterknife.BindView;
import butterknife.ButterKnife;
import de.greenrobot.event.EventBus; import de.greenrobot.event.EventBus;
import in.srain.cube.views.loadmore.LoadMoreContainer; import in.srain.cube.views.loadmore.LoadMoreContainer;
import in.srain.cube.views.loadmore.LoadMoreHandler; import in.srain.cube.views.loadmore.LoadMoreHandler;
...@@ -46,12 +43,9 @@ import io.reactivex.schedulers.Schedulers; ...@@ -46,12 +43,9 @@ import io.reactivex.schedulers.Schedulers;
public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreHandler { public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreHandler {
@BindView(R2.id.store_house_ptr_frame) private PtrFrameLayout store_house_ptr_frame;
PtrFrameLayout store_house_ptr_frame; private LoadMoreListViewContainer load_more_list_view_container;
@BindView(R2.id.load_more_list_view_container) private ListView lv_content;
LoadMoreListViewContainer load_more_list_view_container;
@BindView(R2.id.lv_content)
ListView lv_content;
ThxZanListAdapter adapter; ThxZanListAdapter adapter;
int page = 1; int page = 1;
...@@ -223,7 +217,7 @@ public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreH ...@@ -223,7 +217,7 @@ public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreH
@Override @Override
protected void initDataAndEvent() { protected void initDataAndEvent() {
ButterKnife.bind(this); bindView();
listNum = getIntent().getIntExtra("listNum", 0); listNum = getIntent().getIntExtra("listNum", 0);
answerId = getIntent().getIntExtra("answerId", 0); answerId = getIntent().getIntExtra("answerId", 0);
...@@ -238,6 +232,11 @@ public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreH ...@@ -238,6 +232,11 @@ public class ThankActivity extends BaseActivity implements PtrHandler, LoadMoreH
EventBus.getDefault().register(this); 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 class ISLoadMoreFooterView extends RelativeLayout
implements LoadMoreUIHandler { implements LoadMoreUIHandler {
......
...@@ -8,43 +8,30 @@ import android.view.View; ...@@ -8,43 +8,30 @@ import android.view.View;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.thank.ThxStarMoney; import com.yidianling.dynamic.thank.ThxStarMoney;
import java.util.List; import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/** /**
* 感谢的选择器 * 感谢的选择器
* Created by softrice on 15/12/3. * Created by softrice on 15/12/3.
*/ */
public class ThxSelectView extends LinearLayout { public class ThxSelectView extends LinearLayout {
@BindView(R2.id.ll_left) private LinearLayout ll_left;
LinearLayout ll_left; private TextView tv_left_up;
@BindView(R2.id.tv_left_up) private TextView tv_left_down;
TextView tv_left_up;
@BindView(R2.id.tv_left_down) private LinearLayout ll_center;
TextView tv_left_down; private TextView tv_center_up;
private TextView tv_center_down;
@BindView(R2.id.ll_center)
LinearLayout ll_center; private LinearLayout ll_right;
@BindView(R2.id.tv_center_up) private TextView tv_right_up;
TextView tv_center_up; private TextView tv_right_down;
@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;
int selectId = -1; int selectId = -1;
...@@ -56,14 +43,14 @@ public class ThxSelectView extends LinearLayout { ...@@ -56,14 +43,14 @@ public class ThxSelectView extends LinearLayout {
public ThxSelectView(Context context) { public ThxSelectView(Context context) {
super(context); super(context);
inflate(context, R.layout.dynamic_ui_thx_select, this); inflate(context, R.layout.dynamic_ui_thx_select, this);
ButterKnife.bind(this); bindView(this);
} }
public ThxSelectView(Context context, AttributeSet attrs) { public ThxSelectView(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
inflate(context, R.layout.dynamic_ui_thx_select, this); inflate(context, R.layout.dynamic_ui_thx_select, this);
ButterKnife.bind(this); bindView(this);
} }
public void select(int position) { public void select(int position) {
...@@ -131,8 +118,7 @@ public class ThxSelectView extends LinearLayout { ...@@ -131,8 +118,7 @@ public class ThxSelectView extends LinearLayout {
} }
@OnClick({R2.id.ll_left, R2.id.ll_center, R2.id.ll_right}) private void click(@NonNull View view) {
void click(View view) {
if (view.getId() == R.id.ll_left) { if (view.getId() == R.id.ll_left) {
select(0); select(0);
} else if (view.getId() == R.id.ll_center) { } else if (view.getId() == R.id.ll_center) {
...@@ -158,4 +144,25 @@ public class ThxSelectView extends LinearLayout { ...@@ -158,4 +144,25 @@ public class ThxSelectView extends LinearLayout {
tv_right_up.setText("×" + star_money.get(2).star_num); 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; package com.yidianling.dynamic.thank.view;
import android.content.Context; import android.content.Context;
import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
...@@ -8,34 +9,25 @@ import android.widget.TextView; ...@@ -8,34 +9,25 @@ import android.widget.TextView;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydl_image.transform.GlideCircleTransform; import com.ydl.ydl_image.transform.GlideCircleTransform;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.thank.data.ThxZan; import com.yidianling.dynamic.thank.data.ThxZan;
import butterknife.BindView;
import butterknife.ButterKnife;
/** /**
* 感谢回复 * 感谢回复
* Created by softrice on 15/12/3. * Created by softrice on 15/12/3.
*/ */
public class ZanReplyListItemView extends LinearLayout { public class ZanReplyListItemView extends LinearLayout {
@BindView(R2.id.sdv_head) private ImageView sdv_head;
ImageView sdv_head; private TextView tv_zan_num;
@BindView(R2.id.tv_zan_num) private TextView tv_name;
TextView tv_zan_num; private TextView tv_time;
@BindView(R2.id.tv_name) private TextView tv_content;
TextView tv_name;
@BindView(R2.id.tv_time)
TextView tv_time;
@BindView(R2.id.tv_content)
TextView tv_content;
public ZanReplyListItemView(Context context) { public ZanReplyListItemView(Context context) {
super(context); super(context);
inflate(context,R.layout.dynamic_ui_zan_reply_list,this); inflate(context,R.layout.dynamic_ui_zan_reply_list,this);
ButterKnife.bind(this); bindView(this);
} }
...@@ -57,4 +49,11 @@ public class ZanReplyListItemView extends LinearLayout { ...@@ -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; ...@@ -44,7 +44,6 @@ import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.yidianling.dynamic.bean.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.adapter.TopicDetailMemberAdapter; import com.yidianling.dynamic.adapter.TopicDetailMemberAdapter;
import com.yidianling.dynamic.model.Focus; import com.yidianling.dynamic.model.Focus;
import com.yidianling.dynamic.model.TopicDetailBean; import com.yidianling.dynamic.model.TopicDetailBean;
...@@ -53,11 +52,6 @@ import com.yidianling.dynamic.router.DynamicIn; ...@@ -53,11 +52,6 @@ import com.yidianling.dynamic.router.DynamicIn;
import com.yidianling.dynamic.trendList.TrendListInFragment; import com.yidianling.dynamic.trendList.TrendListInFragment;
import com.yidianling.dynamic.trendList.adapter.RecommendTopAdapter; import com.yidianling.dynamic.trendList.adapter.RecommendTopAdapter;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/** /**
* 话题详情页 * 话题详情页
* Refactor by Jim on 2017/12/27 0027. * Refactor by Jim on 2017/12/27 0027.
...@@ -65,67 +59,36 @@ import butterknife.OnClick; ...@@ -65,67 +59,36 @@ import butterknife.OnClick;
@Route(path = "/topic/detail") @Route(path = "/topic/detail")
public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicDetailPresenterImpl> implements SwipeRefreshLayout.OnRefreshListener, TopicDetailView { public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicDetailPresenterImpl> implements SwipeRefreshLayout.OnRefreshListener, TopicDetailView {
private ImageView mTopicDetailTopBgIv;
@BindView(R2.id.topic_detail_top_bg_iv) private TextView mTopicDetailTitleTv;
ImageView mTopicDetailTopBgIv; private TextView mTopicDetailSurveyTv;
@BindView(R2.id.topic_detail_title_tv) private TextView mTopicDetailVisitNumTv;
TextView mTopicDetailTitleTv; private TextView mTopicDetailVisitZjTv;
@BindView(R2.id.topic_detail_survey_tv) private TextView mTopicDetailTrendNumTv;
TextView mTopicDetailSurveyTv; private TextView mTopicDetailFocusTv;
@BindView(R2.id.topic_detail_visit_num_tv) private TextView mTopicDetailUsersNumTv;
TextView mTopicDetailVisitNumTv; private RecyclerView mTopicDetailUsersRcv;
@BindView(R2.id.topic_detail_visit_zj_tv) private RelativeLayout mTopicDetailUsersRel;
TextView mTopicDetailVisitZjTv; private RelativeLayout mTopicDetailTopRel;
@BindView(R2.id.topic_detail_trend_num_tv) private TextView mItemTopicDetailNewTv;
TextView mTopicDetailTrendNumTv; private View mItemTopicDetailNewHintTv;
@BindView(R2.id.topic_detail_focus_tv) private RelativeLayout mItemTopicDetailNewRel;
TextView mTopicDetailFocusTv; private TextView mItemTopicDetailHotTv;
@BindView(R2.id.topic_detail_users_num_tv) private View mItemTopicDetailHotHintTv;
TextView mTopicDetailUsersNumTv; private RelativeLayout mItemTopicDetailHotRel;
@BindView(R2.id.topic_detail_users_rcv) private LinearLayout mTopicDetailTypeLin;
RecyclerView mTopicDetailUsersRcv; private AppBarLayout mAppBar;
@BindView(R2.id.topic_detail_users_rel) private ViewPager mTopicDetailVp;
RelativeLayout mTopicDetailUsersRel; private SwipeRefreshLayout mSwl;
@BindView(R2.id.topic_detail_top_rel) private Toolbar mToolbar;
RelativeLayout mTopicDetailTopRel; private CollapsingToolbarLayout collapsingToolbarLayout;
@BindView(R2.id.item_topic_detail_new_tv) private ImageView mMineNextIv;
TextView mItemTopicDetailNewTv; private ImageView mTopicDetailTitleBackIv;
@BindView(R2.id.item_topic_detail_new_hint_tv) private ImageView mTopicDetailTitleTopRightTv;
View mItemTopicDetailNewHintTv; private FloatingActionButton mPublishTrendBtn;
@BindView(R2.id.item_topic_detail_new_rel) private RecyclerView topTrendsRcv;
RelativeLayout mItemTopicDetailNewRel; private View divideLine;
@BindView(R2.id.item_topic_detail_hot_tv) private LogoLoadingView vLoading;
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 TopicDetailMemberAdapter adapter; private TopicDetailMemberAdapter adapter;
...@@ -151,7 +114,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD ...@@ -151,7 +114,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.dynamic_activity_topic_detail); setContentView(R.layout.dynamic_activity_topic_detail);
ButterKnife.bind(this); bindView();
initDatas(); initDatas();
initViews(); initViews();
fetchDatas(); fetchDatas();
...@@ -336,9 +299,7 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD ...@@ -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, private void doClick(View view) {
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) {
if (view.getId() == R.id.item_topic_detail_new_rel) { if (view.getId() == R.id.item_topic_detail_new_rel) {
mTopicDetailVp.setCurrentItem(0); mTopicDetailVp.setCurrentItem(0);
setTabSelection(0); setTabSelection(0);
...@@ -596,4 +557,58 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD ...@@ -596,4 +557,58 @@ public class TopicDetailActivity extends BaseMvpActivity<TopicDetailView, TopicD
protected void initDataAndEvent() { 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; ...@@ -7,9 +7,6 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/** /**
* Created by Jim on 2017/9/25 0025. * Created by Jim on 2017/9/25 0025.
*/ */
...@@ -18,7 +15,6 @@ public abstract class BaseLazyFragment extends Fragment { ...@@ -18,7 +15,6 @@ public abstract class BaseLazyFragment extends Fragment {
protected boolean isVisible; protected boolean isVisible;
protected boolean isUseLazyMode=true; protected boolean isUseLazyMode=true;
private Unbinder mUnBinder;
@Nullable @Nullable
...@@ -31,7 +27,6 @@ public abstract class BaseLazyFragment extends Fragment { ...@@ -31,7 +27,6 @@ public abstract class BaseLazyFragment extends Fragment {
@Override @Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
mUnBinder = ButterKnife.bind(this, view);
afterViewCreated(savedInstanceState); afterViewCreated(savedInstanceState);
} }
...@@ -68,9 +63,4 @@ public abstract class BaseLazyFragment extends Fragment { ...@@ -68,9 +63,4 @@ public abstract class BaseLazyFragment extends Fragment {
public abstract void lazyLoad(); public abstract void lazyLoad();
@Override
public void onDestroyView() {
super.onDestroyView();
mUnBinder.unbind();
}
} }
...@@ -24,7 +24,6 @@ import com.yidianling.common.tools.LogUtil; ...@@ -24,7 +24,6 @@ import com.yidianling.common.tools.LogUtil;
import com.yidianling.dynamic.DynamicFragment; import com.yidianling.dynamic.DynamicFragment;
import com.yidianling.dynamic.bean.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.members.MembersActivity; import com.yidianling.dynamic.members.MembersActivity;
import com.yidianling.dynamic.model.Command; import com.yidianling.dynamic.model.Command;
...@@ -37,7 +36,7 @@ import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter; ...@@ -37,7 +36,7 @@ import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter;
import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity; import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity;
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment; import com.yidianling.dynamic.trendsHome.TrendsHomeFragment;
import com.ydl.webview.H5Params; 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.BuryPointUtils;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor; import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager; import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager;
...@@ -45,9 +44,6 @@ import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager; ...@@ -45,9 +44,6 @@ import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
...@@ -60,15 +56,10 @@ import io.reactivex.schedulers.Schedulers; ...@@ -60,15 +56,10 @@ import io.reactivex.schedulers.Schedulers;
public class TrendListInFragment extends DynamicFragment implements ITrendsListView { public class TrendListInFragment extends DynamicFragment implements ITrendsListView {
Context context; Context context;
@BindView(R2.id.recommend_dynamic_rcv) private RecyclerView trendsRcv;
RecyclerView trendsRcv; private ImageView mTrendNoDataIv;
@BindView(R2.id.trend_no_data_iv) private TextView mTrendNoDataTv;
ImageView mTrendNoDataIv; private NestedScrollView mTrendNoDataRel;
@BindView(R2.id.trend_no_data_tv)
TextView mTrendNoDataTv;
@BindView(R2.id.trend_no_data_rel)
NestedScrollView mTrendNoDataRel;
Unbinder unbinder;
int totalItemCount, lastVisibleItem, visibleItemCount, firstVisibleItem; int totalItemCount, lastVisibleItem, visibleItemCount, firstVisibleItem;
private List<TrendsListBean.Trend> trendsDatas; private List<TrendsListBean.Trend> trendsDatas;
...@@ -113,7 +104,7 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV ...@@ -113,7 +104,7 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dynamic_fragment_trend_list_in, container, false); View view = inflater.inflate(R.layout.dynamic_fragment_trend_list_in, container, false);
unbinder = ButterKnife.bind(this, view); bindView(view);
initFileds(); initFileds();
initView(); initView();
fetchDatas(); fetchDatas();
...@@ -397,9 +388,6 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV ...@@ -397,9 +388,6 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV
@Override @Override
public void onDestroyView() { public void onDestroyView() {
super.onDestroyView(); super.onDestroyView();
if (unbinder != null) {
unbinder.unbind();
}
if (mHandler != null) { if (mHandler != null) {
mHandler.removeCallbacksAndMessages(null); mHandler.removeCallbacksAndMessages(null);
} }
...@@ -536,4 +524,11 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV ...@@ -536,4 +524,11 @@ public class TrendListInFragment extends DynamicFragment implements ITrendsListV
mPresenter.onDestroy(); 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);
}
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/dynamic_white" /> <solid android:color="#ff1da1f2" />
<stroke
android:width="0.5dp"
android:color="@color/platform_line" />
<corners android:radius="12dp" /> <corners android:radius="12dp" />
</shape> </shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#f6f6f6" />
<corners android:radius="12dp" />
</shape>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/dynamic_msg_system_press" /> <solid android:color="#f6f7f8" />
<stroke
android:width="0.5dp"
android:color="@color/platform_line" />
<corners android:radius="12dp" /> <corners android:radius="12dp" />
</shape> </shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topLeftRadius="@dimen/platform_dp_10"
android:topRightRadius="@dimen/platform_dp_10"
/>
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical">
<LinearLayout
android:id="@+id/publish_trend_title_rel"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/dynamic_background_publish_trend_top"
>
<RelativeLayout
android:layout_gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="48dp"
>
<ImageView
android:id="@+id/img_back"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:paddingLeft="15dp"
android:paddingRight="@dimen/platform_dp_15"
android:src="@drawable/platform_common_back" />
<com.flyco.tablayout.CommonTabLayout
android:id="@+id/tab_layout"
android:layout_width="110dp"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_marginBottom="6dp"
app:tl_indicator_anim_enable="false"
app:tl_indicator_height="0dp"
app:tl_tab_space_equal="true"
app:tl_textSelectColor="@color/platform_color_242424"
app:tl_textUnselectColor="@color/platform_white"
app:tl_textsize="17sp" />
<TextView
android:id="@+id/publish_trend_sure_tv"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginRight="15dp"
android:background="@drawable/dynamic_bg_publish_button"
android:gravity="center"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="发布"
android:textColor="@color/platform_but_text_color_selected"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/dynamic_white">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/publish_trend_content_editext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/dynamic_white"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="left|top"
android:hint="1、清晰描述事情的背景及经过\n2、你想寻求哪方面的帮助\n这样更容易获得咨询师准确、专业的解答哦~"
android:includeFontPadding="false"
android:minLines="6"
android:padding="15dp"
android:paddingLeft="15dp"
android:textColor="@color/dynamic_text_trend_title_black"
android:textColorHint="@color/dynamic_text_trend_defult"
android:textSize="17sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/publish_trend_img_rcv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/publish_trend_content_editext"
android:layout_marginTop="16dp"
android:paddingLeft="-5dp"
android:paddingRight="-5dp"
android:visibility="gone" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/publish_trend_img_rcv"
android:layout_margin="15dp">
<TextView
android:id="@+id/publish_trend_bottom_topic_tv"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:background="@drawable/dynamic_bg_topic"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="# 选择话题"
android:textColor="@color/platform_color_666666"
android:textSize="13sp" />
<TextView
android:id="@+id/publish_trend_content_num_tv"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="center_vertical"
android:includeFontPadding="false"
android:text="0/1000"
android:textColor="#bbbbbb"
android:textSize="15sp" />
<View
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/publish_trend_content_num_tv"
android:layout_marginTop="15dp"
android:background="@color/platform_new_divide_color" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/line"
android:layout_marginLeft="1dp"
android:layout_marginTop="15dp"
android:layout_marginRight="1dp"
android:layout_marginBottom="@dimen/platform_dp_1"
android:elevation="1dp"
app:cardCornerRadius="6dp">
<RelativeLayout
android:id="@+id/publish_trend_ad_rel"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/platform_color_F7F7F7"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/publish_trend_ad_iv"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerVertical="true"
android:scaleType="fitXY"
android:src="@drawable/dynamic_default_img" />
<ImageView
android:id="@+id/iv_fm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="18dp"
android:src="@drawable/dynamic_img_trend_fm_play"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/publish_trend_ad_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_toRightOf="@+id/publish_trend_ad_iv"
android:maxLines="2"
android:text="测测你的童年阴影"
android:textColor="#333"
android:textSize="15sp" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
<include layout="@layout/dynamic_layout_publish_trend_bottom" />
</LinearLayout>
...@@ -11,23 +11,34 @@ ...@@ -11,23 +11,34 @@
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="48dp"
android:background="@drawable/dynamic_background_publish_trend_top" android:gravity="center_vertical"
android:background="@color/dynamic_white"
> >
<RelativeLayout <RelativeLayout
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="48dp"
> >
<ImageView <TextView
android:id="@+id/img_back" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="match_parent" android:textColor="@color/platform_color_333333"
android:layout_centerVertical="true" android:text="取消"
android:paddingLeft="15dp" android:paddingBottom="@dimen/platform_dp_5"
android:paddingRight="@dimen/platform_dp_15" android:paddingTop="@dimen/platform_dp_5"
android:src="@drawable/platform_common_back" /> android:paddingRight="@dimen/platform_dp_5"
android:id="@+id/mBackIv"
android:layout_centerInParent="true"
android:layout_alignParentLeft="true"
android:layout_marginStart="@dimen/platform_dp_15"
android:includeFontPadding="false"
android:textSize="@dimen/platform_sp_16"
>
</TextView>
<com.flyco.tablayout.CommonTabLayout <com.flyco.tablayout.CommonTabLayout
android:id="@+id/tab_layout" android:id="@+id/tab_layout"
...@@ -40,23 +51,25 @@ ...@@ -40,23 +51,25 @@
app:tl_tab_space_equal="true" app:tl_tab_space_equal="true"
app:tl_textSelectColor="@color/platform_color_242424" app:tl_textSelectColor="@color/platform_color_242424"
app:tl_textUnselectColor="@color/platform_white" app:tl_textUnselectColor="@color/platform_white"
app:tl_textsize="17sp" /> app:tl_textsize="18sp" />
<TextView <TextView
android:id="@+id/publish_trend_sure_tv" android:id="@+id/publish_trend_sure_tv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="24dp" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:background="@drawable/dynamic_bg_publish_button" android:background="@drawable/dynamic_bg_publish_button"
android:gravity="center" android:gravity="center"
android:paddingLeft="10dp" android:paddingLeft="11dp"
android:paddingRight="10dp" android:paddingRight="11dp"
android:paddingTop="@dimen/platform_dp_3"
android:paddingBottom="@dimen/platform_dp_3"
android:text="发布" android:text="发布"
android:textColor="@color/platform_but_text_color_selected" android:textColor="@color/dynamic_white"
android:textSize="14sp" /> android:textSize="13sp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/dynamic_white"
android:orientation="vertical"> android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#eae9e9"
>
</View>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:background="@drawable/dynamic_bg_bottom_trend_line"> >
<ImageView <ImageView
android:id="@+id/publish_trend_bottom_img_iv" android:id="@+id/publish_trend_bottom_img_iv"
...@@ -17,14 +24,15 @@ ...@@ -17,14 +24,15 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:padding="3dp" android:padding="3dp"
android:src="@drawable/dynamic_edit_img" /> android:src="@drawable/dynamic_edit_img"
/>
<ImageView <ImageView
android:id="@+id/publish_emoji_iv" android:id="@+id/publish_emoji_iv"
android:layout_width="25dp" android:layout_width="25dp"
android:layout_height="25dp" android:layout_height="25dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="20dp" android:layout_marginLeft="@dimen/platform_dp_32"
android:layout_toRightOf="@+id/publish_trend_bottom_img_iv" android:layout_toRightOf="@+id/publish_trend_bottom_img_iv"
android:padding="3dp" android:padding="3dp"
android:src="@drawable/dynamic_edict_ico_emoji" /> android:src="@drawable/dynamic_edict_ico_emoji" />
...@@ -55,7 +63,7 @@ ...@@ -55,7 +63,7 @@
android:layout_marginLeft="3dp" android:layout_marginLeft="3dp"
android:text="仅对专家可见" android:text="仅对专家可见"
android:textColor="@color/platform_color_666666" android:textColor="@color/platform_color_666666"
android:textSize="11sp" /> android:textSize="12sp" />
</LinearLayout> </LinearLayout>
...@@ -86,7 +94,7 @@ ...@@ -86,7 +94,7 @@
android:layout_marginLeft="3dp" android:layout_marginLeft="3dp"
android:text="匿名" android:text="匿名"
android:textColor="@color/platform_color_666666" android:textColor="@color/platform_color_666666"
android:textSize="11sp" /> android:textSize="12sp" />
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<com.ydl.ydlcommon.view.SquareRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
>
<ImageView
android:id="@+id/item_publish_defult_iv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/dynamic_add_temp"
android:contentDescription="@null"
android:scaleType="fitXY"
android:visibility="gone" />
<ImageView
android:id="@+id/item_publish_iv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:scaleType="fitXY" />
<ImageView
android:id="@+id/item_publish_cancel_iv"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/delete_dynamic" />
</com.ydl.ydlcommon.view.SquareRelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="66dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/dynamic_publish_trends_question_background">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/publish_close"
android:src="@drawable/picture_icon_close"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/platform_dp_16"
android:layout_marginEnd="@dimen/platform_dp_10"
android:padding="@dimen/platform_dp_5"
android:tint="#afb1bc"
tools:ignore="UseAppTint" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="你的感受我在乎"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/publish_close"
android:layout_marginTop="@dimen/platform_dp_16"
android:id="@+id/publish_title"
android:textColor="#afb1bc"
android:textSize="@dimen/platform_sp_16"
/>
<LinearLayout
android:id="@+id/ll_publish_trends"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/dynamic_publish_trends"
app:layout_constraintTop_toBottomOf="@id/publish_title"
android:layout_marginTop="@dimen/platform_dp_16"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/platform_dp_16"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="发动态"
android:textSize="@dimen/dynamic_text_size_18"
android:textStyle="bold"
android:textColor="@color/white"
android:includeFontPadding="false"
android:drawableRight="@drawable/dynamic_publish_right_icon"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_12"
android:drawablePadding="@dimen/platform_dp_5"
>
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这一刻您的真实\n想法"
android:textColor="@color/white"
android:textSize="@dimen/dynamic_text_size_12"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_3"
>
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ll_publish_question"
android:orientation="vertical"
android:background="@drawable/dynamic_publish_question"
app:layout_constraintTop_toBottomOf="@id/publish_title"
android:layout_marginTop="@dimen/platform_dp_16"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="@dimen/platform_dp_16"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="提问题"
android:textSize="@dimen/dynamic_text_size_18"
android:textStyle="bold"
android:textColor="@color/white"
android:includeFontPadding="false"
android:drawableRight="@drawable/dynamic_publish_right_icon"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_12"
android:drawablePadding="@dimen/platform_dp_5"
>
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="数万心理师为您\n答疑解惑"
android:textColor="@color/white"
android:textSize="@dimen/dynamic_text_size_12"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_3"
>
</TextView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/platform_normaldialog_layout_bg"
android:minWidth="200dp"
android:orientation="vertical"
android:scrollbars="vertical">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:textColor="@color/bg_33"
android:textSize="18sp"
android:visibility="gone"
tools:text="提示"
tools:visibility="visible" />
<RelativeLayout
android:id="@+id/message_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="21dp"
android:layout_marginBottom="28dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/img_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/img_tip"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:autoLink="all"
android:gravity="center"
android:lineSpacingMultiplier="1.3"
android:text="将此次编辑保留"
android:textColor="#10233a"
android:textSize="18sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#e7ecf0" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal">
<Button
android:id="@+id/cancel_btn"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/platform_transparent"
android:text="不保留"
android:textColor="#8595a9"
android:textSize="18sp"
android:visibility="visible"
tools:visibility="visible" />
<View
android:id="@+id/view_vertical_line"
android:layout_width="0.5dp"
android:layout_height="match_parent"
android:background="#e7ecf0" />
<Button
android:id="@+id/confirm_btn"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/platform_transparent"
android:text="保留"
android:textColor="@color/platform_main_theme"
android:textSize="18sp"
android:visibility="visible"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<color name="dynamic_fffaec">#fffaec</color> <color name="dynamic_fffaec">#fffaec</color>
<color name="dynamic_black">#000000</color> <color name="dynamic_black">#000000</color>
<color name="dynamic_gray7">#c5c4c4</color> <color name="dynamic_gray7">#c5c4c4</color>
<color name="dynamic_10233A">#10233A</color>
<color name="dynamic_GreyWhite">#F7F7F7</color> <color name="dynamic_GreyWhite">#F7F7F7</color>
<color name="dynamic_text_gray">#B6B6B6</color> <color name="dynamic_text_gray">#B6B6B6</color>
<color name="dynamic_title_bottom_line_bg">#DDDDDD</color> <color name="dynamic_title_bottom_line_bg">#DDDDDD</color>
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
<!--动态顶部title背景变色--> <!--动态顶部title背景变色-->
<color name="dynamic_trend_transparent">#00ffffff</color> <color name="dynamic_trend_transparent">#00ffffff</color>
<color name="dynamic_trend_gray">#f3f3f3</color> <color name="dynamic_trend_gray">#f3f3f3</color>
<color name="dynamic_d0d0d0">#d0d0d0</color>
<!--消息已读--> <!--消息已读-->
......
...@@ -73,7 +73,6 @@ dependencies { ...@@ -73,7 +73,6 @@ dependencies {
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
//开发时使用 //开发时使用
api project(":ydl-platform") api project(":ydl-platform")
api project(':m-user')
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-dynamic-api') implementation modularPublication('com.ydl:m-dynamic-api')
implementation project(':ydl-media') implementation project(':ydl-media')
......
...@@ -16,13 +16,9 @@ import com.yidianling.fm.response.FM; ...@@ -16,13 +16,9 @@ import com.yidianling.fm.response.FM;
*/ */
public class FMListItemView extends LinearLayout { public class FMListItemView extends LinearLayout {
// @BindView(R.id.sdv_head)
private ImageView sdv_head; private ImageView sdv_head;
// @BindView(R.id.tv_title)
private TextView tv_title; private TextView tv_title;
// @BindView(R.id.tv_anchor)
private TextView tv_anchor; private TextView tv_anchor;
// @BindView(R.id.tv_listen_num)
private TextView tv_listen_num; private TextView tv_listen_num;
public FMListItemView(Context context) { public FMListItemView(Context context) {
......
...@@ -39,11 +39,8 @@ public class FMListViewFragment extends BaseFragment implements PtrHandler, Load ...@@ -39,11 +39,8 @@ public class FMListViewFragment extends BaseFragment implements PtrHandler, Load
int tagId; int tagId;
// @BindView(R.id.lv_content)
private ListView lv_content; private ListView lv_content;
// @BindView(R.id.load_more_list_view_container)
private LoadMoreListViewContainer 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 PtrFrameLayout store_house_ptr_frame;
private TextView ll_empty_txt; private TextView ll_empty_txt;
......
...@@ -34,7 +34,7 @@ class HomeBIConstants { ...@@ -34,7 +34,7 @@ class HomeBIConstants {
const val YDL_USER_RADIO_PLAY_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_radio_play_click"//心灵电台play按钮点击 const val YDL_USER_RADIO_PLAY_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_radio_play_click"//心灵电台play按钮点击
const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多 const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多
const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域 const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域
const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit "//首页浏览事件 const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit"//首页浏览事件
const val YDL_PRIVATE_CHAT_CLICK: String = YDL_USER_MAIN_PAGE + "private_chat_click" // 首页咨询分类点击私聊按钮 const val YDL_PRIVATE_CHAT_CLICK: String = YDL_USER_MAIN_PAGE + "private_chat_click" // 首页咨询分类点击私聊按钮
const val YDL_HOME_DWELL_TIME: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_stay_visit" // 首页停留时长 const val YDL_HOME_DWELL_TIME: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_stay_visit" // 首页停留时长
const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想 const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想
......
...@@ -379,6 +379,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -379,6 +379,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
super.onResume() super.onResume()
startTime=System.currentTimeMillis() startTime=System.currentTimeMillis()
if (userVisibleHint) { if (userVisibleHint) {
ActionCountUtils.count(HomeBIConstants.YDL_USER_MAIN_PAGE_VISIT)
if (isFromCreate) { if (isFromCreate) {
isFromCreate = false isFromCreate = false
mPresenter?.loadHomeData() mPresenter?.loadHomeData()
......
package com.yidianling.home.ui.view package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.text.* import android.text.*
import android.text.style.ForegroundColorSpan
import android.text.style.ImageSpan import android.text.style.ImageSpan
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView
import com.ydl.ydl_image.manager.YDLImageCacheManager import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydl_router.manager.YDLRouterManager import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.MoonUtil import com.ydl.ydlcommon.utils.MoonUtil
import com.ydl.ydlcommon.utils.Utils import com.ydl.ydlcommon.utils.Utils
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeAskBean import com.yidianling.home.model.bean.HomeAskBean
...@@ -77,7 +71,10 @@ class HomeAssuageGriefItemView( ...@@ -77,7 +71,10 @@ class HomeAssuageGriefItemView(
homeModuleAssuageGriefViewBottomLine.visibility = View.VISIBLE homeModuleAssuageGriefViewBottomLine.visibility = View.VISIBLE
homeModuleAssuageGriefViewBottomBtn.visibility = View.GONE homeModuleAssuageGriefViewBottomBtn.visibility = View.GONE
} }
ll_topic_detail.setOnClickListener {
//跳转话题详情
homeEvent?.jumpToTopicDetail(bean.topicId.toString())
}
/** /**
* 点赞 * 点赞
......
...@@ -130,6 +130,7 @@ ...@@ -130,6 +130,7 @@
android:layout_marginTop="@dimen/platform_dp_12" android:layout_marginTop="@dimen/platform_dp_12"
android:gravity="center_vertical"> android:gravity="center_vertical">
<LinearLayout <LinearLayout
android:id="@+id/ll_topic_detail"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="28dp" android:layout_height="28dp"
android:orientation="horizontal" android:orientation="horizontal"
......
...@@ -32,7 +32,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -32,7 +32,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
fun setVisibilityFree(boolean: Boolean){ fun setVisibilityFree(boolean: Boolean){
if (boolean){ if (boolean){
qingsuGif.visibility=View.VISIBLE qingsuGif.visibility=View.VISIBLE
homeModuleButtonBannerSecondTitle.text = "免费倾诉" homeModuleButtonBannerSecondTitle.text = "免费热线"
}else{ }else{
qingsuGif.visibility=View.GONE qingsuGif.visibility=View.GONE
homeModuleButtonBannerSecondTitle.text = "倾诉热线" homeModuleButtonBannerSecondTitle.text = "倾诉热线"
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/platform_color_FFFFFF" android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
android:text="应有尽有"/> android:text="抑郁测量"/>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
......
...@@ -84,10 +84,10 @@ dependencies { ...@@ -84,10 +84,10 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.alibaba:arouter-compiler:1.2.2' kapt 'com.alibaba:arouter-compiler:1.2.2'
implementation 'com.ydl:nim-base:1.1.0.3' implementation 'com.ydl:nim-base:1.1.0.4'
// implementation 'com.netease.nimlib:basesdk:8.5.0' // implementation 'com.netease.nimlib:basesdk:8.5.0'
implementation 'com.netease.nimlib:avchat:8.7.2' implementation 'com.netease.nimlib:avchat:9.1.1'
implementation 'com.netease.nimlib:nrtc:8.7.2' implementation 'com.netease.nimlib:nrtc:9.1.1'
api rootProject.ext.dependencies["ydl-user-router"] api rootProject.ext.dependencies["ydl-user-router"]
implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"] implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
......
...@@ -88,21 +88,26 @@ public class MPermission extends BaseMPermission { ...@@ -88,21 +88,26 @@ public class MPermission extends BaseMPermission {
} }
private static void dispatchResult(Object obj, int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { private static void dispatchResult(Object obj, int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
List<String> deniedPermissions = new ArrayList<>(); //处理权限异常
for (int i = 0; i < grantResults.length; i++) { try {
if (grantResults[i] != PackageManager.PERMISSION_GRANTED) { List<String> deniedPermissions = new ArrayList<>();
deniedPermissions.add(permissions[i]); for (int i = 0; i < grantResults.length; i++) {
if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {
deniedPermissions.add(permissions[i]);
}
} }
}
if (deniedPermissions.size() > 0) { if (deniedPermissions.size() > 0) {
if (hasNeverAskAgainPermission(getActivity(obj), deniedPermissions)) { if (hasNeverAskAgainPermission(getActivity(obj), deniedPermissions)) {
doExecuteFailAsNeverAskAgain(obj, requestCode); doExecuteFailAsNeverAskAgain(obj, requestCode);
} else {
doExecuteFail(obj, requestCode);
}
} else { } else {
doExecuteFail(obj, requestCode); doExecuteSuccess(obj, requestCode);
} }
} else { } catch (Exception e) {
doExecuteSuccess(obj, requestCode); e.printStackTrace();
} }
} }
......
...@@ -2,6 +2,7 @@ package com.yidianling.im.config.provider ...@@ -2,6 +2,7 @@ package com.yidianling.im.config.provider
import android.content.Context import android.content.Context
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import com.netease.nimlib.sdk.msg.model.IMMessage
import com.netease.nimlib.sdk.uinfo.model.UserInfo import com.netease.nimlib.sdk.uinfo.model.UserInfo
import com.ydl.ydlcommon.utils.UserInfoCache import com.ydl.ydlcommon.utils.UserInfoCache
import com.yidianling.uikit.api.wrapper.NimUserInfoProvider import com.yidianling.uikit.api.wrapper.NimUserInfoProvider
......
...@@ -104,7 +104,7 @@ public class MsgViewHolderConfirmOrder extends MsgViewHolderBase { ...@@ -104,7 +104,7 @@ public class MsgViewHolderConfirmOrder extends MsgViewHolderBase {
orderId = customAttachment.orderId; orderId = customAttachment.orderId;
serviceId = customAttachment.serviceId; serviceId = customAttachment.serviceId;
flag = customAttachment.status; flag = customAttachment.status;
ToastUtil.toastShort("flag:"+flag);
if (flag == 1) { if (flag == 1) {
// 1代表已确认,0代表待确认 // 1代表已确认,0代表待确认
tv_submit.setText("已确认"); tv_submit.setText("已确认");
......
...@@ -17,11 +17,9 @@ import com.netease.nimlib.sdk.msg.model.IMMessage; ...@@ -17,11 +17,9 @@ import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.webview.H5Params; import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity; import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.data.http.RxUtils; import com.ydl.ydlcommon.data.http.RxUtils;
import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.config.constants.ImConstants; import com.yidianling.im.config.constants.ImConstants;
import com.yidianling.im.helper.IMChatUtil;
import com.yidianling.im.http.ImRetrofitApi; import com.yidianling.im.http.ImRetrofitApi;
import com.yidianling.im.session.extension.CustomAttachmentConfirmOrder; import com.yidianling.im.session.extension.CustomAttachmentConfirmOrder;
import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone; import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone;
...@@ -51,7 +49,6 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase { ...@@ -51,7 +49,6 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
public String orderId; public String orderId;
/***0 未确认 1已确认*/ /***0 未确认 1已确认*/
public int flag; public int flag;
public boolean isSureed = false;//是否已确认
public MsgViewHolderOrderAlreadyDone(BaseMultiItemFetchLoadAdapter adapter) { public MsgViewHolderOrderAlreadyDone(BaseMultiItemFetchLoadAdapter adapter) {
...@@ -129,10 +126,10 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase { ...@@ -129,10 +126,10 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
.subscribe(it -> { .subscribe(it -> {
//确认完成,按钮置灰,更新本地消息 //确认完成,按钮置灰,更新本地消息
updateLocalMsg(); updateLocalMsg();
}, throwable -> }, throwable -> {
ToastUtil.toastShort(throwable.getMessage()) ToastUtil.toastShort(throwable.getMessage());
}
); );
}); });
} }
...@@ -152,19 +149,18 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase { ...@@ -152,19 +149,18 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
updateSureView("已确认"); updateSureView("已确认");
} }
} else { } else {
isSureed = false;
tv_submit.setText("确认"); tv_submit.setText("确认");
tv_submit.setEnabled(true); tv_submit.setEnabled(true);
tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12)); tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12));
} }
} else { } else {
isSureed = false;
tv_submit.setText("确认"); tv_submit.setText("确认");
tv_submit.setEnabled(true); tv_submit.setEnabled(true);
tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12)); tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12));
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
} }
hideItemBg(); hideItemBg();
......
...@@ -86,10 +86,15 @@ class NewMultiMessageFragment : BaseFragment() { ...@@ -86,10 +86,15 @@ class NewMultiMessageFragment : BaseFragment() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
getMsgData() getMsgData()
NIMClient.getService(MsgService::class.java).setChattingAccount(
MsgService.MSG_CHATTING_ACCOUNT_NONE, try {
SessionTypeEnum.None NIMClient.getService(MsgService::class.java).setChattingAccount(
) MsgService.MSG_CHATTING_ACCOUNT_NONE,
SessionTypeEnum.None
)
} catch (e: Exception) {
e.printStackTrace()
}
} }
override fun onPause() { override fun onPause() {
......
...@@ -13,11 +13,8 @@ import com.yidianling.im.bean.MsgData; ...@@ -13,11 +13,8 @@ import com.yidianling.im.bean.MsgData;
*/ */
public class MsgListItemView extends LinearLayout { public class MsgListItemView extends LinearLayout {
// @BindView(R.id.tv_content)
TextView tv_content; TextView tv_content;
// @BindView(R.id.tv_time)
TextView tv_time; TextView tv_time;
// @BindView(R.id.title)
TextView title; TextView title;
private int type = 0; private int type = 0;
......
...@@ -36,17 +36,12 @@ import jp.wasabeef.glide.transformations.RoundedCornersTransformation; ...@@ -36,17 +36,12 @@ import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
*/ */
public class SystemItemView extends LinearLayout { public class SystemItemView extends LinearLayout {
// @BindView(R.id.banner)
ImageView banner; ImageView banner;
// @BindView(R.id.content)
TextView content; TextView content;
// @BindView(R.id.recycler_list)
RecyclerView recycler_list; RecyclerView recycler_list;
// //列表适配器 // //列表适配器
private BaseRecyclerAdapter<SystemMsgBean.SystemMBean> adapter; private BaseRecyclerAdapter<SystemMsgBean.SystemMBean> adapter;
// @BindView(R.id.time)
TextView time; TextView time;
// @BindView(R.id.rela_body)
RelativeLayout rela_body; RelativeLayout rela_body;
Context context; Context context;
......
...@@ -7,6 +7,7 @@ import android.graphics.drawable.Drawable; ...@@ -7,6 +7,7 @@ import android.graphics.drawable.Drawable;
import android.text.TextUtils; import android.text.TextUtils;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.netease.nimlib.sdk.team.model.Team; import com.netease.nimlib.sdk.team.model.Team;
import com.netease.nimlib.sdk.uinfo.UserInfoProvider; import com.netease.nimlib.sdk.uinfo.UserInfoProvider;
import com.netease.nimlib.sdk.uinfo.model.UserInfo; import com.netease.nimlib.sdk.uinfo.model.UserInfo;
...@@ -62,6 +63,11 @@ public class NimUserInfoProvider implements UserInfoProvider { ...@@ -62,6 +63,11 @@ public class NimUserInfoProvider implements UserInfoProvider {
} }
@Override @Override
public String getDisplayTitleForMessageNotifier(IMMessage imMessage) {
return null;
}
@Override
public String getDisplayNameForMessageNotifier(String account, String sessionId, SessionTypeEnum sessionType) { public String getDisplayNameForMessageNotifier(String account, String sessionId, SessionTypeEnum sessionType) {
String nick = null; String nick = null;
if (sessionType == SessionTypeEnum.P2P) { if (sessionType == SessionTypeEnum.P2P) {
......
...@@ -31,6 +31,7 @@ import androidx.constraintlayout.widget.ConstraintLayout; ...@@ -31,6 +31,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.SPUtils; import com.blankj.utilcode.util.SPUtils;
...@@ -73,6 +74,8 @@ import com.yidianling.uikit.custom.widget.SafeHelpRemindDialog; ...@@ -73,6 +74,8 @@ import com.yidianling.uikit.custom.widget.SafeHelpRemindDialog;
import com.yidianling.user.api.service.IUserService; import com.yidianling.user.api.service.IUserService;
import java.io.File; import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -649,12 +652,25 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba ...@@ -649,12 +652,25 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
fillHwPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue()); fillHwPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue());
fillOppoPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue()); fillOppoPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue());
fillVivoPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue()); fillVivoPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue());
payload.put("sessionId", NimUIKit.getAccount()); fillApnsPayload(payload, NimUIKit.getAccount(), container.sessionType.getValue());
payload.put("sessionType", container.sessionType.getValue());
msg.setPushPayload(payload); msg.setPushPayload(payload);
return msg; 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) { private void fillHwPayload(Map<String, Object> pushPayload, String sessionId, int sessionType) {
//华为 //华为
Intent hwIntent = new Intent(Intent.ACTION_VIEW); Intent hwIntent = new Intent(Intent.ACTION_VIEW);
......
...@@ -26,7 +26,6 @@ android { ...@@ -26,7 +26,6 @@ android {
targetSdkVersion rootProject.ext.android["targetSdkVersion"] targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
javaCompileOptions { javaCompileOptions {
......
...@@ -107,7 +107,7 @@ class UserMyPageEvent{ ...@@ -107,7 +107,7 @@ class UserMyPageEvent{
const val YDL_USER_RADIO_PLAY_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_radio_play_click"//心灵电台play按钮点击 const val YDL_USER_RADIO_PLAY_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_radio_play_click"//心灵电台play按钮点击
const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多 const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多
const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域 const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域
const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit "//首页浏览事件 const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit"//首页浏览事件
} }
} }
......
...@@ -55,15 +55,10 @@ public class AccountHistoryActivity extends BaseActivity implements PtrHandler, ...@@ -55,15 +55,10 @@ public class AccountHistoryActivity extends BaseActivity implements PtrHandler,
private String available = "0.00"; private String available = "0.00";
LoadMoreFooterView loadMoreFooterView; LoadMoreFooterView loadMoreFooterView;
// @BindView(R.id.title_bar)
TitleBar title_bar; TitleBar title_bar;
// @BindView(R.id.lv_content)
ListView lv_content; ListView lv_content;
// @BindView(R.id.ll_empty)
LinearLayout ll_empty; LinearLayout ll_empty;
// @BindView(R.id.load_more_list_view_container)
LoadMoreListViewContainer load_more_list_view_container; LoadMoreListViewContainer load_more_list_view_container;
// @BindView(R.id.store_house_ptr_frame)
PtrFrameLayout store_house_ptr_frame; PtrFrameLayout store_house_ptr_frame;
@NotNull @NotNull
......
...@@ -24,14 +24,10 @@ import org.jetbrains.annotations.NotNull; ...@@ -24,14 +24,10 @@ import org.jetbrains.annotations.NotNull;
*/ */
public class ContactCustomerServiceActivity extends BaseActivity { public class ContactCustomerServiceActivity extends BaseActivity {
// @BindView(R.id.tb_title)
TitleBar tb_title; TitleBar tb_title;
// @BindView(R.id.jtv_custom_service)
JumpTextView jtv_custom_service; JumpTextView jtv_custom_service;
// @BindView(R.id.jtv_wechat)
JumpTextView jtv_wechat; JumpTextView jtv_wechat;
// @BindView(R.id.tv_service_time)
TextView tvServiceTime; TextView tvServiceTime;
String work_time = PlatformDataManager.INSTANCE.getRam().getGlobalInfo() == null ? "早8:30-凌晨2:00" : PlatformDataManager.INSTANCE.getRam().getGlobalInfo().info.work_time; 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; ...@@ -17,11 +17,8 @@ import org.jetbrains.annotations.NotNull;
public class HelpActivity extends BaseActivity implements View.OnClickListener { public class HelpActivity extends BaseActivity implements View.OnClickListener {
// @BindView(R.id.jtv_about_us)
JumpTextView jtv_about_us; JumpTextView jtv_about_us;
// @BindView(R.id.jtv_feed_back)
JumpTextView jtv_feed_back; JumpTextView jtv_feed_back;
// @BindView(R.id.jtv_custom_service)
JumpTextView jtv_custom_service; JumpTextView jtv_custom_service;
@Override @Override
......
...@@ -32,15 +32,10 @@ import io.reactivex.android.schedulers.AndroidSchedulers; ...@@ -32,15 +32,10 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
public class PersonalDesActivity extends BaseActivity { public class PersonalDesActivity extends BaseActivity {
// @BindView(R.id.image_back)
ImageView imageBack; ImageView imageBack;
// @BindView(R.id.tv_center_title)
TextView tvCenterTitle; TextView tvCenterTitle;
// @BindView(R.id.text_save)
TextView textSave; TextView textSave;
// @BindView(R.id.rela_toolBar)
RelativeLayout relaToolBar; RelativeLayout relaToolBar;
// @BindView(R.id.edit_des)
EditText editDes; EditText editDes;
@NotNull @NotNull
@Override @Override
......
...@@ -26,9 +26,7 @@ import io.reactivex.functions.Consumer; ...@@ -26,9 +26,7 @@ import io.reactivex.functions.Consumer;
*/ */
public class PwdCheckActivity extends BaseActivity { public class PwdCheckActivity extends BaseActivity {
// @BindView(R.id.check_password)
EditText check_password; EditText check_password;
// @BindView(R.id.change_next)
RoundCornerButton change_next; RoundCornerButton change_next;
@NotNull @NotNull
......
...@@ -48,15 +48,10 @@ public class RechargeActivity extends BaseActivity { ...@@ -48,15 +48,10 @@ public class RechargeActivity extends BaseActivity {
return new StatusBarOptions(true,true); return new StatusBarOptions(true,true);
} }
// @BindView(R.id.recharge_rgv)
RechargeGridView recharge_rgv; RechargeGridView recharge_rgv;
// @BindView(R.id.recharge_design)
TextView recharge_design; TextView recharge_design;
// @BindView(R.id.recharge_tv)
TextView recharge_tv; TextView recharge_tv;
// @BindView(R.id.recharge_et)
EditText recharge_et; EditText recharge_et;
// @BindView(R.id.rcb_next)
RoundCornerButton rcb_next; RoundCornerButton rcb_next;
private List<String> prices = new ArrayList<>(); private List<String> prices = new ArrayList<>();
......
...@@ -19,17 +19,11 @@ public class RechargeGridView extends LinearLayout { ...@@ -19,17 +19,11 @@ public class RechargeGridView extends LinearLayout {
List<RoundCornerButton> mList = new ArrayList<>(); List<RoundCornerButton> mList = new ArrayList<>();
// @BindView(R.id.rcb_01)
RoundCornerButton rcb_01; RoundCornerButton rcb_01;
// @BindView(R.id.rcb_02)
RoundCornerButton rcb_02; RoundCornerButton rcb_02;
// @BindView(R.id.rcb_03)
RoundCornerButton rcb_03; RoundCornerButton rcb_03;
// @BindView(R.id.rcb_04)
RoundCornerButton rcb_04; RoundCornerButton rcb_04;
// @BindView(R.id.rcb_05)
RoundCornerButton rcb_05; RoundCornerButton rcb_05;
// @BindView(R.id.rcb_06)
RoundCornerButton rcb_06; RoundCornerButton rcb_06;
private ItemClickListener itemClickListener; private ItemClickListener itemClickListener;
......
...@@ -41,9 +41,7 @@ public class SetInfoActivity extends BaseActivity { ...@@ -41,9 +41,7 @@ public class SetInfoActivity extends BaseActivity {
String mTitle; String mTitle;
String mOldString; String mOldString;
// @BindView(R.id.det_set_info)
DeleteEditTextView det_set_info; DeleteEditTextView det_set_info;
// @BindView(R.id.tb_title_bar)
TitleBar tb_title_bar; TitleBar tb_title_bar;
Animation shake; Animation shake;
......
...@@ -16,17 +16,11 @@ class RedPacketGridView : LinearLayout { ...@@ -16,17 +16,11 @@ class RedPacketGridView : LinearLayout {
internal var mList: MutableList<RoundCornerButton> = ArrayList() internal var mList: MutableList<RoundCornerButton> = ArrayList()
// @BindView(R.id.rcb_01)
internal var rcb_01: RoundCornerButton?=null internal var rcb_01: RoundCornerButton?=null
// @BindView(R.id.rcb_02)
internal var rcb_02: RoundCornerButton?=null internal var rcb_02: RoundCornerButton?=null
// @BindView(R.id.rcb_03)
internal var rcb_03: RoundCornerButton?=null internal var rcb_03: RoundCornerButton?=null
// @BindView(R.id.rcb_04)
internal var rcb_04: RoundCornerButton?=null internal var rcb_04: RoundCornerButton?=null
// @BindView(R.id.rcb_05)
internal var rcb_05: RoundCornerButton?=null internal var rcb_05: RoundCornerButton?=null
// @BindView(R.id.rcb_06)
internal var rcb_06: RoundCornerButton?=null internal var rcb_06: RoundCornerButton?=null
private var itemClickListener: ItemClickListener? = null private var itemClickListener: ItemClickListener? = null
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="23"
android:viewportHeight="23">
<path
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="M11.152,1.168C11.6775,1.168 12.194,1.2018 12.7007,1.2673C13.5956,2.8213 14.4191,3.8448 15.6227,4.4929C16.8082,5.1315 18.1493,5.29 19.3884,5.0326C20.6847,5.9875 21.2078,6.8205 21.6003,7.717C20.5979,9.1688 20.065,10.354 20.065,11.656C20.065,12.9573 20.5978,14.1425 21.4743,15.0309C21.2078,16.491 20.6847,17.3239 20.0555,18.0756C18.1495,18.0214 16.8083,18.1799 15.6228,18.8185C14.4191,19.4666 13.5956,20.4902 13.2123,21.6371C12.1944,22.1097 11.6777,22.144 11.152,22.144C10.6263,22.144 10.1096,22.1097 9.604,22.0448C8.7084,20.4902 7.8849,19.4666 6.6813,18.8185C5.4957,18.1799 4.1545,18.0214 2.9162,18.2793C1.6193,17.3239 1.0962,16.491 0.7037,15.5945C1.7062,14.1425 2.239,12.9573 2.239,11.656C2.239,10.354 1.7061,9.1688 0.83,8.2815C1.0962,6.8205 1.6193,5.9875 2.2485,5.2359C4.1547,5.29 5.4958,5.1315 6.6812,4.493C7.8849,3.8448 8.7084,2.8213 9.0917,1.6745C10.11,1.2018 10.6265,1.168 11.152,1.168Z"
android:strokeWidth="1.104"
android:strokeColor="#FFFFFF" />
<path
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="M11.152,7.792C12.219,7.792 13.185,8.2245 13.8843,8.9237C14.5835,9.623 15.016,10.589 15.016,11.656C15.016,12.723 14.5835,13.689 13.8843,14.3883C13.185,15.0875 12.219,15.52 11.152,15.52C10.085,15.52 9.119,15.0875 8.4197,14.3883C7.7205,13.689 7.288,12.723 7.288,11.656C7.288,10.589 7.7205,9.623 8.4197,8.9237C9.119,8.2245 10.085,7.792 11.152,7.792Z"
android:strokeWidth="1.104"
android:strokeColor="#FFFFFF" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="22dp"
android:viewportWidth="22"
android:viewportHeight="22">
<path
android:fillAlpha="0"
android:fillColor="#D8D8D8"
android:fillType="evenOdd"
android:pathData="M0,0h23v23h-23z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
<path
android:fillColor="#ffffff"
android:fillType="nonZero"
android:pathData="M21.9712,19.5604L21.9712,16.2415L21.9712,12.9039L21.9712,12.3466C21.9712,12.0554 21.7332,11.8081 21.4452,11.7924L21.3857,11.7924C21.0945,11.7924 20.8159,12.0492 20.8284,12.3497L20.8284,18.0794C20.8284,18.7463 20.8378,19.4132 20.8284,20.0801C20.8284,20.1083 20.8253,20.1396 20.8253,20.1678L20.8253,20.2053C20.819,20.2366 20.8033,20.268 20.7971,20.293C20.7908,20.318 20.7814,20.34 20.7752,20.365C20.747,20.4088 20.7251,20.4558 20.7,20.4996C20.6969,20.5028 20.6938,20.509 20.6906,20.5153C20.6812,20.5278 20.6687,20.5466 20.6625,20.5529C20.6311,20.5873 20.5967,20.6217 20.5623,20.6562C20.5497,20.6687 20.5372,20.6781 20.5247,20.6875C20.5216,20.6906 20.5184,20.6906 20.5122,20.6938C20.4652,20.7219 20.4182,20.7501 20.3681,20.7752C20.3462,20.7814 20.3274,20.7908 20.3055,20.7971C20.2617,20.8096 20.2147,20.819 20.1709,20.8284C20.1521,20.8284 20.1333,20.8315 20.1145,20.8315L3.9556,20.8315C3.5987,20.8315 3.2386,20.844 2.8817,20.8315L2.8347,20.8315C2.8285,20.8315 2.8222,20.8284 2.816,20.8253C2.769,20.8127 2.7189,20.8033 2.6719,20.7877C2.6657,20.7846 2.6469,20.7783 2.6344,20.7752C2.6344,20.7752 2.6312,20.7752 2.6312,20.772C2.5811,20.7439 2.5248,20.6969 2.4716,20.6781C2.4622,20.6687 2.4496,20.6593 2.4402,20.6499C2.4027,20.6155 2.3682,20.5779 2.3338,20.5403C2.3338,20.5435 2.3369,20.5466 2.3369,20.5466C2.3338,20.5435 2.3338,20.5403 2.3307,20.5372L2.3244,20.531C2.3119,20.5184 2.3025,20.4996 2.3025,20.4934C2.2994,20.4871 2.2931,20.4809 2.29,20.4746C2.268,20.4402 2.2493,20.4057 2.2336,20.3681C2.2461,20.3901 2.2086,20.2993 2.1992,20.2648C2.196,20.2523 2.1866,20.1991 2.1804,20.1678C2.1772,20.1364 2.1741,20.0832 2.1741,20.0676L2.1741,20.0394L2.1741,19.5917L2.1741,17.3906L2.1741,14.0279L2.1741,10.1862L2.1741,6.5982L2.1741,3.9368C2.1741,3.5705 2.1772,3.2042 2.1772,2.8347L2.1772,2.8191C2.1804,2.8003 2.1866,2.7784 2.1898,2.769C2.2023,2.722 2.2179,2.6782 2.2305,2.6312C2.2367,2.6187 2.243,2.6031 2.2493,2.5905C2.2618,2.5655 2.2774,2.5436 2.29,2.5185C2.2931,2.5154 2.2994,2.5029 2.3056,2.4903C2.3087,2.4903 2.3651,2.4183 2.3776,2.4027C2.4058,2.3745 2.434,2.3494 2.4622,2.3244C2.4622,2.3244 2.5091,2.29 2.5404,2.2743C2.5655,2.2618 2.5874,2.2461 2.6124,2.2336C2.6187,2.2305 2.6218,2.2273 2.6281,2.2242C2.6688,2.2117 2.7095,2.196 2.7533,2.1866C2.7784,2.1804 2.8003,2.1772 2.8254,2.171C2.8598,2.171 2.8974,2.1678 2.9318,2.1678L11.0504,2.1678C11.351,2.1678 11.6077,1.9142 11.6077,1.6105L11.6077,1.5792C11.6077,1.2787 11.3541,1.0219 11.0504,1.0219L5.2706,1.0219C4.4973,1.0219 3.7239,1.0188 2.9475,1.0219C2.0739,1.025 1.2411,1.6356 1.0689,2.5154C1.0282,2.7314 1.025,2.9318 1.025,3.1447L1.025,18.7964C1.025,19.2159 1.0188,19.6355 1.025,20.0582C1.0344,20.9505 1.6763,21.7896 2.5811,21.9305C2.7784,21.9618 2.9631,21.9649 3.1604,21.9649L18.8183,21.9649C19.2347,21.9649 19.648,21.9712 20.0644,21.9649C21.0507,21.9524 21.8522,21.2135 21.9587,20.2398C21.9869,20.0206 21.9712,19.7858 21.9712,19.5604L21.9712,19.5604ZM2.8446,20.8596L2.8246,20.8596L2.8446,20.8596ZM2.3709,20.6198C2.3709,20.6198 2.3709,20.6124 2.3709,20.6198C2.3309,20.5829 2.3109,20.5535 2.2809,20.524C2.2809,20.5092 2.3009,20.5313 2.3709,20.6198Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
<path
android:fillColor="#ffffff"
android:fillType="nonZero"
android:pathData="M2.0947,20.5827C2.0247,20.4935 1.9947,20.4729 2.0047,20.4866C2.0247,20.5141 2.0647,20.5484 2.0947,20.5827ZM10.5325,11.3358L10.5168,11.3515C10.1724,11.6959 10.4323,12.2939 10.9113,12.3002L10.9551,12.3002C11.0178,12.3002 11.0835,12.2876 11.143,12.2657C11.2181,12.2407 11.287,12.1968 11.3496,12.1373C11.6753,11.8149 11.9978,11.4924 12.3234,11.1667C13.0967,10.3997 13.8669,9.6294 14.6403,8.8624C15.5827,7.9262 16.522,6.99 17.4644,6.0539C18.2753,5.2461 19.0863,4.4414 19.8972,3.6336C20.107,3.4239 20.3199,3.2204 20.5328,3.0106L20.5328,6.8711C20.5328,7.1716 20.7864,7.4284 21.0901,7.4284L21.1214,7.4284C21.422,7.4284 21.6787,7.1748 21.6787,6.8711L21.6787,3.1264C21.6787,2.8196 21.6662,2.519 21.5503,2.231C21.2654,1.5296 20.6267,1.0631 19.869,1.0162C19.3179,0.9817 18.7544,1.013 18.2033,1.013L16.2183,1.013C15.9177,1.013 15.661,1.2666 15.661,1.5703L15.661,1.6017C15.661,1.9022 15.9146,2.159 16.2183,2.159C17.4018,2.159 18.5853,2.1433 19.7688,2.159L19.3273,2.6004C18.5509,3.3738 17.7713,4.1471 16.9948,4.9205C16.0555,5.8566 15.1131,6.7928 14.1738,7.7289C13.3597,8.5367 12.5457,9.3477 11.7348,10.1554C11.3246,10.5468 10.9113,10.9288 10.5325,11.3358Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="240dp"> android:layout_height="250dp">
<ImageView <ImageView
android:id="@+id/img_bg" android:id="@+id/img_bg"
...@@ -39,14 +39,23 @@ ...@@ -39,14 +39,23 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/user_mine_profile_bg_11" /> android:src="@drawable/user_mine_profile_bg_11" />
<ImageView
android:id="@+id/iv_share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:layout_marginEnd="15dp"
android:layout_toLeftOf="@id/iv_edit_info"
android:padding="5dp"
android:src="@drawable/user_mine_ic_share" />
<ImageView <ImageView
android:id="@+id/iv_edit_info" android:id="@+id/iv_edit_info"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_marginTop="36dp" android:layout_marginTop="34dp"
android:layout_marginRight="27dp" android:layout_marginEnd="27dp"
android:padding="5dp" android:padding="5dp"
android:src="@drawable/user_mine_ic_mine_setting_info" /> android:src="@drawable/user_mine_ic_mine_setting_info" />
...@@ -66,7 +75,7 @@ ...@@ -66,7 +75,7 @@
android:layout_width="70dp" android:layout_width="70dp"
android:layout_height="70dp" android:layout_height="70dp"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_marginTop="50dp" android:layout_marginTop="60dp"
android:src="@drawable/platform_head_place_hold_pic" android:src="@drawable/platform_head_place_hold_pic"
myapp:pa_border_color="@color/white" myapp:pa_border_color="@color/white"
myapp:pa_border_width="2dp" /> myapp:pa_border_width="2dp" />
...@@ -81,7 +90,7 @@ ...@@ -81,7 +90,7 @@
android:layout_toRightOf="@+id/img_head" android:layout_toRightOf="@+id/img_head"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="22sp" android:textSize="22sp"
tools:text="用户A" /> tools:text="用户A用户A用户A用户A用户" />
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
...@@ -427,10 +436,34 @@ ...@@ -427,10 +436,34 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/ll_service"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/user_mine_ic_service" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="建议/反馈"
android:textColor="@color/platform_color_999999"
android:textSize="12sp" />
</LinearLayout>
<View <View
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="3" /> android:layout_weight="2" />
</LinearLayout> </LinearLayout>
...@@ -478,19 +511,6 @@ ...@@ -478,19 +511,6 @@
app:pa_jump_tv_right_size="10sp" app:pa_jump_tv_right_size="10sp"
app:pa_jump_tv_right_text="设置手势密码,保障隐私安全" /> app:pa_jump_tv_right_text="设置手势密码,保障隐私安全" />
<View
style="@style/user_new_divide_color_style"
android:background="#ebebeb" />
<com.ydl.ydlcommon.view.JumpTextView
android:id="@+id/jtv_account_setting"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
app:pa_jump_tv_icon="@drawable/user_mine_ic_mine_setting"
app:pa_jump_tv_left_color="@color/platform_color_999999"
app:pa_jump_tv_left_size="12sp"
app:pa_jump_tv_left_text="设置" />
<View <View
style="@style/user_new_divide_color_style" style="@style/user_new_divide_color_style"
...@@ -520,34 +540,6 @@ ...@@ -520,34 +540,6 @@
app:pa_jump_tv_left_size="12sp" app:pa_jump_tv_left_size="12sp"
app:pa_jump_tv_left_text="关于我们" /> app:pa_jump_tv_left_text="关于我们" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="20dp"
android:layout_marginRight="14dp"
android:elevation="4dp"
app:cardCornerRadius="6dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.ydl.ydlcommon.view.JumpTextView
android:id="@+id/jtv_account_share"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
app:pa_jump_tv_icon="@drawable/user_mine_ic_mine_share"
app:pa_jump_tv_left_color="@color/platform_color_999999"
app:pa_jump_tv_left_size="12sp"
app:pa_jump_tv_left_text="分享" />
<View <View
style="@style/user_new_divide_color_style" style="@style/user_new_divide_color_style"
android:background="#ebebeb" /> android:background="#ebebeb" />
...@@ -563,12 +555,10 @@ ...@@ -563,12 +555,10 @@
app:pa_jump_tv_left_text="专家入驻" app:pa_jump_tv_left_text="专家入驻"
app:pa_jump_tv_right_color="#b3b3b3" app:pa_jump_tv_right_color="#b3b3b3"
app:pa_jump_tv_right_size="10sp" /> app:pa_jump_tv_right_size="10sp" />
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<com.ydl.ydlcommon.view.JumpTextView <com.ydl.ydlcommon.view.JumpTextView
android:id="@+id/jtv_test" android:id="@+id/jtv_test"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -584,11 +574,11 @@ ...@@ -584,11 +574,11 @@
<ImageView <ImageView
android:id="@+id/iv_mine_logo" android:id="@+id/iv_mine_logo"
android:layout_marginTop="20dp"
tools:src="@drawable/user_mine_ydl_logo"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@color/baby_blue" android:background="@color/baby_blue"
android:layout_height="wrap_content"/> tools:src="@drawable/user_mine_ydl_logo" />
</LinearLayout> </LinearLayout>
......
...@@ -146,6 +146,7 @@ dependencies { ...@@ -146,6 +146,7 @@ dependencies {
api rootProject.ext.dependencies["support-multidex"] api rootProject.ext.dependencies["support-multidex"]
api rootProject.ext.dependencies["tablayout"] api rootProject.ext.dependencies["tablayout"]
api rootProject.ext.dependencies["xrecyclerview"] api rootProject.ext.dependencies["xrecyclerview"]
api rootProject.ext.dependencies["mmkv"]
api rootProject.ext.dependencies["flowlayout"] api rootProject.ext.dependencies["flowlayout"]
api rootProject.ext.dependencies["androidanimations"] api rootProject.ext.dependencies["androidanimations"]
//====================Tools==================== //====================Tools====================
......
...@@ -5,6 +5,7 @@ import android.app.Application ...@@ -5,6 +5,7 @@ import android.app.Application
import android.os.Build import android.os.Build
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.bun.miitmdid.core.JLibrary import com.bun.miitmdid.core.JLibrary
import com.tencent.mmkv.MMKV
import com.ydl.devicesidlib.DeviceIDHelper import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.UpLoadLogUtils import com.ydl.ydlcommon.data.http.UpLoadLogUtils
...@@ -31,6 +32,7 @@ object YdlRepository { ...@@ -31,6 +32,7 @@ object YdlRepository {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
JLibrary.InitEntry(app) JLibrary.InitEntry(app)
} }
MMKV.initialize(app);
LogHelper.getInstance().deleteExpireLogSync() LogHelper.getInstance().deleteExpireLogSync()
LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
......
...@@ -27,10 +27,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers; ...@@ -27,10 +27,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
*/ */
public class LoopViewPager extends RelativeLayout { public class LoopViewPager extends RelativeLayout {
// @BindView(R.id.viewPager)
DisallowParentTouchViewPager viewPager; DisallowParentTouchViewPager viewPager;
// @BindView(R.id.index_viewGroup)
LinearLayout group;//放小点的View LinearLayout group;//放小点的View
ImageView[] mImageViews;//装图片的数组 ImageView[] mImageViews;//装图片的数组
......
...@@ -163,7 +163,7 @@ class YDLShareDialog : DialogFragment { ...@@ -163,7 +163,7 @@ class YDLShareDialog : DialogFragment {
this.dialog.requestWindowFeature(Window.FEATURE_NO_TITLE) this.dialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
val window = this.dialog.window val window = this.dialog.window
//去掉dialog默认的padding //去掉dialog默认的padding
window!!.decorView.setPadding(0, 0, 0, 0) window?.decorView?.setPadding(0, 0, 0, 0)
val lp = window.attributes val lp = window.attributes
lp.width = WindowManager.LayoutParams.MATCH_PARENT lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.height = WindowManager.LayoutParams.WRAP_CONTENT lp.height = WindowManager.LayoutParams.WRAP_CONTENT
...@@ -198,11 +198,19 @@ class YDLShareDialog : DialogFragment { ...@@ -198,11 +198,19 @@ class YDLShareDialog : DialogFragment {
when (typeStyle) { when (typeStyle) {
TYPE1 -> { TYPE1 -> {
//样式1 //样式1
//删除、举报、首页
ll_layout2.visibility = View.GONE ll_layout2.visibility = View.GONE
//动态
ll_dynamic.visibility = View.VISIBLE
} }
TYPE2 -> { TYPE2 -> {
//样式2 //样式2
//删除、举报、首页
ll_layout2.visibility = View.VISIBLE
//动态
ll_dynamic.visibility = View.GONE ll_dynamic.visibility = View.GONE
//举报
ll_report.visibility = View.GONE ll_report.visibility = View.GONE
setStyle() setStyle()
val deleteParams = LinearLayout.LayoutParams(dp55, ViewGroup.LayoutParams.WRAP_CONTENT) val deleteParams = LinearLayout.LayoutParams(dp55, ViewGroup.LayoutParams.WRAP_CONTENT)
...@@ -212,6 +220,10 @@ class YDLShareDialog : DialogFragment { ...@@ -212,6 +220,10 @@ class YDLShareDialog : DialogFragment {
} }
TYPE3 -> { TYPE3 -> {
//样式3 //样式3
//删除、举报、首页
ll_layout2.visibility = View.VISIBLE
ll_report.visibility = View.VISIBLE
//动态
ll_dynamic.visibility = View.GONE ll_dynamic.visibility = View.GONE
ll_delete.visibility = View.GONE ll_delete.visibility = View.GONE
setStyle() setStyle()
...@@ -222,25 +234,33 @@ class YDLShareDialog : DialogFragment { ...@@ -222,25 +234,33 @@ class YDLShareDialog : DialogFragment {
} }
TYPE4 -> { TYPE4 -> {
//样式4 //样式4
//动态
ll_dynamic.visibility = View.GONE ll_dynamic.visibility = View.GONE
//删除、举报、首页
ll_layout2.visibility = View.GONE ll_layout2.visibility = View.GONE
setStyle() setStyle()
} }
TYPE5 -> { TYPE5 -> {
//样式5 //样式5
//动态
ll_dynamic.visibility = View.GONE ll_dynamic.visibility = View.GONE
ll_poster.visibility = View.VISIBLE ll_poster.visibility = View.VISIBLE
//删除、举报、首页
ll_layout2.visibility = View.GONE ll_layout2.visibility = View.GONE
} }
TYPE6 -> { TYPE6 -> {
//样式6 //样式6
//动态
ll_dynamic.visibility = View.GONE ll_dynamic.visibility = View.GONE
ll_save.visibility = View.VISIBLE ll_save.visibility = View.VISIBLE
//删除、举报、首页
ll_layout2.visibility = View.GONE ll_layout2.visibility = View.GONE
} }
TYPE7 -> { TYPE7 -> {
//样式7 //样式7
//删除、举报、首页
ll_layout2.visibility = View.GONE ll_layout2.visibility = View.GONE
//动态
ll_dynamic.visibility = View.GONE ll_dynamic.visibility = View.GONE
} }
TYPE8 -> { TYPE8 -> {
...@@ -263,11 +283,11 @@ class YDLShareDialog : DialogFragment { ...@@ -263,11 +283,11 @@ class YDLShareDialog : DialogFragment {
Executors.newCachedThreadPool().execute { Executors.newCachedThreadPool().execute {
var imageByte = Base64.decode(base64DataStr, Base64.DEFAULT) var imageByte = Base64.decode(base64DataStr, Base64.DEFAULT)
mActivity!!.runOnUiThread { mActivity?.runOnUiThread {
GlideApp.with(this) GlideApp.with(this)
.load(imageByte) .load(imageByte)
.diskCacheStrategy(DiskCacheStrategy.NONE) .diskCacheStrategy(DiskCacheStrategy.NONE)
.into(img_pic) .into(img_pic)
} }
} }
...@@ -401,7 +421,20 @@ class YDLShareDialog : DialogFragment { ...@@ -401,7 +421,20 @@ class YDLShareDialog : DialogFragment {
} }
private fun share(platform: SHARE_MEDIA) { private fun share(platform: SHARE_MEDIA) {
ShareUtils.shareTo(platform, mActivity!!, shareTitle!!, shareUrl!!, shareContent, shareHead) mActivity?.let { activity ->
shareTitle?.let { shareTitle ->
shareUrl?.let { shareUrl ->
ShareUtils.shareTo(
platform,
activity,
shareTitle,
shareUrl,
shareContent,
shareHead
)
}
}
}
ShareUtils.callBack = object : ShareActionCallBack { ShareUtils.callBack = object : ShareActionCallBack {
override fun onShareSuccessed(share_media: SHARE_MEDIA) { override fun onShareSuccessed(share_media: SHARE_MEDIA) {
mShareCallBack?.onShareSuccessed(share_media) mShareCallBack?.onShareSuccessed(share_media)
...@@ -419,7 +452,23 @@ class YDLShareDialog : DialogFragment { ...@@ -419,7 +452,23 @@ class YDLShareDialog : DialogFragment {
*/ */
private fun shareMinWeixin() { private fun shareMinWeixin() {
//分享小程序到微信 //分享小程序到微信
ShareUtils.shareSmailWeixin(mActivity!!, shareTitle!!, shareUrl!!, shareContent, shareHead, path, minProgramId, null) mActivity?.let { activity ->
shareTitle?.let { shareTitle ->
shareUrl?.let { shareUrl ->
ShareUtils.shareSmailWeixin(
activity,
shareTitle,
shareUrl,
shareContent,
shareHead,
path,
minProgramId,
null
)
}
}
}
dismiss() dismiss()
} }
......
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
android:layout_width="55dp" android:layout_width="55dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:visibility="gone"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
...@@ -248,6 +249,7 @@ ...@@ -248,6 +249,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_18" android:layout_marginTop="@dimen/platform_dp_18"
android:visibility="gone"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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