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
d15dd01c
Commit
d15dd01c
authored
Jan 22, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround warp_content appbar
parent
4581a2fa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
14 deletions
+36
-14
RoomParkMainActivity.kt
.../com/biganto/visual/roompark/base/RoomParkMainActivity.kt
+27
-7
ScreenController.kt
...roompark/presentation/screen/settings/ScreenController.kt
+1
-1
activity_main.xml
app/src/main/res/layout/activity_main.xml
+5
-4
switch_toolbar.xml
app/src/main/res/layout/switch_toolbar.xml
+3
-2
No files found.
app/src/main/java/com/biganto/visual/roompark/base/RoomParkMainActivity.kt
View file @
d15dd01c
...
@@ -6,7 +6,6 @@ import android.view.ViewGroup
...
@@ -6,7 +6,6 @@ import android.view.ViewGroup
import
android.widget.LinearLayout
import
android.widget.LinearLayout
import
androidx.appcompat.widget.Toolbar
import
androidx.appcompat.widget.Toolbar
import
androidx.coordinatorlayout.widget.CoordinatorLayout
import
androidx.coordinatorlayout.widget.CoordinatorLayout
import
androidx.core.view.isGone
import
butterknife.BindView
import
butterknife.BindView
import
butterknife.ButterKnife
import
butterknife.ButterKnife
import
com.biganto.visual.roompark.BuildConfig
import
com.biganto.visual.roompark.BuildConfig
...
@@ -26,6 +25,7 @@ import kotlinx.android.synthetic.main.activity_main.*
...
@@ -26,6 +25,7 @@ import kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.status_layout_toolbar.view.*
import
kotlinx.android.synthetic.main.status_layout_toolbar.view.*
import
timber.log.Timber
import
timber.log.Timber
class
RoomParkMainActivity
(
class
RoomParkMainActivity
(
)
:
BaseRoomParkActivity
()
)
:
BaseRoomParkActivity
()
,
ICollapsingToolBar
,
ICollapsingToolBar
...
@@ -114,16 +114,36 @@ class RoomParkMainActivity(
...
@@ -114,16 +114,36 @@ class RoomParkMainActivity(
statusToolbar
.
mean_title
.
setGone
(
it
.
meanTitle
==
null
)
statusToolbar
.
mean_title
.
setGone
(
it
.
meanTitle
==
null
)
it
.
meanTitle
?.
let
{
title
->
statusToolbar
.
mean_title
.
text
=
title
}
it
.
meanTitle
?.
let
{
title
->
statusToolbar
.
mean_title
.
text
=
title
}
}
}
headerToolbar
.
measure
(
0
,
View
.
MeasureSpec
.
UNSPECIFIED
)
statusToolbar
.
measure
(
0
,
View
.
MeasureSpec
.
UNSPECIFIED
)
tbContainer
.
measure
(
0
,
View
.
MeasureSpec
.
UNSPECIFIED
)
val
_d
=
resources
.
displayMetrics
.
density
headerToolbar
.
requestLayout
()
headerToolbar
.
requestLayout
()
statusToolbar
.
requestLayout
()
statusToolbar
.
requestLayout
()
tbContainer
.
requestLayout
()
Timber
.
d
(
" heights _d: ${_d}"
)
val
params
=
topAppBar
.
layoutParams
as
AppBarLayout
.
LayoutParams
Timber
.
d
(
" heights h: ${headerToolbar.height}"
)
val
toolbarHeight
=
Timber
.
d
(
" heights s: ${statusToolbar.height}"
)
if
(!
headerToolbar
.
isGone
)
headerToolbar
.
height
else
0
+
Timber
.
d
(
" heights tb: ${tbContainer.height}"
)
if
(!
statusToolbar
.
isGone
)
statusToolbar
.
height
else
0
params
.
height
=
toolbarHeight
// val params_l= tbContainer.layoutParams as LinearLayout.LayoutParams
topAppBar
.
layoutParams
=
params
// params_l.height = _h
// val params = topAppBar.layoutParams as AppBarLayout.LayoutParams
// val toolbarHeight = (tbContainer.measuredHeight/_d).toInt()
// if (!headerToolbar.isGone) headerToolbar.height else 0 +
// if (!statusToolbar.isGone) statusToolbar.height else 0
// params.height = tbContainer.height
// topAppBar.layoutParams = params
topAppBar
.
requestLayout
()
topAppBar
.
requestLayout
()
appBar
.
requestLayout
()
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/settings/ScreenController.kt
View file @
d15dd01c
...
@@ -86,7 +86,7 @@ class SettingsScreenController :
...
@@ -86,7 +86,7 @@ class SettingsScreenController :
toolBar
.
setToolbar
(
toolBar
.
setToolbar
(
HeaderToolbarModel
(
HeaderToolbarModel
(
false
,
null
false
,
null
,
resources
?.
getString
(
R
.
string
.
setting
s
),
null
)
,
resources
?.
getString
(
R
.
string
.
flat
s
),
null
)
)
)
}
}
...
...
app/src/main/res/layout/activity_main.xml
View file @
d15dd01c
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
android:id=
"@+id/app_bar"
android:id=
"@+id/app_bar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/color
CommonBackground
"
android:background=
"@color/color
Gray
"
android:clipToPadding=
"true"
android:clipToPadding=
"true"
android:padding=
"0dp"
android:padding=
"0dp"
android:theme=
"@style/ThemeOverlay.AppCompat.Light"
android:theme=
"@style/ThemeOverlay.AppCompat.Light"
...
@@ -39,11 +39,13 @@
...
@@ -39,11 +39,13 @@
app:contentInsetLeft=
"0dp"
app:contentInsetLeft=
"0dp"
app:contentInsetRight=
"0dp"
app:contentInsetRight=
"0dp"
app:contentInsetStart=
"0dp"
app:contentInsetStart=
"0dp"
android:minHeight=
"24dp"
android:fitsSystemWindows=
"true"
android:fitsSystemWindows=
"true"
tools:visibility=
"visible"
>
tools:visibility=
"visible"
>
<androidx.appcompat.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:fitsSystemWindows=
"true"
android:fitsSystemWindows=
"true"
android:background=
"@color/colorAttention"
android:id=
"@+id/top_toolbar"
android:id=
"@+id/top_toolbar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -52,9 +54,9 @@
...
@@ -52,9 +54,9 @@
android:contentInsetLeft=
"0dp"
android:contentInsetLeft=
"0dp"
android:contentInsetEnd=
"0dp"
android:contentInsetEnd=
"0dp"
android:contentInsetRight=
"0dp"
android:contentInsetRight=
"0dp"
android:minHeight=
"24dp"
android:padding=
"0dp"
android:padding=
"0dp"
android:visibility=
"visible"
android:visibility=
"visible"
android:minHeight=
"24dp"
app:contentInsetEnd=
"0dp"
app:contentInsetEnd=
"0dp"
app:contentInsetLeft=
"0dp"
app:contentInsetLeft=
"0dp"
app:contentInsetRight=
"0dp"
app:contentInsetRight=
"0dp"
...
@@ -66,9 +68,8 @@
...
@@ -66,9 +68,8 @@
app:titleTextAppearance=
"@style/Header_TextView.Main_Header"
>
app:titleTextAppearance=
"@style/Header_TextView.Main_Header"
>
<LinearLayout
<LinearLayout
android:minHeight=
"24dp"
android:background=
"@color/colorAccentSecondary"
android:id=
"@+id/custom_toolbar_container"
android:id=
"@+id/custom_toolbar_container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/switch_toolbar.xml
View file @
d15dd01c
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
android:id=
"@+id/switch_toolbar_container"
android:id=
"@+id/switch_toolbar_container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/colorError"
android:fitsSystemWindows=
"true"
>
android:fitsSystemWindows=
"true"
>
<com.google.android.material.textview.MaterialTextView
<com.google.android.material.textview.MaterialTextView
...
@@ -29,10 +30,10 @@
...
@@ -29,10 +30,10 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginStart=
"16dp"
android:ellipsize=
"
end
"
android:ellipsize=
"
none
"
android:fitsSystemWindows=
"true"
android:fitsSystemWindows=
"true"
android:gravity=
"start|center_vertical"
android:gravity=
"start|center_vertical"
android:text=
"
НОВОСТИ\nИРКУТСКА
"
android:text=
"
ЗАГОЛОВОК
"
android:textAlignment=
"gravity"
android:textAlignment=
"gravity"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@+id/include13"
app:layout_constraintEnd_toStartOf=
"@+id/include13"
...
...
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