Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Bogdashkin
Room Park Android
Commits
d11513ae
Commit
d11513ae
authored
Jan 20, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new toolbar style
parent
0864bdf8
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
134 additions
and
63 deletions
+134
-63
RoomParkMainActivity.kt
.../com/biganto/visual/roompark/base/RoomParkMainActivity.kt
+8
-5
TopBar.kt
app/src/main/java/com/biganto/visual/roompark/base/TopBar.kt
+2
-2
AlbumsRepository.kt
...to/visual/roompark/data/data_provider/AlbumsRepository.kt
+0
-6
ScreenController.kt
...ual/roompark/presentation/screen/deal/ScreenController.kt
+5
-9
ScreenController.kt
...al/roompark/presentation/screen/deals/ScreenController.kt
+3
-1
ScreenController.kt
...l/roompark/presentation/screen/estate/ScreenController.kt
+1
-1
ScreenController.kt
...oompark/presentation/screen/favorites/ScreenController.kt
+1
-1
ScreenController.kt
...oompark/presentation/screen/feed_list/ScreenController.kt
+1
-1
BottomNavigationRouterPagerAdapter.kt
...ntation/screen/home/BottomNavigationRouterPagerAdapter.kt
+1
-2
ScreenController.kt
...roompark/presentation/screen/settings/ScreenController.kt
+1
-1
ScreenController.kt
.../roompark/presentation/screen/to_flat/ScreenController.kt
+1
-1
activity_main.xml
app/src/main/res/layout/activity_main.xml
+55
-29
status_layout_toolbar.xml
app/src/main/res/layout/status_layout_toolbar.xml
+48
-0
switch_toolbar.xml
app/src/main/res/layout/switch_toolbar.xml
+7
-4
No files found.
app/src/main/java/com/biganto/visual/roompark/base/RoomParkMainActivity.kt
View file @
d11513ae
...
...
@@ -16,7 +16,6 @@ import com.bluelinelabs.conductor.Router
import
com.bluelinelabs.conductor.RouterTransaction
import
com.crashlytics.android.Crashlytics
import
com.google.android.material.appbar.AppBarLayout
import
com.google.android.material.appbar.CollapsingToolbarLayout
import
com.google.android.material.bottomnavigation.BottomNavigationView
import
io.fabric.sdk.android.Fabric
import
kotlinx.android.synthetic.main.activity_main.*
...
...
@@ -28,8 +27,6 @@ class RoomParkMainActivity(
,
IConductorActivity
,
IBottomNavigation
{
// @Inject
// lateinit var snackbarProvider: ISnackBarProvider
...
...
@@ -38,7 +35,6 @@ class RoomParkMainActivity(
@BindView
(
R
.
id
.
top_toolbar
)
override
lateinit
var
topAppBar
:
Toolbar
@BindView
(
R
.
id
.
app_bar
)
override
lateinit
var
appBar
:
AppBarLayout
@BindView
(
R
.
id
.
topToolbarHolder
)
override
lateinit
var
coordinatorLayout
:
CoordinatorLayout
@BindView
(
R
.
id
.
collapsingToolbarLayout
)
override
lateinit
var
collapsingToolbarLayout
:
CollapsingToolbarLayout
@BindView
(
R
.
id
.
conductor_container
)
override
lateinit
var
conductorContainer
:
ViewGroup
@BindView
(
R
.
id
.
bottom_navigation_view
)
override
lateinit
var
bottomNavigation
:
BottomNavigationView
...
...
@@ -75,6 +71,14 @@ class RoomParkMainActivity(
conductor_container
.
requestLayout
()
}
override
val
statusToolbar
:
ViewGroup
get
()
=
topAppBar
.
findViewById
<
ViewGroup
>(
R
.
id
.
status_toolbar_container
)
override
val
headerToolbar
:
ViewGroup
get
()
=
topAppBar
.
findViewById
<
ViewGroup
>(
R
.
id
.
switch_toolbar_container
)
override
fun
hide
()
{
bottomNavigation
.
visibility
=
BottomNavigationView
.
GONE
bottomShadow
.
visibility
=
View
.
GONE
...
...
@@ -89,7 +93,6 @@ class RoomParkMainActivity(
override
fun
showAll
()
{
appBar
.
setExpanded
(
true
,
false
)
collapsingToolbarLayout
.
visibility
=
View
.
VISIBLE
appBar
.
visibility
=
View
.
VISIBLE
topAppBar
.
visibility
=
View
.
VISIBLE
...
...
app/src/main/java/com/biganto/visual/roompark/base/TopBar.kt
View file @
d11513ae
...
...
@@ -4,7 +4,6 @@ import android.view.ViewGroup
import
androidx.appcompat.widget.Toolbar
import
androidx.coordinatorlayout.widget.CoordinatorLayout
import
com.google.android.material.appbar.AppBarLayout
import
com.google.android.material.appbar.CollapsingToolbarLayout
import
com.google.android.material.bottomnavigation.BottomNavigationView
/**
...
...
@@ -21,8 +20,9 @@ interface ISupportActionBar{
interface
ICollapsingToolBar
:
ISupportActionBar
{
val
appBar
:
AppBarLayout
val
coordinatorLayout
:
CoordinatorLayout
val
collapsingToolbarLayout
:
CollapsingToolbarLayout
fun
appBarScrollable
(
allow
:
Boolean
)
val
statusToolbar
:
ViewGroup
val
headerToolbar
:
ViewGroup
}
interface
IConductorActivity
{
...
...
app/src/main/java/com/biganto/visual/roompark/data/data_provider/AlbumsRepository.kt
View file @
d11513ae
...
...
@@ -73,10 +73,8 @@ class AlbumsContractModule @Inject constructor(
Observable
.
mergeDelayError
(
arrayListOf
(
fetchTopLevelAlbumsApi
,
fetchTopLevelAlbumsDb
)
).
doOnNext
{
Timber
.
d
(
"got entity $it"
)
}.
map
{
fromEntity
(
it
,
::
fromEntity
)
}
//endregion allAlbums
//region concrete Albums
private
fun
fetchAlbumsApi
(
parentAlbumId
:
Int
)
=
api
.
getAlbums
(
parentAlbumId
)
...
...
@@ -105,7 +103,6 @@ class AlbumsContractModule @Inject constructor(
Observable
.
mergeDelayError
(
arrayListOf
(
fetchAlbumsApi
(
parentId
),
fetchAlbumsDb
(
parentId
))
).
map
{
fromEntity
(
it
,
::
fromEntity
)
}
//endregion concrete Albums
...
...
@@ -119,8 +116,6 @@ class AlbumsContractModule @Inject constructor(
private
fun
fetchWebCams
():
Observable
<
WebCamListModel
>
=
fetchWebCamsApi
//endregion
//region concrete Albums
private
fun
fetchAlbumPhotosApi
(
albumId
:
Int
)
=
api
.
getPhotos
(
albumId
)
...
...
@@ -141,7 +136,6 @@ class AlbumsContractModule @Inject constructor(
Observable
.
mergeDelayError
(
arrayListOf
(
fetchAlbumPhotosApi
(
albumId
),
fetchAlbumsPhotosDb
(
albumId
))
).
map
{
fromEntity
(
it
,
::
fromEntity
)
}
//endregion concrete Albums
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenController.kt
View file @
d11513ae
...
...
@@ -27,7 +27,7 @@ import javax.inject.Inject
const
val
SELECTED_DEAL_ID_KEY
=
"SELECTED_DEAL_GUID"
class
DealScreenController
:
class
DealScreenController
:
BigantoBaseController
<
DealScreenViewState
,
DealScreen
,
DealScreenPresenter
>
...
...
@@ -68,22 +68,18 @@ class DealScreenController :
private
fun
setToolbar
(){
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
false
)
toolBar
.
collapsingToolbarLayout
.
title
=
"lalka"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
// toolBar.collapsingToolbarLayout.viewTreeObserver
Timber
.
d
(
"content insets : ${toolBar.topAppBar.contentInsetEnd}"
)
toolBar
.
statusToolbar
.
visibility
=
View
.
GONE
toolBar
.
headerToolbar
.
findViewById
<
MaterialTextView
>(
R
.
id
.
toolbar_title
).
text
=
"Azzzzaa"
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.
}
private
fun
bindRecycler
()
{
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deals/ScreenController.kt
View file @
d11513ae
...
...
@@ -49,9 +49,11 @@ class DealsScreenController :
}
private
fun
setToolbar
(){
toolBar
.
topAppBar
.
removeAllViews
()
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
true
)
toolBar
.
collapsingToolbarLayout
.
title
=
"МОИ СДЕЛКИ"
toolBar
.
topAppBar
.
title
=
"МОИ СДЕЛКИ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenController.kt
View file @
d11513ae
...
...
@@ -152,7 +152,7 @@ class EstateScreenController :
private
fun
setToolbar
(){
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
false
)
toolBar
.
collapsingToolbarLayout
.
title
=
"ИЗБРАННОЕ"
toolBar
.
topAppBar
.
title
=
"ИЗБРАННОЕ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/favorites/ScreenController.kt
View file @
d11513ae
...
...
@@ -41,7 +41,7 @@ class FavoritesScreenController :
private
fun
setToolbar
(){
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
false
)
toolBar
.
collapsingToolbarLayout
.
title
=
"ИЗБРАННОЕ"
toolBar
.
topAppBar
.
title
=
"ИЗБРАННОЕ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feed_list/ScreenController.kt
View file @
d11513ae
...
...
@@ -50,7 +50,7 @@ class ArticlesScreenController :
toolBar
.
appBar
.
visibility
=
Toolbar
.
VISIBLE
toolBar
.
appBar
.
setExpanded
(
false
,
false
)
toolBar
.
collapsingToolbarLayout
.
title
=
"НОВОСТь"
toolBar
.
topAppBar
.
title
=
"НОВОСТь"
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
articlesRecyclerView
.
isNestedScrollingEnabled
=
false
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/home/BottomNavigationRouterPagerAdapter.kt
View file @
d11513ae
...
...
@@ -131,7 +131,7 @@ class BNVRouterPagerAdapter(
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBar
.
setLifted
(
true
)
toolBar
.
appBarScrollable
(
false
)
toolBar
.
collapsingToolbarLayout
.
title
=
when
(
position
){
toolBar
.
topAppBar
.
title
=
when
(
position
){
0
->
"dsfsdf"
1
->
"ИЗБРАННОЕ"
2
->
"МОИ СДЕЛКИ"
...
...
@@ -151,7 +151,6 @@ Timber.d(" IN POSOIITION 0 ")
toolBar
.
topAppBar
.
visibility
=
View
.
GONE
;
val
params
:
CoordinatorLayout
.
LayoutParams
=
cc
.
conductorContainer
.
layoutParams
as
CoordinatorLayout
.
LayoutParams
params
.
behavior
=
null
toolBar
.
collapsingToolbarLayout
.
visibility
=
View
.
GONE
}
1
->{}
2
->{}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/settings/ScreenController.kt
View file @
d11513ae
...
...
@@ -75,7 +75,7 @@ class SettingsScreenController :
private
fun
setToolbar
(){
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
true
)
toolBar
.
collapsingToolbarLayout
.
title
=
"НАСТРОЙКИ"
toolBar
.
topAppBar
.
title
=
"НАСТРОЙКИ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
nestedScrollContainer
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBar
.
setLifted
(
true
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenController.kt
View file @
d11513ae
...
...
@@ -62,7 +62,7 @@ class FindFlatScreenController :
private
fun
setToolbar
(){
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
true
)
toolBar
.
collapsingToolbarLayout
.
title
=
"СМОТРЕТЬ\nКВАРТИРУ"
toolBar
.
topAppBar
.
title
=
"СМОТРЕТЬ\nКВАРТИРУ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBar
.
setLifted
(
true
)
...
...
app/src/main/res/layout/activity_main.xml
View file @
d11513ae
...
...
@@ -13,14 +13,16 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"56dp"
android:padding=
"0dp"
app:layout_constraintTop_toTopOf=
"parent"
>
<com.google.android.material.appbar.AppBarLayout
android:id=
"@+id/app_bar"
android:layout_width=
"match_parent"
android:layout_height=
"
144dp
"
android:layout_height=
"
wrap_content
"
android:background=
"@color/colorCommonBackground"
android:clipToPadding=
"true"
android:padding=
"0dp"
android:theme=
"@style/ThemeOverlay.AppCompat.Light"
app:expanded=
"false"
app:layout_behavior=
".util.view_utils.app_bar.DragControlAppBarLayoutBehaviour"
...
...
@@ -28,47 +30,71 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:liftOnScroll=
"true"
android:contentInsetStart=
"0dp"
android:contentInsetLeft=
"0dp"
android:contentInsetEnd=
"0dp"
android:contentInsetRight=
"0dp"
android:minHeight=
"24dp"
android:visibility=
"visible"
app:contentInsetEnd=
"0dp"
app:contentInsetLeft=
"0dp"
app:contentInsetRight=
"0dp"
app:contentInsetStart=
"0dp"
tools:visibility=
"visible"
>
<
com.google.android.material.appbar.CollapsingToolbarLayout
android:id=
"@+id/
collapsingToolbarLayout
"
<
androidx.appcompat.widget.Toolbar
android:id=
"@+id/
top_toolbar
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:overScrollMode=
"never"
android:visibility=
"invisible"
app:expandedTitleGravity=
"bottom"
app:expandedTitleMargin=
"16dp"
app:layout_scrollFlags=
"scroll|exitUntilCollapsed"
>
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/top_toolbar"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:contentInsetStart=
"0dp"
android:contentInsetLeft=
"0dp"
android:contentInsetEnd=
"0dp"
android:contentInsetRight=
"0dp"
android:minHeight=
"24dp"
android:padding=
"0dp"
android:visibility=
"visible"
app:contentInsetEnd=
"0dp"
app:contentInsetLeft=
"0dp"
app:contentInsetRight=
"0dp"
app:contentInsetStart=
"0dp"
app:contentInsetStartWithNavigation=
"0dp"
app:layout_collapseMode=
"pin"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:titleTextAppearance=
"@style/Header_TextView.Main_Header"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"?android:attr/actionBarSize"
android:visibility=
"invisible"
app:layout_collapseMode=
"pin"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:showAsAction=
"always"
app:titleTextAppearance=
"@style/Header_TextView.Main_Header"
tools:visibility=
"invisible"
>
android:layout_height=
"wrap_content"
android:fitsSystemWindows=
"true"
android:orientation=
"vertical"
>
</androidx.appcompat.widget.Toolbar>
<include
layout=
"@layout/status_layout_toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"visible"
/>
<include
layout=
"@layout/switch_toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"visible"
/>
</LinearLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:id=
"@+id/conductor_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:layout_behavior=
"com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
>
<include
layout=
"@layout/test_progress_status"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</FrameLayout>
app:layout_behavior=
"com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
/>
<!-- <com.bluelinelabs.conductor.ChangeHandlerFrameLayout-->
<!-- android:id="@+id/conductor_container"-->
...
...
app/src/main/res/layout/status_layout_toolbar.xml
0 → 100644
View file @
d11513ae
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/status_toolbar_container"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<FrameLayout
android:id=
"@+id/status_icon"
android:layout_width=
"8dp"
android:layout_height=
"8dp"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"8dp"
android:background=
"@drawable/new_feed_icon"
android:visibility=
"visible"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/status_title"
style=
"@style/Accent_Minor_TextView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:text=
"СВОБОДНА"
app:layout_constraintBottom_toBottomOf=
"@+id/status_icon"
app:layout_constraintStart_toEndOf=
"@+id/status_icon"
app:layout_constraintTop_toTopOf=
"@+id/status_icon"
/>
<ImageView
android:id=
"@+id/back_cross"
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:layout_marginEnd=
"16dp"
android:scaleType=
"centerCrop"
android:tint=
"@color/colorGray"
app:layout_constraintBottom_toBottomOf=
"@+id/status_icon"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@+id/status_icon"
app:srcCompat=
"@drawable/ic_close"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/switch_toolbar.xml
View file @
d11513ae
...
...
@@ -2,17 +2,18 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/
linearLayout13
"
android:id=
"@+id/
switch_toolbar_container
"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorAccentSecondary"
>
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/colorAccentSecondary"
android:fitsSystemWindows=
"true"
>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/back_button_chevron"
style=
"@style/Accent_Minor_TextView.Default"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
24
dp"
android:layout_marginStart=
"
8
dp"
android:drawableStart=
"@drawable/ic_chevron_left"
android:gravity=
"start|center_vertical"
android:text=
"МОИ \nСДЕЛКИ"
...
...
@@ -32,6 +33,8 @@
android:text=
"НОВОСТИ"
android:textAlignment=
"gravity"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toEndOf=
"@id/back_button_chevron"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment