Fix fgs_footer layout params

Fix it so that the xml layout shows correctly inside QSPanel. Modify it
when the NEW_FOOTER flag is on in FooterActionsController. Eventually
all this will be set directly in xml when the flag is gone.

Test: manual
Fixes: 21868291
Change-Id: Ide99b51c79967894429342352ccf93a37126b6b3
This commit is contained in:
Fabian Kozynski
2022-02-09 12:40:49 -05:00
parent 1a314e9ef3
commit b91b008eae
2 changed files with 5 additions and 2 deletions

View File

@@ -16,9 +16,8 @@
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="@dimen/qs_security_footer_single_line_height"
android:layout_weight="1"
android:gravity="center"
android:clickable="true"
android:visibility="gone">

View File

@@ -191,6 +191,10 @@ internal class FooterActionsController @Inject constructor(
reformatForNewFooter(securityFooter)
val fgsFooter = fgsManagerFooterController.view
securityFootersContainer?.addView(fgsFooter)
(fgsFooter.layoutParams as LinearLayout.LayoutParams).apply {
width = 0
weight = 1f
}
val visibilityListener =
VisibilityChangedDispatcher.OnVisibilityChangedListener { visibility ->