Commit 72a23a90 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

close buttons

parent da427cab
...@@ -17,7 +17,6 @@ import com.biganto.visual.roompark.presentation.screen.article.util.HtmlPageAdap ...@@ -17,7 +17,6 @@ import com.biganto.visual.roompark.presentation.screen.article.util.HtmlPageAdap
import com.biganto.visual.roompark.presentation.screen.article.util.HtmlTag import com.biganto.visual.roompark.presentation.screen.article.util.HtmlTag
import com.biganto.visual.roompark.util.extensions.formatToSimple import com.biganto.visual.roompark.util.extensions.formatToSimple
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.google.android.material.textview.MaterialTextView import com.google.android.material.textview.MaterialTextView
import jp.wasabeef.glide.transformations.BlurTransformation import jp.wasabeef.glide.transformations.BlurTransformation
import timber.log.Timber import timber.log.Timber
...@@ -53,20 +52,14 @@ class ArticleScreenController : ...@@ -53,20 +52,14 @@ class ArticleScreenController :
@BindView(R.id.articleHeaderBlock) @BindView(R.id.articleHeaderBlock)
lateinit var headerBlock: ViewGroup lateinit var headerBlock: ViewGroup
@BindView(R.id.articleCloseButton)
lateinit var closeArticle: FloatingActionButton
@BindView(R.id.articleBodyRecyclerView) @BindView(R.id.articleBodyRecyclerView)
lateinit var articleRecyclerView: RecyclerView lateinit var articleRecyclerView: RecyclerView
private val blurPreview:ImageView by lazy {
val blurPreview:ImageView by lazy {
headerBlock.findViewById<ImageView>(R.id.articlePreviewBlurred) headerBlock.findViewById<ImageView>(R.id.articlePreviewBlurred)
} }
val articlePreview:ImageView by lazy { private val articlePreview:ImageView by lazy {
headerBlock.findViewById<ImageView>(R.id.articlePreview) headerBlock.findViewById<ImageView>(R.id.articlePreview)
} }
...@@ -74,10 +67,6 @@ class ArticleScreenController : ...@@ -74,10 +67,6 @@ class ArticleScreenController :
headerBlock.findViewById<MaterialTextView>(R.id.articleDate) headerBlock.findViewById<MaterialTextView>(R.id.articleDate)
} }
val closeButton:FloatingActionButton by lazy {
headerBlock.findViewById<FloatingActionButton>(R.id.articleCloseButton)
}
@OnClick(R.id.articleCloseButton) @OnClick(R.id.articleCloseButton)
fun onCloseArticle(){ fun onCloseArticle(){
handleBack() handleBack()
......
...@@ -62,6 +62,12 @@ class PhotoScreenController : ...@@ -62,6 +62,12 @@ class PhotoScreenController :
) )
} }
@OnClick(R.id.close_current_button)
fun onCloseArticle(){
handleBack()
}
override fun onAttach(view: View) { override fun onAttach(view: View) {
// tempSystemUiFlag = activity?.window?.decorView?.systemUiVisibility // tempSystemUiFlag = activity?.window?.decorView?.systemUiVisibility
super.onAttach(view) super.onAttach(view)
......
...@@ -46,7 +46,7 @@ class WebCamScreenController : ...@@ -46,7 +46,7 @@ class WebCamScreenController :
constructor(id: Int) : super(bundleOf(SELECTED_CAM_INDEX_KEY to id)) constructor(id: Int) : super(bundleOf(SELECTED_CAM_INDEX_KEY to id))
@OnClick(R.id.close_current_button) @OnClick(R.id.close_current_button)
private fun onClickExit(){ fun onClickExit(){
handleBack() handleBack()
} }
......
...@@ -44,18 +44,5 @@ ...@@ -44,18 +44,5 @@
app:layout_constraintStart_toEndOf="@+id/articlePreview" /> app:layout_constraintStart_toEndOf="@+id/articlePreview" />
<ImageView
android:id="@+id/articleCloseButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:clickable="true"
android:contentDescription="@string/content_description_close"
android:focusable="true"
android:scaleType="fitXY"
android:src="@drawable/ic_close_circled"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:id="@+id/article_container" android:id="@+id/article_container"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -35,3 +40,21 @@ ...@@ -35,3 +40,21 @@
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
<ImageView
android:id="@+id/articleCloseButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:clickable="true"
android:contentDescription="@string/content_description_close"
android:focusable="true"
android:scaleType="fitXY"
android:src="@drawable/ic_close_circled"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</RelativeLayout>
\ No newline at end of file
...@@ -13,14 +13,24 @@ ...@@ -13,14 +13,24 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/floatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|end"
android:layout_margin="16dp"
android:clickable="true"
app:srcCompat="@drawable/ic_close_circled" />
</com.google.android.exoplayer2.ui.PlayerView> </com.google.android.exoplayer2.ui.PlayerView>
<ImageView
android:id="@+id/close_current_button"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:clickable="true"
android:contentDescription="@string/content_description_close"
android:focusable="true"
android:focusableInTouchMode="true"
android:scaleType="fitXY"
android:src="@drawable/ic_close_circled"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </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