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
e68025a5
Commit
e68025a5
authored
May 16, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:UI还原
parent
f5c271dd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
5 deletions
+29
-5
EditContentEvent.kt
m-dynamic/src/main/java/com/yidianling/dynamic/event/EditContentEvent.kt
+4
-0
PublishTrendActivity.java
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/PublishTrendActivity.java
+14
-3
PublishQuestionAndTrendFragment.java
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/fragment/PublishQuestionAndTrendFragment.java
+4
-1
dynamic_bg_publish_gray_button.xml
m-dynamic/src/main/res/drawable/dynamic_bg_publish_gray_button.xml
+6
-0
dynamic_fragment_publish_trend.xml
m-dynamic/src/main/res/layout/dynamic_fragment_publish_trend.xml
+1
-1
No files found.
m-dynamic/src/main/java/com/yidianling/dynamic/event/EditContentEvent.kt
0 → 100644
View file @
e68025a5
package
com.yidianling.dynamic.event
class
EditContentEvent
(
var
containeText
:
Boolean
)
\ No newline at end of file
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/PublishTrendActivity.java
View file @
e68025a5
...
...
@@ -27,6 +27,7 @@ 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
;
...
...
@@ -38,6 +39,7 @@ 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
;
...
...
@@ -62,6 +64,7 @@ public class PublishTrendActivity extends BaseActivity {
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
<>();
...
...
@@ -73,6 +76,7 @@ public class PublishTrendActivity extends BaseActivity {
@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
)
{
...
...
@@ -135,8 +139,9 @@ public class PublishTrendActivity extends BaseActivity {
SaveOrNotDialog
();
});
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
();
}
...
...
@@ -147,9 +152,14 @@ 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
));
}
else
{
publish_trend_sure_tv
.
setBackground
(
getDrawable
(
R
.
drawable
.
dynamic_bg_publish_gray_button
));
}
}
private
void
SaveOrNotDialog
()
{
dynamicSaveDraftDialog
=
new
DynamicSaveDraftDialog
(
this
,
new
DynamicQuestionSaveListener
()
{
...
...
@@ -304,6 +314,7 @@ public class PublishTrendActivity extends BaseActivity {
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
EventBus
.
getDefault
().
unregister
(
this
);
//解除任务
if
(
null
!=
handler
)
{
handler
.
removeCallbacksAndMessages
(
null
);
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/publishTrend/fragment/PublishQuestionAndTrendFragment.java
View file @
e68025a5
...
...
@@ -73,6 +73,7 @@ import com.yidianling.dynamic.common.emoji.IEmoticonSelectedListener;
import
com.yidianling.dynamic.common.net.DynamicApiUtils
;
import
com.yidianling.dynamic.common.tool.ImageCompress
;
import
com.yidianling.dynamic.event.DynamicSaveEvent
;
import
com.yidianling.dynamic.event.EditContentEvent
;
import
com.yidianling.dynamic.model.Command
;
import
com.yidianling.dynamic.model.PublishTrendResult
;
import
com.ydl.ydlcommon.ui.ParcelableImage
;
...
...
@@ -121,7 +122,7 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
private
String
type
;
private
TextView
publish_trend_content_num_tv
,
publish_trend_bottom_topic_tv
;
p
rivate
EditText
publish_trend_title_editext
,
publish_trend_content_editext
;
p
ublic
EditText
publish_trend_title_editext
,
publish_trend_content_editext
;
private
RecyclerView
publish_trend_img_rcv
;
private
ImageView
publish_trend_bottom_img_iv
;
private
View
lineTitle
;
...
...
@@ -711,6 +712,7 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
int
arg3
)
{
String
editable
=
publish_trend_title_editext
.
getText
().
toString
();
String
str
=
StringUtils
.
StringFilter
(
editable
.
toString
());
EventBus
.
getDefault
().
post
(
str
.
length
()
>
0
?
new
EditContentEvent
(
true
)
:
new
EditContentEvent
(
false
));
if
(!
editable
.
equals
(
str
))
{
publish_trend_title_editext
.
setText
(
str
);
publish_trend_title_editext
.
setSelection
(
str
.
length
());
//光标置后
...
...
@@ -738,6 +740,7 @@ public class PublishQuestionAndTrendFragment extends BaseFragment implements Vie
String
editable
=
publish_trend_content_editext
.
getText
().
toString
();
String
str
=
StringUtils
.
StringFilter
(
editable
.
toString
());
EventBus
.
getDefault
().
post
(
str
.
length
()
>
0
?
new
EditContentEvent
(
true
)
:
new
EditContentEvent
(
false
));
if
(!
editable
.
equals
(
str
))
{
publish_trend_content_editext
.
setText
(
str
);
publish_trend_content_editext
.
setSelection
(
str
.
length
());
//光标置后
...
...
m-dynamic/src/main/res/drawable/dynamic_bg_publish_gray_button.xml
0 → 100644
View file @
e68025a5
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#601da1f2"
/>
<corners
android:radius=
"12dp"
/>
</shape>
m-dynamic/src/main/res/layout/dynamic_fragment_publish_trend.xml
View file @
e68025a5
...
...
@@ -64,7 +64,7 @@
android:hint=
"这一刻的想法,晒给懂你的人...
"
android:includeFontPadding=
"false"
android:minLines=
"6"
android:minLines=
"
1
6"
android:padding=
"15dp"
android:paddingLeft=
"15dp"
android:textColor=
"@color/dynamic_text_trend_title_black"
...
...
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