Commit 25709434 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

start url

parent 52479f5f
......@@ -121,9 +121,6 @@ class DealScreenController :
}
)
}
private fun bindRecycler() {
......
......@@ -23,6 +23,8 @@ import com.biganto.visual.roompark.domain.model.FeatureModel
import com.biganto.visual.roompark.domain.model.PlanPresetModel
import com.biganto.visual.roompark.domain.model.typeShortString
import com.biganto.visual.roompark.presentation.screen.estate.util.FlatInfoAdapter
import com.biganto.visual.roompark.util.extensions.setGone
import com.biganto.visual.roompark.util.extensions.startUrl
import com.google.android.material.switchmaterial.SwitchMaterial
import com.google.android.material.tabs.TabLayout
import com.google.android.material.textview.MaterialTextView
......@@ -159,6 +161,9 @@ class EstateScreenController :
@BindView(R.id.explication_tab)
lateinit var explicationTab: MaterialTextView
@BindView(R.id.site_link_viewholder)
lateinit var siteLink: View
private fun setToolbar(){
toolBar.setToolbar(null, StatusToolbarModel())
......@@ -243,6 +248,14 @@ class EstateScreenController :
)
flatTitle.text = resources?.getString(viewState.estate.typeShortString()
,viewState.estate.number)
siteLink.setGone(viewState.estate.url == null)
viewState.estate.url?.let {url ->
siteLink.setOnClickListener{
activity?.startUrl(url)
}
}
}
private fun render(viewState: EstateScreenViewState.ShowEstateInfo) {
......
package com.biganto.visual.roompark.util.extensions
import android.app.Activity
import android.content.Intent
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.RectF
import android.net.Uri
import android.view.View
import timber.log.Timber
import java.io.File
......@@ -103,4 +106,10 @@ val File.folderSize get() =
this.walkTopDown()
.asSequence()
.map {it.length()}
.sum()
\ No newline at end of file
.sum()
fun Activity.startUrl(url:String){
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
this.startActivity(browserIntent)
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="404dp"
android:layout_height="360dp"
android:background="@drawable/gradient_background_accent"
android:orientation="vertical"
android:paddingStart="16dp">
......@@ -13,7 +13,7 @@
android:id="@+id/feedsTabs"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginTop="8dp"
android:background="#00000000"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......
......@@ -14,7 +14,8 @@
<include
android:id="@+id/feedsBlock"
layout="@layout/feeds_block_view"
android:layout_height="426dp"
android:layout_width="0dp"
android:layout_height="348dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......
......@@ -2,20 +2,22 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flat_measure_container"
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:minHeight="32dp"
android:weightSum="2">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/flat_measure_description"
style="@style/Accent_Minor_TextView.Inverted"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="Стоимость" />
android:text="Стоимость сукиблядь ааааа блпядповд" />
<com.google.android.material.textview.MaterialTextView
......@@ -23,8 +25,9 @@
style="@style/Accent_Minor_TextView.Default"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="16dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="4 000 000" />
android:text=" бля бля ебаны йрот какого хуя \n ебаный рот" />
</LinearLayout>
\ 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