Commit 81591aab authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

added test layout

TODO: animate (?)
parent 8d784c96
......@@ -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/8f
StatusProgressDirection.VERTICAL -> measuredWidth/8f
StatusProgressDirection.HORIZONTAL -> measuredHeight/16f
StatusProgressDirection.VERTICAL -> measuredWidth/16f
}}
private val enableRadius:Float
......@@ -77,14 +77,14 @@ class StatusProgressCeil @JvmOverloads constructor(
private val crossRadius:Float
get() { return when(direction){
StatusProgressDirection.HORIZONTAL -> measuredHeight/2.1f
StatusProgressDirection.VERTICAL -> measuredWidth/2.1f
StatusProgressDirection.HORIZONTAL -> measuredHeight/2.4f
StatusProgressDirection.VERTICAL -> measuredWidth/2.4f
}}
private val disableRadius:Float
get() { return when(direction){
StatusProgressDirection.HORIZONTAL -> measuredHeight/2f
StatusProgressDirection.VERTICAL -> measuredWidth/2f
StatusProgressDirection.HORIZONTAL -> measuredHeight/4f
StatusProgressDirection.VERTICAL -> measuredWidth/4f
}}
......@@ -186,7 +186,7 @@ class StatusProgressCeil @JvmOverloads constructor(
progressStartTop,
progressStartRight,
progressStartBottom,
enablePaint
if (isEnable) enablePaint else disablePaint
)
}
......@@ -197,7 +197,7 @@ class StatusProgressCeil @JvmOverloads constructor(
progressEndTop,
progressEndRight,
progressEndBottom,
enablePaint
if (nextEnable) enablePaint else disablePaint
)
}
......
......@@ -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>
......
......@@ -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="horizontal"
android:orientation="vertical"
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="horizontal"
app:direction="vertical"
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="horizontal"
app:direction="vertical"
app:hasEnd="true"
app:hasStart="true"
app:isEnable="false"
app:isEnable="true"
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="true"
app:isEnable="false"
app:nextEnable="false" />
</LinearLayout>
\ No newline at end of file
<?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
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