Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
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
59ed84a4
Commit
59ed84a4
authored
Jan 21, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
impl toolbar into screens
parent
ea5ca6cf
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
98 additions
and
20 deletions
+98
-20
RoomParkMainActivity.kt
.../com/biganto/visual/roompark/base/RoomParkMainActivity.kt
+7
-2
ScreenController.kt
...ual/roompark/presentation/screen/deal/ScreenController.kt
+14
-5
ScreenController.kt
...al/roompark/presentation/screen/deals/ScreenController.kt
+2
-2
ScreenController.kt
...l/roompark/presentation/screen/estate/ScreenController.kt
+7
-0
ScreenController.kt
...oompark/presentation/screen/favorites/ScreenController.kt
+7
-1
ScreenController.kt
...oompark/presentation/screen/feed_list/ScreenController.kt
+17
-4
ScreenController.kt
...al/roompark/presentation/screen/photo/ScreenController.kt
+1
-1
ScreenController.kt
...roompark/presentation/screen/settings/ScreenController.kt
+7
-1
ScreenController.kt
.../roompark/presentation/screen/to_flat/ScreenController.kt
+7
-1
switch_toolbar.xml
app/src/main/res/layout/switch_toolbar.xml
+1
-1
styles.xml
app/src/main/res/values-v23/styles.xml
+22
-0
strings.xml
app/src/main/res/values/strings.xml
+5
-2
styles.xml
app/src/main/res/values/styles.xml
+1
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/base/RoomParkMainActivity.kt
View file @
59ed84a4
...
...
@@ -91,13 +91,18 @@ class RoomParkMainActivity(
headerToolbar
.
setGone
(
header
==
null
)
statusToolbar
.
setGone
(
status
==
null
)
header
?.
let
{
headerToolbarBack
.
setGone
(
it
.
backButton
)
Timber
.
d
(
"bb: ${it.backButton}"
)
Timber
.
d
(
"bt: ${it.backTitle}"
)
Timber
.
d
(
"itTitle: ${it.title}"
)
Timber
.
d
(
"switcher: ${it.switcher} - ${it.switcher?:false}"
)
headerToolbarBack
.
setGone
(!
it
.
backButton
)
headerToolbarBack
.
text
=
it
.
backTitle
?:
""
headerToolbar
.
findViewById
<
MaterialTextView
>(
R
.
id
.
toolbar_title
).
text
=
it
.
title
?:
""
headerToolbar
.
findViewById
<
ViewGroup
>(
R
.
id
.
bell_container
).
setGone
(
it
.
switcher
?:
false
)
headerToolbar
.
findViewById
<
ViewGroup
>(
R
.
id
.
include13
).
setGone
(!(
it
.
switcher
?:
false
)
)
}
status
?.
let
{
Timber
.
d
(
" inda status"
)
statusToolbar
.
status_icon
.
setGone
(
it
.
state
==
null
)
statusToolbar
.
status_title
.
setGone
(
it
.
state
==
null
)
it
.
state
?.
let
{
state
->
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenController.kt
View file @
59ed84a4
...
...
@@ -76,11 +76,11 @@ class DealScreenController :
activity
?.
actionBar
?.
setDisplayShowTitleEnabled
(
false
)
toolBar
.
setToolbar
(
HeaderToolbarModel
(
true
,
"МОИ\nСДЕЛКИ"
,
null
,
null
))
true
,
resources
?.
getString
(
R
.
string
.
deal_back_chevron_title
)
,
null
,
null
)
)
}
private
fun
bindRecycler
()
{
...
...
@@ -134,6 +134,13 @@ class DealScreenController :
dealPayed
.
text
=
viewState
.
estate
.
paymentSum
.
toRubly
()
dealSumToPay
.
text
=
viewState
.
estate
.
amount_pay_sum
.
toRubly
()
toolBar
.
setToolbar
(
HeaderToolbarModel
(
true
,
resources
?.
getString
(
R
.
string
.
deal_back_chevron_title
)
,
null
,
true
)
)
progressLayout
.
removeAllViews
()
viewState
.
statusList
.
forEach
{
...
...
@@ -168,6 +175,8 @@ class DealScreenController :
progressLayout
.
invalidate
()
}
private
fun
getComponent
()
=
DaggerDealScreenComponent
.
factory
()
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deals/ScreenController.kt
View file @
59ed84a4
...
...
@@ -53,7 +53,6 @@ class DealsScreenController :
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
false
)
toolBar
.
topAppBar
.
title
=
"МОИ СДЕЛКИ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
...
...
@@ -61,7 +60,8 @@ class DealsScreenController :
toolBar
.
setToolbar
(
HeaderToolbarModel
(
false
,
null
,
"ИЗБРАННОЕ"
,
null
)
false
,
null
,
resources
?.
getString
(
R
.
string
.
my_deals
),
null
)
)
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenController.kt
View file @
59ed84a4
...
...
@@ -12,6 +12,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
butterknife.BindView
import
com.biganto.visual.roompark.R
import
com.biganto.visual.roompark.base.HeaderToolbarModel
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.conductor.BigantoBaseController
...
...
@@ -156,6 +157,12 @@ class EstateScreenController :
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
toolBar
.
setToolbar
(
HeaderToolbarModel
(
true
,
null
,
null
,
null
)
)
// planTypesTabLayout.
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/favorites/ScreenController.kt
View file @
59ed84a4
...
...
@@ -5,6 +5,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
butterknife.BindView
import
com.biganto.visual.roompark.R
import
com.biganto.visual.roompark.base.HeaderToolbarModel
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.conductor.BigantoBaseController
...
...
@@ -41,11 +42,16 @@ class FavoritesScreenController :
private
fun
setToolbar
(){
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
false
)
toolBar
.
topAppBar
.
title
=
"ИЗБРАННОЕ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
favoritesRecyclerView
.
isNestedScrollingEnabled
=
false
toolBar
.
setToolbar
(
HeaderToolbarModel
(
false
,
null
,
resources
?.
getString
(
R
.
string
.
favorites
),
null
)
)
}
private
fun
bindRecycler
()
{
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feed_list/ScreenController.kt
View file @
59ed84a4
...
...
@@ -7,6 +7,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
butterknife.BindView
import
com.biganto.visual.roompark.R
import
com.biganto.visual.roompark.base.HeaderToolbarModel
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.conductor.BigantoBaseController
...
...
@@ -45,15 +46,27 @@ class ArticlesScreenController :
lateinit
var
articlesRecyclerView
:
RecyclerView
private
fun
setToolbar
(){
private
fun
setToolbar
()
{
toolBar
.
showAll
()
toolBar
.
appBar
.
visibility
=
Toolbar
.
VISIBLE
toolBar
.
appBar
.
visibility
=
Toolbar
.
VISIBLE
toolBar
.
appBar
.
setExpanded
(
false
,
false
)
toolBar
.
topAppBar
.
title
=
"НОВОСТь"
toolBar
.
appBar
.
setExpanded
(
false
,
false
)
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBarScrollable
(
false
)
articlesRecyclerView
.
isNestedScrollingEnabled
=
false
toolBar
.
setToolbar
(
HeaderToolbarModel
(
true
,
null
,
resources
?.
getString
(
when
(
args
.
getString
(
FEED_ALIAS
))
{
"news"
->
R
.
string
.
news_header
else
->
R
.
string
.
blog_header
}
),
true
)
,
null
)
}
private
fun
bindRecycler
()
{
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/photo/ScreenController.kt
View file @
59ed84a4
...
...
@@ -48,7 +48,7 @@ class PhotoScreenController :
}
override
fun
onViewBound
(
v
:
View
)
{
toolBar
.
hideAll
()
toolBar
.
setToolbar
()
bottomNavigation
.
hide
()
bindRecycler
()
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/settings/ScreenController.kt
View file @
59ed84a4
...
...
@@ -8,6 +8,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
butterknife.BindView
import
com.biganto.visual.roompark.R
import
com.biganto.visual.roompark.base.HeaderToolbarModel
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.conductor.BigantoBaseController
...
...
@@ -75,13 +76,18 @@ class SettingsScreenController :
private
fun
setToolbar
(){
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
true
)
toolBar
.
topAppBar
.
title
=
"НАСТРОЙКИ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
nestedScrollContainer
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBar
.
setLifted
(
true
)
toolBar
.
appBarScrollable
(
false
)
pushRecycler
.
isNestedScrollingEnabled
=
false
cachedRecycler
.
isNestedScrollingEnabled
=
false
toolBar
.
setToolbar
(
HeaderToolbarModel
(
false
,
null
,
resources
?.
getString
(
R
.
string
.
settings
),
null
)
)
}
override
fun
onViewBound
(
v
:
View
)
{
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenController.kt
View file @
59ed84a4
...
...
@@ -6,6 +6,7 @@ import android.widget.EditText
import
android.widget.TextView
import
butterknife.BindView
import
com.biganto.visual.roompark.R
import
com.biganto.visual.roompark.base.HeaderToolbarModel
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.conductor.BigantoBaseController
...
...
@@ -62,11 +63,16 @@ class FindFlatScreenController :
private
fun
setToolbar
(){
toolBar
.
showAll
()
toolBar
.
appBar
.
setExpanded
(
false
,
true
)
toolBar
.
topAppBar
.
title
=
"СМОТРЕТЬ\nКВАРТИРУ"
toolBar
.
appBar
.
liftOnScrollTargetViewId
=
R
.
id
.
favorites_cards_recycler_view
toolBar
.
appBar
.
setLiftable
(
true
)
toolBar
.
appBar
.
setLifted
(
true
)
toolBar
.
appBarScrollable
(
false
)
toolBar
.
setToolbar
(
HeaderToolbarModel
(
false
,
null
,
resources
?.
getString
(
R
.
string
.
flats
),
null
)
)
}
...
...
app/src/main/res/layout/switch_toolbar.xml
View file @
59ed84a4
...
...
@@ -4,7 +4,7 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/switch_toolbar_container"
android:layout_width=
"match_parent"
android:layout_height=
"
?attr/actionBarSize
"
android:layout_height=
"
wrap_content
"
android:fitsSystemWindows=
"true"
>
<com.google.android.material.textview.MaterialTextView
...
...
app/src/main/res/values-v23/styles.xml
0 → 100644
View file @
59ed84a4
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"AppTheme"
parent=
"Theme.MaterialComponents.Light.NoActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorSecondary"
>
@color/colorAccent
</item>
<item
name=
"colorSecondaryVariant"
>
@color/colorAccentSecondary
</item>
<item
name=
"colorPrimaryDark"
>
@color/colorAccentSecondary
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"materialCardViewStyle"
>
@style/Widget.Biganto.MaterialCardView
</item>
<item
name=
"switchStyle"
>
@style/Widget.MaterialComponents.CompoundButton.Switch.BellSwitchStyle
</item>
<item
name=
"colorControlActivated"
>
@color/colorAccent
</item>
<item
name=
"colorControlHighlight"
>
@color/colorAccent
</item>
<item
name=
"colorControlNormal"
>
@color/colorAccent
</item>
<item
name=
"android:statusBarColor"
>
@color/colorPrimary
</item>
<item
name=
"android:windowLightStatusBar"
>
true
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
59ed84a4
<resources>
<string
name=
"app_name"
>
Room Park
</string>
<string
name=
"feeds"
>
Новости
</string>
<string
name=
"favorites"
>
МОИ КВАРТИРЫ
</string>
<string
name=
"favorites"
>
ИЗБРАННОЕ
</string>
<string
name=
"my_deals"
>
МОИ СДЕЛКИ
</string>
<string
name=
"flats"
>
СМОТРЕТЬ
КВАРТИРУ
</string>
<string
name=
"flats"
>
СМОТРЕТЬ
\n
КВАРТИРУ
</string>
<string
name=
"settings"
>
Настройки
</string>
<string
name=
"snackbar_dismiss_button_default"
>
ПОНЯТНО
</string>
<string
name=
"snackbar_dismiss_button_error"
>
ОШИБКА
</string>
...
...
@@ -78,6 +78,9 @@
<string
name=
"overall_cache"
>
Всего скачано
</string>
<string
name=
"estate_avalibale"
>
СВОБОДНА
</string>
<string
name=
"estate_sold_out"
>
ПРОДАНА
</string>
<string
name=
"deal_back_chevron_title"
>
МОИ\nСДЕЛКИ
</string>
<string
name=
"news_header"
>
НОВОСТИ
</string>
<string
name=
"blog_header"
>
БЛОГ
</string>
<!--endregion-->
</resources>
app/src/main/res/values/styles.xml
View file @
59ed84a4
...
...
@@ -15,6 +15,7 @@
<item
name=
"colorControlActivated"
>
@color/colorAccent
</item>
<item
name=
"colorControlHighlight"
>
@color/colorAccent
</item>
<item
name=
"colorControlNormal"
>
@color/colorAccent
</item>
<item
name=
"android:statusBarColor"
>
@color/colorPrimary
</item>
</style>
<style
name=
"Widget.MainTextInputStyle"
parent=
"Widget.MaterialComponents.TextInputLayout.OutlinedBox"
>
...
...
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