Commit 1005657f by 霍志良

feat:dynamic升级修改BUG

parent af0a8d33
......@@ -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.38",
"m-dynamic" : "0.0.7.39",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28",
......@@ -97,7 +97,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.38",
"m-dynamic" : "0.0.7.39",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28",
......
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.listener
interface DynamicQuestionSaveListener {
fun notSave()
fun save()
}
\ No newline at end of file
......@@ -34,6 +34,9 @@ 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.publishTrend.fragment.PublishQuestionAndTrendFragment;
......@@ -65,6 +68,7 @@ public class PublishTrendActivity extends BaseActivity {
private PopupWindow noticePopupWindow;
private Handler handler;
private LinearLayout mPublishTrendTitle;
private DynamicSaveDraftDialog dynamicSaveDraftDialog = null;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
......@@ -147,25 +151,22 @@ public class PublishTrendActivity extends BaseActivity {
}
private void SaveOrNotDialog() {
new CommonDialog(this)
.setMessage("将此次编辑保留")
.setLeftOnclick("不保留", new View.OnClickListener() {
@Override
public void onClick(View view) {
EventBus.getDefault().post(new DynamicSaveEvent(false));
finish();
}
})
.setRightClick("保留", new View.OnClickListener() {
@Override
public void onClick(View view) {
//发送通知给Fragment保留此次编辑
EventBus.getDefault().post(new DynamicSaveEvent(true));
finish();
}
})
.setCancelAble(false)
.show();
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() {
......
......@@ -34,13 +34,11 @@ import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.common.view.LooperTextView;
import com.yidianling.dynamic.dialog.CancelFocusDialog;
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;
import com.yidianling.dynamic.publishTrend.PublishTrendActivityTrends;
import com.yidianling.dynamic.router.DynamicIn;
import com.yidianling.dynamic.topic.AllTopicActivity;
import com.yidianling.dynamic.topic.topicDetail.TopicDetailActivity;
......
......@@ -86,7 +86,7 @@
android:paddingLeft="15dp"
android:textColor="@color/dynamic_text_trend_title_black"
android:textColorHint="@color/dynamic_text_trend_defult"
android:textSize="15sp" />
android:textSize="17sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/publish_trend_img_rcv"
android:layout_width="match_parent"
......@@ -112,7 +112,7 @@
android:paddingRight="10dp"
android:text="# 选择话题"
android:textColor="@color/platform_color_666666"
android:textSize="11sp" />
android:textSize="13sp" />
<TextView
android:id="@+id/publish_trend_content_num_tv"
......@@ -123,8 +123,8 @@
android:gravity="center_vertical"
android:includeFontPadding="false"
android:text="0/1000"
android:textColor="#FF757575"
android:textSize="11sp" />
android:textColor="#bbbbbb"
android:textSize="15sp" />
<View
android:id="@+id/line"
......
......@@ -47,7 +47,7 @@
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
......
......@@ -93,7 +93,7 @@
android:paddingRight="10dp"
android:text="# 选择话题"
android:textColor="#999999"
android:textSize="11sp" />
android:textSize="13sp" />
<TextView
android:id="@+id/publish_trend_content_num_tv"
......@@ -104,8 +104,8 @@
android:gravity="center_vertical"
android:includeFontPadding="false"
android:text="0/1000"
android:textColor="#b8b8b8"
android:textSize="11sp" />
android:textColor="#bbbbbb"
android:textSize="15sp" />
<View
android:id="@+id/line"
......
......@@ -58,7 +58,7 @@
android:layout_marginLeft="3dp"
android:text="仅对专家可见"
android:textColor="@color/platform_color_666666"
android:textSize="11sp" />
android:textSize="12sp" />
</LinearLayout>
......@@ -89,7 +89,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"?>
<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>
......
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