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

toolbar workaround

parent ee831ff9
......@@ -81,10 +81,8 @@ class AlbumsContractModule @Inject constructor(
private fun fetchAlbumsApi(parentAlbumId:Int) =
api.getAlbums(parentAlbumId)
.doOnNext { Timber.d("raw0 $it") }
.doOnNext { Timber.d("ablums ${it.size}") }
.map{ fromRawList(it,::fromRaw) }
.doOnNext(db::blockingUpsert)
.doOnNext { Timber.d("ablums ${it.size}") }
.doOnNext {
it.asSequence().map { album ->
if (db.checkIfExistsAlbumJunction(album.id, parentAlbumId) != null) {
......
......@@ -18,6 +18,8 @@ import timber.log.Timber
import javax.inject.Inject
/**
* Created by Vladislav Bogdashkin on 30.09.2019.
*/
......@@ -66,11 +68,21 @@ class DealScreenController :
private fun setToolbar(){
toolBar.showAll()
toolBar.appBar.setExpanded(false,false)
toolBar.collapsingToolbarLayout.title = "СДЕЛКА"
toolBar.collapsingToolbarLayout.title = "lalka"
toolBar.appBar.liftOnScrollTargetViewId = R.id.favorites_cards_recycler_view
toolBar.appBar.setLiftable(true)
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.
}
......
......@@ -5,10 +5,10 @@
android:id="@+id/linearLayout13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary">
android:background="@color/colorAccentSecondary">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/materialTextView2"
android:id="@+id/back_button_chevron"
style="@style/Accent_Minor_TextView.Default"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -22,6 +22,19 @@
app:layout_constraintStart_toStartOf="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
android:id="@+id/include13"
layout="@layout/bell_switch_view"
......@@ -33,7 +46,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/materialTextView2"
app:layout_constraintStart_toEndOf="@+id/toolbar_title"
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