Commit da707afa authored by Viktor De Pasquale's avatar Viktor De Pasquale

Updated install ui to better fit app's theme

parent a4159743
...@@ -40,6 +40,7 @@ import io.reactivex.Observable ...@@ -40,6 +40,7 @@ import io.reactivex.Observable
import io.reactivex.disposables.Disposable import io.reactivex.disposables.Disposable
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import kotlin.math.hypot import kotlin.math.hypot
import kotlin.math.roundToInt
@BindingAdapter("onNavigationClick") @BindingAdapter("onNavigationClick")
...@@ -390,3 +391,8 @@ fun MaterialButton.setIconRes(res: Int) { ...@@ -390,3 +391,8 @@ fun MaterialButton.setIconRes(res: Int) {
fun MaterialCardView.setCardElevationBound(elevation: Float) { fun MaterialCardView.setCardElevationBound(elevation: Float) {
cardElevation = elevation cardElevation = elevation
} }
@BindingAdapter("strokeWidth")
fun MaterialCardView.setCardStrokeWidthBound(stroke: Float) {
strokeWidth = stroke.roundToInt()
}
\ No newline at end of file
...@@ -33,13 +33,12 @@ ...@@ -33,13 +33,12 @@
android:paddingTop="@dimen/l1"> android:paddingTop="@dimen/l1">
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
style="?styleCardElevated" style="?styleCardVariant"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l1" android:layout_marginStart="@dimen/l1"
android:layout_marginEnd="@dimen/l1" android:layout_marginEnd="@dimen/l1"
app:cardCornerRadius="@dimen/l1" app:strokeWidth="@{viewModel.step != 0 ? 0f : @dimen/l_125}">
app:cardElevation="@{viewModel.step != 0 ? 0f : @dimen/l_25}">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -110,14 +109,13 @@ ...@@ -110,14 +109,13 @@
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
style="?styleCardElevated" style="?styleCardVariant"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l1" android:layout_marginStart="@dimen/l1"
android:layout_marginTop="@dimen/l1" android:layout_marginTop="@dimen/l1"
android:layout_marginEnd="@dimen/l1" android:layout_marginEnd="@dimen/l1"
app:cardCornerRadius="@dimen/l1" app:strokeWidth="@{viewModel.step != 1 ? 0f : @dimen/l_125}">
app:cardElevation="@{viewModel.step != 1 ? 0f : @dimen/l_25}">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
......
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