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
820e7f59
Commit
820e7f59
authored
Apr 20, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:发布动态UI
parent
ae7d6776
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
168 additions
and
0 deletions
+168
-0
TrendsAndQuestionDialog.kt
m-dynamic/src/main/java/com/yidianling/dynamic/dialog/TrendsAndQuestionDialog.kt
+44
-0
TrendsQuestionListener.kt
m-dynamic/src/main/java/com/yidianling/dynamic/dialog/listener/TrendsQuestionListener.kt
+7
-0
TrendsHomeFragment.kt
m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.kt
+0
-0
dynamic_publish_question.png
m-dynamic/src/main/res/drawable-xhdpi/dynamic_publish_question.png
+0
-0
dynamic_publish_right_icon.png
m-dynamic/src/main/res/drawable-xhdpi/dynamic_publish_right_icon.png
+0
-0
dynamic_publish_trends.png
m-dynamic/src/main/res/drawable-xhdpi/dynamic_publish_trends.png
+0
-0
dynamic_publish_trends_question_background.xml
m-dynamic/src/main/res/drawable/dynamic_publish_trends_question_background.xml
+8
-0
dynamic_question_and_trends_dialog_layout.xml
m-dynamic/src/main/res/layout/dynamic_question_and_trends_dialog_layout.xml
+109
-0
No files found.
m-dynamic/src/main/java/com/yidianling/dynamic/dialog/TrendsAndQuestionDialog.kt
0 → 100644
View file @
820e7f59
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.CancelFocusDialogListener
import
com.yidianling.dynamic.dialog.listener.TrendsQuestionListener
import
kotlinx.android.synthetic.main.dynamic_cancel_focus_dialog_layout.*
import
kotlinx.android.synthetic.main.dynamic_cancel_focus_dialog_layout.cancel_focus_dialog_cancel
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
.
MATCH_PARENT
window
.
attributes
=
params
window
.
setGravity
(
Gravity
.
BOTTOM
)
ll_publish_trends
.
setOnClickListener
{
listener
.
publishTrends
()
hide
()
}
cancel_focus_dialog_sure
.
setOnClickListener
{
listener
.
publishQuestion
()
hide
()
}
}
}
\ No newline at end of file
m-dynamic/src/main/java/com/yidianling/dynamic/dialog/listener/TrendsQuestionListener.kt
0 → 100644
View file @
820e7f59
package
com.yidianling.dynamic.dialog.listener
interface
TrendsQuestionListener
{
fun
publishTrends
()
//发布动态
fun
publishQuestion
()
//提问题
}
\ No newline at end of file
m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.kt
View file @
820e7f59
This diff is collapsed.
Click to expand it.
m-dynamic/src/main/res/drawable-xhdpi/dynamic_publish_question.png
0 → 100644
View file @
820e7f59
18.8 KB
m-dynamic/src/main/res/drawable-xhdpi/dynamic_publish_right_icon.png
0 → 100644
View file @
820e7f59
578 Bytes
m-dynamic/src/main/res/drawable-xhdpi/dynamic_publish_trends.png
0 → 100644
View file @
820e7f59
20.7 KB
m-dynamic/src/main/res/drawable/dynamic_publish_trends_question_background.xml
0 → 100644
View file @
820e7f59
<?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
m-dynamic/src/main/res/layout/dynamic_question_and_trends_dialog_layout.xml
0 → 100644
View file @
820e7f59
<?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=
"232dp"
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=
"80dp"
android:layout_height=
"wrap_content"
android:text=
"这一刻你的真实想法"
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=
"80dp"
android:layout_height=
"wrap_content"
android:text=
"数万心理师为您答疑解惑"
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
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