Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
1005657f
Commit
1005657f
authored
May 10, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:dynamic升级修改BUG
parent
af0a8d33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
296 additions
and
73 deletions
+296
-73
config.gradle
config.gradle
+2
-2
DynamicSaveDraftDialog.kt
m-dynamic/src/main/java/com/yidianling/dynamic/dialog/DynamicSaveDraftDialog.kt
+42
-0
DynamicQuestionSaveListener.kt
m-dynamic/src/main/java/com/yidianling/dynamic/dialog/listener/DynamicQuestionSaveListener.kt
+7
-0
PublishTrendActivity.java
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/PublishTrendActivity.java
+20
-19
PublishTrendActivityTrends.kt
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/PublishTrendActivityTrends.kt
+0
-0
PublishQuestionAndTrendFragment.java
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/fragment/PublishQuestionAndTrendFragment.java
+109
-40
TrendsHomeFragment.java
m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java
+0
-2
activity_dynamic_publish_trends.xml
m-dynamic/src/main/res/layout/activity_dynamic_publish_trends.xml
+4
-4
dynamic_activity_trend.xml
m-dynamic/src/main/res/layout/dynamic_activity_trend.xml
+1
-1
dynamic_fragment_publish_trend.xml
m-dynamic/src/main/res/layout/dynamic_fragment_publish_trend.xml
+3
-3
dynamic_layout_publish_trend_bottom.xml
m-dynamic/src/main/res/layout/dynamic_layout_publish_trend_bottom.xml
+2
-2
dynamic_savedraft_dialog_layout.xml
m-dynamic/src/main/res/layout/dynamic_savedraft_dialog_layout.xml
+105
-0
colors.xml
m-dynamic/src/main/res/values/colors.xml
+1
-0
No files found.
config.gradle
View file @
1005657f
...
...
@@ -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.3
8
"
,
"m-dynamic"
:
"0.0.7.3
9
"
,
"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.3
8
"
,
"m-dynamic"
:
"0.0.7.3
9
"
,
"m-article"
:
"0.0.0.8"
,
"m-muse"
:
"0.0.28.28"
,
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/dialog/DynamicSaveDraftDialog.kt
0 → 100644
View file @
1005657f
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
m-dynamic/src/main/java/com/yidianling/dynamic/dialog/listener/DynamicQuestionSaveListener.kt
0 → 100644
View file @
1005657f
package
com.yidianling.dynamic.dialog.listener
interface
DynamicQuestionSaveListener
{
fun
notSave
()
fun
save
()
}
\ No newline at end of file
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/PublishTrendActivity.java
View file @
1005657f
...
...
@@ -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
()
{
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/PublishTrendActivityTrends.kt
deleted
100644 → 0
View file @
af0a8d33
This diff is collapsed.
Click to expand it.
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/fragment/PublishQuestionAndTrendFragment.java
View file @
1005657f
This diff is collapsed.
Click to expand it.
m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java
View file @
1005657f
...
...
@@ -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
;
...
...
m-dynamic/src/main/res/layout/activity_dynamic_publish_trends.xml
View file @
1005657f
...
...
@@ -86,7 +86,7 @@
android:paddingLeft=
"15dp"
android:textColor=
"@color/dynamic_text_trend_title_black"
android:textColorHint=
"@color/dynamic_text_trend_defult"
android:textSize=
"1
5
sp"
/>
android:textSize=
"1
7
sp"
/>
<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=
"1
1
sp"
/>
android:textSize=
"1
3
sp"
/>
<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=
"1
1
sp"
/>
android:textColor=
"#
bbbbbb
"
android:textSize=
"1
5
sp"
/>
<View
android:id=
"@+id/line"
...
...
m-dynamic/src/main/res/layout/dynamic_activity_trend.xml
View file @
1005657f
...
...
@@ -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=
"1
7
sp"
/>
app:tl_textsize=
"1
8
sp"
/>
<TextView
...
...
m-dynamic/src/main/res/layout/dynamic_fragment_publish_trend.xml
View file @
1005657f
...
...
@@ -93,7 +93,7 @@
android:paddingRight=
"10dp"
android:text=
"# 选择话题"
android:textColor=
"#999999"
android:textSize=
"1
1
sp"
/>
android:textSize=
"1
3
sp"
/>
<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=
"#b
8b8b8
"
android:textSize=
"1
1
sp"
/>
android:textColor=
"#b
bbbbb
"
android:textSize=
"1
5
sp"
/>
<View
android:id=
"@+id/line"
...
...
m-dynamic/src/main/res/layout/dynamic_layout_publish_trend_bottom.xml
View file @
1005657f
...
...
@@ -58,7 +58,7 @@
android:layout_marginLeft=
"3dp"
android:text=
"仅对专家可见"
android:textColor=
"@color/platform_color_666666"
android:textSize=
"1
1
sp"
/>
android:textSize=
"1
2
sp"
/>
</LinearLayout>
...
...
@@ -89,7 +89,7 @@
android:layout_marginLeft=
"3dp"
android:text=
"匿名"
android:textColor=
"@color/platform_color_666666"
android:textSize=
"1
1
sp"
/>
android:textSize=
"1
2
sp"
/>
</LinearLayout>
...
...
m-dynamic/src/main/res/layout/dynamic_savedraft_dialog_layout.xml
0 → 100644
View file @
1005657f
<?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
m-dynamic/src/main/res/values/colors.xml
View file @
1005657f
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment