Commit 0864bdf8 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

toolbar workaround

parent ee831ff9
...@@ -81,10 +81,8 @@ class AlbumsContractModule @Inject constructor( ...@@ -81,10 +81,8 @@ class AlbumsContractModule @Inject constructor(
private fun fetchAlbumsApi(parentAlbumId:Int) = private fun fetchAlbumsApi(parentAlbumId:Int) =
api.getAlbums(parentAlbumId) api.getAlbums(parentAlbumId)
.doOnNext { Timber.d("raw0 $it") } .doOnNext { Timber.d("raw0 $it") }
.doOnNext { Timber.d("ablums ${it.size}") }
.map{ fromRawList(it,::fromRaw) } .map{ fromRawList(it,::fromRaw) }
.doOnNext(db::blockingUpsert) .doOnNext(db::blockingUpsert)
.doOnNext { Timber.d("ablums ${it.size}") }
.doOnNext { .doOnNext {
it.asSequence().map { album -> it.asSequence().map { album ->
if (db.checkIfExistsAlbumJunction(album.id, parentAlbumId) != null) { if (db.checkIfExistsAlbumJunction(album.id, parentAlbumId) != null) {
......
...@@ -18,6 +18,8 @@ import timber.log.Timber ...@@ -18,6 +18,8 @@ import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject
/** /**
* Created by Vladislav Bogdashkin on 30.09.2019. * Created by Vladislav Bogdashkin on 30.09.2019.
*/ */
...@@ -66,11 +68,21 @@ class DealScreenController : ...@@ -66,11 +68,21 @@ class DealScreenController :
private fun setToolbar(){ private fun setToolbar(){
toolBar.showAll() toolBar.showAll()
toolBar.appBar.setExpanded(false,false) toolBar.appBar.setExpanded(false,false)
toolBar.collapsingToolbarLayout.title = "СДЕЛКА" toolBar.collapsingToolbarLayout.title = "lalka"
toolBar.appBar.liftOnScrollTargetViewId = R.id.favorites_cards_recycler_view toolBar.appBar.liftOnScrollTargetViewId = R.id.favorites_cards_recycler_view
toolBar.appBar.setLiftable(true) toolBar.appBar.setLiftable(true)
toolBar.appBarScrollable(false) toolBar.appBarScrollable(false)
// toolBar.collapsingToolbarLayout.viewTreeObserver
toolBar.collapsingToolbarLayout.alpha = 0.4f
activity?.actionBar?.setDisplayShowTitleEnabled(true)
val mInflater = LayoutInflater.from(activity)
val mCustomView = mInflater.inflate(R.layout.switch_toolbar, null)
toolBar.topAppBar.addView(mCustomView)
// toolBar.topAppBar.addView(mCustomView)
// planTypesTabLayout. // planTypesTabLayout.
} }
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
android:id="@+id/linearLayout13" android:id="@+id/linearLayout13"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/colorPrimary"> android:background="@color/colorAccentSecondary">
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/materialTextView2" android:id="@+id/back_button_chevron"
style="@style/Accent_Minor_TextView.Default" style="@style/Accent_Minor_TextView.Default"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -22,6 +22,19 @@ ...@@ -22,6 +22,19 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/toolbar_title"
style="@style/Header_TextView.Main_Header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:gravity="start|center_vertical"
android:text="НОВОСТИ"
android:textAlignment="gravity"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/back_button_chevron"
app:layout_constraintTop_toTopOf="parent" />
<include <include
android:id="@+id/include13" android:id="@+id/include13"
layout="@layout/bell_switch_view" layout="@layout/bell_switch_view"
...@@ -33,7 +46,7 @@ ...@@ -33,7 +46,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0" app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/materialTextView2" app:layout_constraintStart_toEndOf="@+id/toolbar_title"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="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