mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 03:48:12 +03:00
Launcher + Animated logo
This commit is contained in:
parent
73580493ea
commit
3091a337c9
10 changed files with 17 additions and 50 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
<activity
|
||||
android:name=".features.MainActivity"
|
||||
android:theme="@style/Theme.Riot.Splash">
|
||||
android:theme="@style/AppTheme.Launcher">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
package im.vector.riotredesign.features.home.room.detail
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.bumptech.glide.Glide
|
||||
import im.vector.riotredesign.R
|
||||
import im.vector.riotredesign.core.platform.RiotFragment
|
||||
import kotlinx.android.synthetic.main.fragment_loading_room_detail.*
|
||||
|
@ -36,9 +36,11 @@ class LoadingRoomDetailFragment : RiotFragment() {
|
|||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
Glide.with(this)
|
||||
.load(R.drawable.riot_splash)
|
||||
.into(animatedLogoImageView)
|
||||
|
||||
val background = animatedLogoImageView.background
|
||||
if (background is AnimationDrawable) {
|
||||
background.start()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
|
@ -7,21 +7,21 @@
|
|||
<!-- Note: Gif will be loaded by the code -->
|
||||
<ImageView
|
||||
android:id="@+id/animatedLogoImageView"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="240dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/riot_animated_logo"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="@dimen/layout_vertical_margin_big"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/animatedLogoImageView" />
|
||||
|
|
|
@ -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>
|
4
vector/src/main/res/values/ic_launcher_background.xml
Normal file
4
vector/src/main/res/values/ic_launcher_background.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFF</color>
|
||||
</resources>
|
|
@ -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>
|
|
@ -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>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
Loading…
Reference in a new issue