Commit 714cc3de by 霍志良

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

心事动态发布优化

See merge request app_android_lib/YDL-Component!21
parents 41e5c709 684fc0ff
......@@ -248,4 +248,5 @@ dependencies {
implementation rootProject.ext.dependencies["retrofit-url-manager"]
kapt 'com.alibaba:arouter-compiler:1.2.2'
implementation 'androidx.fragment:fragment:1.2.4@aar'
}
......@@ -8,8 +8,8 @@ import com.ydl.component.mvp.DemoPresenter
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.yidianling.consultant.ExpertSearchFragment
//import com.yidianling.consultant.ExpertSearchFragment
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
//import com.yidianling.consultant.ExpertSearchFragment
import com.yidianling.home.ui.fragment.YdlHomeFragment
//import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
//import com.yidianling.home.ui.fragment.YdlHomeFragment
......
......@@ -11,7 +11,7 @@ ext {
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.44",
"m-im" : "0.0.21.33",
"m-dynamic" : "0.0.7.37",
"m-dynamic" : "0.0.7.48",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28",
......@@ -35,7 +35,7 @@ ext {
//mdt 组件
"ydl-tuicore" : "0.0.22",
//第一步
"ydl-platform" : "0.0.40.97",
"ydl-platform" : "0.0.40.99",
//第二步 若干
"ydl-webview" : "0.0.38.62",
......@@ -96,7 +96,7 @@ ext {
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.41",
"m-im" : "0.0.21.33",
"m-dynamic" : "0.0.7.37",
"m-dynamic" : "0.0.7.48",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28",
......@@ -118,7 +118,7 @@ ext {
//mdt组件
"ydl-tuicore" : "0.0.22",
//第一步
"ydl-platform" : "0.0.40.97",
"ydl-platform" : "0.0.40.99",
//第二步 若干
"ydl-webview" : "0.0.38.62",
......@@ -261,6 +261,7 @@ ext {
"ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar",
"ydl-router" : "com.ydl:ydl-router:1.4.1-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-compiler" : "com.alibaba:arouter-compiler:1.2.2",
"exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0",
......
......@@ -43,6 +43,10 @@
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<activity
android:name=".publishTrend.PublishTrendActivityTrends"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<activity
android:name=".topic.AllTopicActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
......
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;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
......@@ -11,6 +12,7 @@ import androidx.viewpager.widget.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
......@@ -25,17 +27,30 @@ import com.flyco.tablayout.listener.CustomTabEntity;
import com.flyco.tablayout.listener.OnTabSelectListener;
import com.ydl.ydlcommon.base.BaseActivity;
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.StatusBarUtils;
import com.ydl.ydlcommon.view.NoScrollViewPager;
import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R;
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 org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
import de.greenrobot.event.EventBus;
/**
* 发布动态
......@@ -46,16 +61,24 @@ public class PublishTrendActivity extends BaseActivity {
private static final String COVER = "Test_cover";
private static final String TITLE = "Test_title";
private static final String ISFROMFM = "isfromfm";
private ImageView mBackIv;
private TextView mBackIv;
private TextView mToastView;
private NoScrollViewPager mViewPager;
private CommonTabLayout mTableLayout;
private TextView publish_trend_sure_tv;
// private RelativeLayout mNoticeLayout;
private ArrayList<CustomTabEntity> titleList = new ArrayList<>();
private List<Fragment> fragmentList = new ArrayList<>();
private PopupWindow noticePopupWindow;
private Handler handler;
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) {
Intent intent = new Intent(activity, PublishTrendActivity.class);
......@@ -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) {
Intent intent = new Intent(activity, PublishTrendActivity.class);
Bundle bundle = new Bundle();
......@@ -105,14 +134,15 @@ public class PublishTrendActivity extends BaseActivity {
protected void initDataAndEvent() {
SharedPreferencesEditor.putString("trend_state", "");
handler = new Handler();
mBackIv = findViewById(R.id.img_back);
mBackIv = findViewById(R.id.mBackIv);
mPublishTrendTitle= findViewById(R.id.publish_trend_title_rel);
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) {
((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).publish();
}
......@@ -123,16 +153,50 @@ public class PublishTrendActivity extends BaseActivity {
mTableLayout = findViewById(R.id.tab_layout);
mToastView = findViewById(R.id.tv_coustom_toast_view);
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() {
titleList.add(new TrendTabEntity("动态", 0, 0));
titleList.add(new TrendTabEntity("提问", 0, 0));
Integer dynamic_question = 1;
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);
fragmentList.add(PublishQuestionAndTrendFragment.getInstance(PublishQuestionAndTrendFragment.TYPE_TREND));
fragmentList.add(PublishQuestionAndTrendFragment.getInstance(PublishQuestionAndTrendFragment.TYPE_QUESTION));
FragmentPagerAdapter adapter = new FragmentPagerAdapter(getSupportFragmentManager()) {
@Override
......@@ -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 {
return;
}
TextView textView = mTableLayout.getTitleView(1);
TextView textView = mTableLayout.getTitleView(0);
textView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
int textViewWidth = textView.getMeasuredWidth();
View view = LayoutInflater.from(this).inflate(R.layout.dynamic_popup_notice, null);
......@@ -243,16 +307,17 @@ public class PublishTrendActivity extends BaseActivity {
if (((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).getEmojiLayoutIsShow()) {
((PublishQuestionAndTrendFragment) fragmentList.get(mViewPager.getCurrentItem())).hideEmojiLayout();
} else {
super.onBackPressed();
SaveOrNotDialog();
}
} else {
super.onBackPressed();
SaveOrNotDialog();
}
}
@Override
protected void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
//解除任务
if (null != handler) {
handler.removeCallbacksAndMessages(null);
......
......@@ -28,6 +28,8 @@ import com.yidianling.common.tools.RxImageTool;
import com.yidianling.dynamic.R;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.common.view.LooperTextView;
import com.yidianling.dynamic.dialog.TrendsAndQuestionDialog;
import com.yidianling.dynamic.dialog.listener.TrendsQuestionListener;
import com.yidianling.dynamic.model.TopicListDataBean;
import com.yidianling.dynamic.model.TrendsListBean;
import com.yidianling.dynamic.publishTrend.PublishTrendActivity;
......@@ -94,8 +96,9 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
private long lastTabClick = 0;
private int currentPostion = -1;
String tab;
private long startTime ;
private long startTime;
private long endTime;
private TrendsAndQuestionDialog trendsAndQuestionDialog = null;
public TrendsHomeFragment setTab(String tab) {
this.tab = tab;
......@@ -198,12 +201,12 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser && isResumed()) {
startTime=System.currentTimeMillis();
startTime = System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_ASK_PAGE_VISIT);
} else {
if (startTime!=0L){
endTime=System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_ASK_PAGE_STAY_VISIT,String.valueOf(endTime-startTime));
if (startTime != 0L) {
endTime = System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_ASK_PAGE_STAY_VISIT, String.valueOf(endTime - startTime));
}
}
if (isVisibleToUser && isResumed()) {
......@@ -249,7 +252,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
BuryPointUtils.getInstance().createMap()
.put("toptab_name", "关注")
.burryPoint("topTabClick");
if (!DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(),true)) {
if (!DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(), true)) {
return;
}
BuryPointUtils.getInstance().trackViewScreen(getActivity(), "动态-关注", "com.cxzapp.yidianling.trends.trendList.TrendsListFragment");
......@@ -308,25 +311,48 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
private void doClick(View view) {
if (view.getId() == R.id.item_recommend_tv) {
ActionCountUtils.Companion.count(YDL_USER_ASK_TYPE_CLICK,"推荐");
ActionCountUtils.Companion.count(YDL_USER_ASK_TYPE_CLICK, "推荐");
vpContent.setCurrentItem(1);
} else if (view.getId() == R.id.item_hot_tv) {
ActionCountUtils.Companion.count(YDL_USER_ASK_TYPE_CLICK,"最新");
ActionCountUtils.Companion.count(YDL_USER_ASK_TYPE_CLICK, "最新");
vpContent.setCurrentItem(0);
} else if (view.getId() == R.id.item_focus_tv) {
ActionCountUtils.Companion.count(YDL_USER_ASK_TYPE_CLICK,"关注");
ActionCountUtils.Companion.count(YDL_USER_ASK_TYPE_CLICK, "关注");
vpContent.setCurrentItem(2);
} else if (view.getId() == R.id.publish_trend_btn) {
ActionCountUtils.Companion.count(YDL_USER_ASK_QUESTIONS_BUTTON_CLICK);
if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(),true)) {
Intent intent = new Intent(getActivity().getApplicationContext(), PublishTrendActivity.class);
//默认改为今日打卡
Bundle bundle = new Bundle();
bundle.putString(DynamicConstants.PUBLISH_TYPE, "topic_publish");
bundle.putString("topic_id", "44");
bundle.putString("topic_title", "今日打卡");
intent.putExtra("bundle", bundle);
startActivity(intent);
if (DynamicIn.INSTANCE.loginByOneKeyLogin(getActivity(), true)) {
trendsAndQuestionDialog = new TrendsAndQuestionDialog(requireContext(), new TrendsQuestionListener() {
@Override
public void publishTrends() {
//发布动态
Intent intent = new Intent(getActivity().getApplicationContext(), PublishTrendActivity.class);
//默认改为今日打卡
Bundle bundle = new Bundle();
bundle.putString(DynamicConstants.PUBLISH_TYPE, "topic_publish");
bundle.putString("topic_id", "44");
bundle.putString("topic_title", "今日打卡");
bundle.putInt("dynamic_question", 1);
intent.putExtra("bundle", bundle);
startActivity(intent);
// PublishTrendActivityTrends.Companion.start(requireContext(),"44","今日打卡");
}
@Override
public void publishQuestion() {
//提问题
Intent intent = new Intent(getActivity().getApplicationContext(), PublishTrendActivity.class);
//默认改为今日打卡
Bundle bundle = new Bundle();
bundle.putString(DynamicConstants.PUBLISH_TYPE, "topic_publish");
bundle.putString("topic_id", "44");
bundle.putString("topic_title", "今日打卡");
bundle.putInt("dynamic_question", 2);
intent.putExtra("bundle", bundle);
startActivity(intent);
}
});
trendsAndQuestionDialog.show();
}
} else if (view.getId() == R.id.trends_tv_mind_more) {
ActionCountUtils.Companion.count(YDL_USER_THOUGHTS_GROUP_MORE_CLICK);
......@@ -383,7 +409,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
.into(topicRoundIv1);
trendsTopicTv1.setText(topicListDatas.list.get(i).getTopic_title());
frlTopicIv1.setOnClickListener(view -> {
mindTopicClick(topicListDatas.list.get(0).getTopic_title(), topicListDatas.list.get(0).getTopic_id(),trendsTopicTv1.getText().toString());
mindTopicClick(topicListDatas.list.get(0).getTopic_title(), topicListDatas.list.get(0).getTopic_id(), trendsTopicTv1.getText().toString());
});
break;
case 1:
......@@ -394,7 +420,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
.into(topicRoundIv2);
trendsTopicTv2.setText(topicListDatas.list.get(i).getTopic_title());
frlTopicIv2.setOnClickListener(view -> {
mindTopicClick(topicListDatas.list.get(1).getTopic_title(), topicListDatas.list.get(1).getTopic_id(),trendsTopicTv2.getText().toString());
mindTopicClick(topicListDatas.list.get(1).getTopic_title(), topicListDatas.list.get(1).getTopic_id(), trendsTopicTv2.getText().toString());
});
break;
case 2:
......@@ -405,7 +431,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
.into(topicRoundIv3);
trendsTopicTv3.setText(topicListDatas.list.get(i).getTopic_title());
frlTopicIv3.setOnClickListener(view -> {
mindTopicClick(topicListDatas.list.get(2).getTopic_title(), topicListDatas.list.get(2).getTopic_id(),trendsTopicTv3.getText().toString());
mindTopicClick(topicListDatas.list.get(2).getTopic_title(), topicListDatas.list.get(2).getTopic_id(), trendsTopicTv3.getText().toString());
});
break;
}
......@@ -414,12 +440,12 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
}
private void mindTopicClick(String title, String id,String imgName) {
private void mindTopicClick(String title, String id, String imgName) {
BuryPointUtils.getInstance().createMap()
.put("theme_name", title)
.put("theme_ID", id)
.burryPoint("Theme_click");
ActionCountUtils.Companion.count(YDL_USER_THOUGHTS_GROUP_TYPE_CLICK,imgName);
ActionCountUtils.Companion.count(YDL_USER_THOUGHTS_GROUP_TYPE_CLICK, imgName);
Intent intent = new Intent();
intent.setClass(getActivity(), TopicDetailActivity.class);
intent.putExtra("topic_id", id);
......@@ -430,6 +456,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
public void showTopTrend(List<TrendsListBean.ExtData> extDatas) {
mLooperTextView.setTipList(extDatas);
}
public void setGoneLooperTextView() {
mLooperTextView.setVisibility(View.GONE);
}
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/dynamic_white" />
<stroke
android:width="0.5dp"
android:color="@color/platform_line" />
<solid android:color="#ff1da1f2" />
<corners android:radius="12dp" />
</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"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/dynamic_msg_system_press" />
<stroke
android:width="0.5dp"
android:color="@color/platform_line" />
<solid android:color="#f6f7f8" />
<corners android:radius="12dp" />
</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 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/dynamic_background_publish_trend_top"
android:gravity="center_vertical"
android:background="@color/dynamic_white"
>
<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" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/platform_color_333333"
android:text="取消"
android:paddingBottom="@dimen/platform_dp_5"
android:paddingTop="@dimen/platform_dp_5"
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
android:id="@+id/tab_layout"
......@@ -40,23 +51,25 @@
app:tl_tab_space_equal="true"
app:tl_textSelectColor="@color/platform_color_242424"
app:tl_textUnselectColor="@color/platform_white"
app:tl_textsize="17sp" />
app:tl_textsize="18sp" />
<TextView
android:id="@+id/publish_trend_sure_tv"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_height="wrap_content"
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:paddingLeft="11dp"
android:paddingRight="11dp"
android:paddingTop="@dimen/platform_dp_3"
android:paddingBottom="@dimen/platform_dp_3"
android:text="发布"
android:textColor="@color/platform_but_text_color_selected"
android:textSize="14sp" />
android:textColor="@color/dynamic_white"
android:textSize="13sp" />
</RelativeLayout>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/dynamic_white"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#eae9e9"
>
</View>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:background="@drawable/dynamic_bg_bottom_trend_line">
>
<ImageView
android:id="@+id/publish_trend_bottom_img_iv"
......@@ -17,14 +24,15 @@
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:padding="3dp"
android:src="@drawable/dynamic_edit_img" />
android:src="@drawable/dynamic_edit_img"
/>
<ImageView
android:id="@+id/publish_emoji_iv"
android:layout_width="25dp"
android:layout_height="25dp"
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:padding="3dp"
android:src="@drawable/dynamic_edict_ico_emoji" />
......@@ -55,7 +63,7 @@
android:layout_marginLeft="3dp"
android:text="仅对专家可见"
android:textColor="@color/platform_color_666666"
android:textSize="11sp" />
android:textSize="12sp" />
</LinearLayout>
......@@ -86,7 +94,7 @@
android:layout_marginLeft="3dp"
android:text="匿名"
android:textColor="@color/platform_color_666666"
android:textSize="11sp" />
android:textSize="12sp" />
</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 @@
<color name="dynamic_fffaec">#fffaec</color>
<color name="dynamic_black">#000000</color>
<color name="dynamic_gray7">#c5c4c4</color>
<color name="dynamic_10233A">#10233A</color>
<color name="dynamic_GreyWhite">#F7F7F7</color>
<color name="dynamic_text_gray">#B6B6B6</color>
<color name="dynamic_title_bottom_line_bg">#DDDDDD</color>
......@@ -31,6 +32,7 @@
<!--动态顶部title背景变色-->
<color name="dynamic_trend_transparent">#00ffffff</color>
<color name="dynamic_trend_gray">#f3f3f3</color>
<color name="dynamic_d0d0d0">#d0d0d0</color>
<!--消息已读-->
......
......@@ -104,7 +104,7 @@ public class MsgViewHolderConfirmOrder extends MsgViewHolderBase {
orderId = customAttachment.orderId;
serviceId = customAttachment.serviceId;
flag = customAttachment.status;
ToastUtil.toastShort("flag:"+flag);
if (flag == 1) {
// 1代表已确认,0代表待确认
tv_submit.setText("已确认");
......
......@@ -26,7 +26,6 @@ android {
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
javaCompileOptions {
......
......@@ -146,6 +146,7 @@ dependencies {
api rootProject.ext.dependencies["support-multidex"]
api rootProject.ext.dependencies["tablayout"]
api rootProject.ext.dependencies["xrecyclerview"]
api rootProject.ext.dependencies["mmkv"]
api rootProject.ext.dependencies["flowlayout"]
api rootProject.ext.dependencies["androidanimations"]
//====================Tools====================
......
......@@ -5,6 +5,7 @@ import android.app.Application
import android.os.Build
import com.alibaba.android.arouter.launcher.ARouter
import com.bun.miitmdid.core.JLibrary
import com.tencent.mmkv.MMKV
import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.UpLoadLogUtils
......@@ -31,6 +32,7 @@ object YdlRepository {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
JLibrary.InitEntry(app)
}
MMKV.initialize(app);
LogHelper.getInstance().deleteExpireLogSync()
LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
......
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