Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
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
Vladislav Bogdashkin
Room Park Android
Commits
81591aab
Commit
81591aab
authored
Sep 19, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test layout
TODO: animate (?)
parent
8d784c96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
236 additions
and
26 deletions
+236
-26
StatusProgressCeil.kt
...ark/view_utils/status_progress_view/StatusProgressCeil.kt
+10
-10
activity_main.xml
app/src/main/res/layout/activity_main.xml
+2
-2
progress_deal_state_pattern_view.xml
app/src/main/res/layout/progress_deal_state_pattern_view.xml
+92
-14
test_progress_status.xml
app/src/main/res/layout/test_progress_status.xml
+132
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/view_utils/status_progress_view/StatusProgressCeil.kt
View file @
81591aab
...
...
@@ -44,8 +44,8 @@ class StatusProgressCeil @JvmOverloads constructor(
private
val
fillEnableColor
:
Int
=
Color
.
WHITE
private
val
fillDisableColor
:
Int
=
Color
.
CYAN
private
val
fillEnableColor
:
Int
=
resources
.
getColor
(
R
.
color
.
colorCommonBackground
)
private
val
fillDisableColor
:
Int
=
resources
.
getColor
(
R
.
color
.
colorOpacityBackground
)
private
val
enablePaint
:
Paint
=
Paint
()
get
(){
...
...
@@ -64,8 +64,8 @@ class StatusProgressCeil @JvmOverloads constructor(
private
val
prorgressHalfW
:
Float
get
()
{
return
when
(
direction
){
StatusProgressDirection
.
HORIZONTAL
->
measuredHeight
/
8
f
StatusProgressDirection
.
VERTICAL
->
measuredWidth
/
8
f
StatusProgressDirection
.
HORIZONTAL
->
measuredHeight
/
16
f
StatusProgressDirection
.
VERTICAL
->
measuredWidth
/
16
f
}}
private
val
enableRadius
:
Float
...
...
@@ -77,14 +77,14 @@ class StatusProgressCeil @JvmOverloads constructor(
private
val
crossRadius
:
Float
get
()
{
return
when
(
direction
){
StatusProgressDirection
.
HORIZONTAL
->
measuredHeight
/
2.
1
f
StatusProgressDirection
.
VERTICAL
->
measuredWidth
/
2.
1
f
StatusProgressDirection
.
HORIZONTAL
->
measuredHeight
/
2.
4
f
StatusProgressDirection
.
VERTICAL
->
measuredWidth
/
2.
4
f
}}
private
val
disableRadius
:
Float
get
()
{
return
when
(
direction
){
StatusProgressDirection
.
HORIZONTAL
->
measuredHeight
/
2
f
StatusProgressDirection
.
VERTICAL
->
measuredWidth
/
2
f
StatusProgressDirection
.
HORIZONTAL
->
measuredHeight
/
4
f
StatusProgressDirection
.
VERTICAL
->
measuredWidth
/
4
f
}}
...
...
@@ -186,7 +186,7 @@ class StatusProgressCeil @JvmOverloads constructor(
progressStartTop
,
progressStartRight
,
progressStartBottom
,
en
ablePaint
if
(
isEnable
)
enablePaint
else
dis
ablePaint
)
}
...
...
@@ -197,7 +197,7 @@ class StatusProgressCeil @JvmOverloads constructor(
progressEndTop
,
progressEndRight
,
progressEndBottom
,
en
ablePaint
if
(
nextEnable
)
enablePaint
else
dis
ablePaint
)
}
...
...
app/src/main/res/layout/activity_main.xml
View file @
81591aab
...
...
@@ -66,9 +66,9 @@
app:layout_behavior=
"com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
>
<include
layout=
"@layout/
progress_deal_state_pattern_view
"
layout=
"@layout/
test_progress_status
"
android:layout_width=
"match_parent"
android:layout_height=
"
125dp
"
/>
android:layout_height=
"
wrap_content
"
/>
</FrameLayout>
...
...
app/src/main/res/layout/progress_deal_state_pattern_view.xml
View file @
81591aab
...
...
@@ -2,17 +2,17 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/sum"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
24dp
"
android:layout_width=
"
16dp
"
android:layout_height=
"
wrap_content
"
android:background=
"@color/colorCheckListGradientEnd"
android:orientation=
"
horizont
al"
android:orientation=
"
vertic
al"
android:weightSum=
"3"
>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:layout_width=
"
66dp
"
android:layout_height=
"
match_parent
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
24dp
"
android:scaleType=
"fitEnd"
app:direction=
"
horizont
al"
app:direction=
"
vertic
al"
app:hasEnd=
"true"
app:hasStart=
"false"
app:isEnable=
"true"
...
...
@@ -20,26 +20,104 @@
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:layout_width=
"125dp"
android:layout_height=
"match_parent"
android:id=
"@+id/statusProgressCeil2"
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:scaleType=
"fitEnd"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:nextEnable=
"true"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:id=
"@+id/statusProgressCeil4"
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:scaleType=
"fitEnd"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:nextEnable=
"true"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:id=
"@+id/statusProgressCeil5"
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:scaleType=
"fitEnd"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:nextEnable=
"true"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:id=
"@+id/statusProgressCeil6"
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:scaleType=
"fitEnd"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:nextEnable=
"true"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:id=
"@+id/statusProgressCeil3"
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:scaleType=
"fitEnd"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:nextEnable=
"true"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:layout_width=
"wrap_content"
android:layout_height=
"24dp"
android:scaleType=
"fitEnd"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:nextEnable=
"true"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:layout_width=
"wrap_content"
android:layout_height=
"24dp"
android:scaleType=
"fitEnd"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:nextEnable=
"true"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:layout_width=
"wrap_content"
android:layout_height=
"24dp"
android:layout_weight=
"1"
android:scaleType=
"fitEnd"
app:direction=
"
horizont
al"
app:direction=
"
vertic
al"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"
fals
e"
app:isEnable=
"
tru
e"
app:nextEnable=
"false"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:layout_width=
"
88dp
"
android:layout_height=
"
match_parent
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
24dp
"
android:layout_weight=
"1"
android:scaleType=
"fitEnd"
app:direction=
"horizontal"
app:anim_state=
"disable"
app:direction=
"vertical"
app:hasEnd=
"false"
app:hasStart=
"true"
app:isEnable=
"
tru
e"
app:isEnable=
"
fals
e"
app:nextEnable=
"false"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/test_progress_status.xml
0 → 100644
View file @
81591aab
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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:background=
"@drawable/gradient_background_accent"
>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:id=
"@+id/statusProgressCeil"
android:layout_width=
"16dp"
android:layout_height=
"0dp"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"16dp"
app:layout_constraintBottom_toBottomOf=
"@+id/textView20"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"false"
app:isEnable=
"true"
app:nextEnable=
"true"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/textView20"
style=
"@style/Common_Text.Inverted"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"16dp"
android:layout_marginEnd=
"16dp"
android:paddingTop=
"8dp"
android:paddingBottom=
"8dp"
android:text=
"TextView"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/statusProgressCeil"
app:layout_constraintTop_toTopOf=
"parent"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:id=
"@+id/statusProgressCeil8"
android:layout_width=
"16dp"
android:layout_height=
"0dp"
android:layout_marginStart=
"16dp"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:layout_constraintBottom_toBottomOf=
"@+id/textView22"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/statusProgressCeil"
app:nextEnable=
"true"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/textView22"
style=
"@style/Common_Text.Inverted"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginEnd=
"16dp"
android:paddingTop=
"8dp"
android:paddingBottom=
"8dp"
android:text=
"TextView"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toEndOf=
"@+id/statusProgressCeil"
app:layout_constraintTop_toBottomOf=
"@+id/textView20"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:id=
"@+id/statusProgressCeil81"
android:layout_width=
"16dp"
android:layout_height=
"0dp"
android:layout_marginStart=
"16dp"
app:direction=
"vertical"
app:hasEnd=
"true"
app:hasStart=
"true"
app:isEnable=
"true"
app:nextEnable=
"false"
app:layout_constraintBottom_toBottomOf=
"@+id/textView212"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/statusProgressCeil8"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/textView212"
style=
"@style/Common_Text.Inverted"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginEnd=
"16dp"
android:paddingTop=
"8dp"
android:paddingBottom=
"8dp"
android:text=
"Договор готовится для подачи на гос. регистрацию"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toEndOf=
"@+id/statusProgressCeil8"
app:layout_constraintTop_toBottomOf=
"@+id/textView22"
/>
<com.biganto.visual.roompark.view_utils.status_progress_view.StatusProgressCeil
android:id=
"@+id/statusProgressCeil813"
android:layout_width=
"16dp"
android:layout_height=
"0dp"
android:layout_marginStart=
"16dp"
app:direction=
"vertical"
app:hasEnd=
"false"
app:hasStart=
"true"
app:isEnable=
"false"
app:nextEnable=
"true"
app:anim_state=
"disable"
app:layout_constraintBottom_toBottomOf=
"@+id/textView2125"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/statusProgressCeil81"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/textView2125"
style=
"@style/Common_Text.Inverted"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginEnd=
"16dp"
android:paddingTop=
"8dp"
android:paddingBottom=
"8dp"
android:text=
"TextView"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toEndOf=
"@+id/statusProgressCeil813"
app:layout_constraintTop_toBottomOf=
"@+id/textView212"
/>
</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