Trick / Remove home progress blank paddings

This commit is contained in:
Valere 2019-07-09 11:17:36 +02:00
parent dd07f5c2a6
commit d52613d723
2 changed files with 21 additions and 9 deletions

View File

@ -212,6 +212,7 @@ class HomeDetailFragment : VectorBaseFragment(), KeysBackupBanner.Delegate {
is SyncState.RUNNING -> if (it.syncState.catchingUp) View.VISIBLE else View.GONE is SyncState.RUNNING -> if (it.syncState.catchingUp) View.VISIBLE else View.GONE
else -> View.GONE else -> View.GONE
} }
syncProgressBarWrap.visibility = syncProgressBar.visibility
} }


companion object { companion object {

View File

@ -44,18 +44,29 @@


</androidx.appcompat.widget.Toolbar> </androidx.appcompat.widget.Toolbar>


<ProgressBar <!-- Trick to remove surrounding padding (clip frome wrapping frame) -->
android:id="@+id/syncProgressBar" <FrameLayout
style="@style/Widget.AppCompat.ProgressBar.Horizontal" android:id="@+id/syncProgressBarWrap"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="3dp"
android:background="?riotx_header_panel_background"
android:indeterminate="true"
android:visibility="gone" android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/groupToolbar" app:layout_constraintTop_toBottomOf="@id/groupToolbar"
tools:visibility="visible">

<ProgressBar
android:id="@+id/syncProgressBar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="14dp"
android:layout_gravity="center"
android:background="?riotx_header_panel_background"
android:indeterminate="true"
android:visibility="gone"
tools:visibility="visible" /> tools:visibility="visible" />
</FrameLayout>



<im.vector.riotx.core.ui.views.KeysBackupBanner <im.vector.riotx.core.ui.views.KeysBackupBanner
android:id="@+id/homeKeysBackupBanner" android:id="@+id/homeKeysBackupBanner"
@ -65,7 +76,7 @@
android:minHeight="67dp" android:minHeight="67dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/syncProgressBar" /> app:layout_constraintTop_toBottomOf="@id/syncProgressBarWrap" />


<FrameLayout <FrameLayout
android:id="@+id/roomListContainer" android:id="@+id/roomListContainer"