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

start url

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