Launcher + Animated logo

This commit is contained in:
Benoit Marty 2019-04-03 14:46:15 +02:00
parent 73580493ea
commit 3091a337c9
10 changed files with 17 additions and 50 deletions

View File

@ -18,7 +18,7 @@
<activity <activity
android:name=".features.MainActivity" android:name=".features.MainActivity"
android:theme="@style/Theme.Riot.Splash"> android:theme="@style/AppTheme.Launcher">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@ -16,9 +16,9 @@
package im.vector.riotredesign.features.home.room.detail package im.vector.riotredesign.features.home.room.detail
import android.graphics.drawable.AnimationDrawable
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import com.bumptech.glide.Glide
import im.vector.riotredesign.R import im.vector.riotredesign.R
import im.vector.riotredesign.core.platform.RiotFragment import im.vector.riotredesign.core.platform.RiotFragment
import kotlinx.android.synthetic.main.fragment_loading_room_detail.* import kotlinx.android.synthetic.main.fragment_loading_room_detail.*
@ -36,9 +36,11 @@ class LoadingRoomDetailFragment : RiotFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
Glide.with(this)
.load(R.drawable.riot_splash) val background = animatedLogoImageView.background
.into(animatedLogoImageView) if (background is AnimationDrawable) {
background.start()
}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -7,21 +7,21 @@
<!-- Note: Gif will be loaded by the code --> <!-- Note: Gif will be loaded by the code -->
<ImageView <ImageView
android:id="@+id/animatedLogoImageView" android:id="@+id/animatedLogoImageView"
android:layout_width="240dp" android:layout_width="wrap_content"
android:layout_height="240dp" android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/progressBar" android:background="@drawable/riot_animated_logo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintVertical_chainStyle="packed" />
<ProgressBar <ProgressBar
android:id="@+id/progressBar" android:id="@+id/progressBar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_marginTop="@dimen/layout_vertical_margin_big"
android:indeterminate="true" android:indeterminate="true"
app:layout_constraintBottom_toBottomOf="parent"
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/animatedLogoImageView" /> app:layout_constraintTop_toBottomOf="@id/animatedLogoImageView" />

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Base.V21.Theme.Riot" parent="Base.V1.Theme.Riot" />
<style name="Base.Theme.Riot" parent="Base.V21.Theme.Riot" />
</resources>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFF</color>
</resources>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Riot" parent="Base.Theme.Riot">
</style>
<style name="Theme.Riot.Splash">
<item name="android:windowBackground">@drawable/bg_splash</item>
</style>
</resources>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Base.V1.Theme.Riot" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
<item name="colorPrimary">@color/dark</item>
<item name="colorPrimaryDark">@color/dark</item>
<item name="colorAccent">@color/pale_teal</item>
<item name="buttonStyle">@style/Widget.Button</item>
</style>
<style name="Base.Theme.Riot" parent="Base.V1.Theme.Riot" />
</resources>

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>