Fix MainActivity display (Fixes #2927)

This commit is contained in:
Benoit Marty 2021-03-10 15:34:28 +01:00
parent 8356d18a67
commit 5aa8b0255a
3 changed files with 30 additions and 3 deletions

View File

@ -18,6 +18,7 @@ Bugfix 🐛:
- Try to fix crash about UrlPreview (#2640)
- Be robust if Event.type is missing (#2946)
- Snappier message send status
- Fix MainActivity display (#2927)
Translations 🗣:
- All string resources and translations have been moved to the application module. Weblate project for the SDK will be removed.

View File

@ -31,7 +31,7 @@ import im.vector.app.core.error.ErrorFormatter
import im.vector.app.core.extensions.startSyncing
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.core.utils.deleteAllFiles
import im.vector.app.databinding.FragmentLoadingBinding
import im.vector.app.databinding.ActivityMainBinding
import im.vector.app.features.home.HomeActivity
import im.vector.app.features.home.ShortcutsHandler
import im.vector.app.features.login.LoginActivity
@ -66,7 +66,7 @@ data class MainActivityArgs(
* This Activity, when started with argument, is also doing some cleanup when user signs out,
* clears cache, is logged out, or is soft logged out
*/
class MainActivity : VectorBaseActivity<FragmentLoadingBinding>(), UnlockedActivity {
class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity {
companion object {
private const val EXTRA_ARGS = "EXTRA_ARGS"
@ -81,7 +81,7 @@ class MainActivity : VectorBaseActivity<FragmentLoadingBinding>(), UnlockedActiv
}
}
override fun getBinding() = FragmentLoadingBinding.inflate(layoutInflater)
override fun getBinding() = ActivityMainBinding.inflate(layoutInflater)
private lateinit var args: MainActivityArgs

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- The background of this Activity is in the theme (so just added as tools here, for preview),
so we just add a ProgressBar here -->
<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:layout_width="match_parent"
android:layout_height="match_parent"
tools:background="@drawable/splash"
tools:context=".features.MainActivity">
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginTop="160dp"
android:indeterminate="true"
android:indeterminateTint="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>