forked from GitHub-Mirror/riotX-android
Add splash for initial sync
This commit is contained in:
parent
455b860f06
commit
1cc19a90bc
@ -4,8 +4,10 @@ import android.os.Bundle
|
|||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
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.*
|
||||||
|
|
||||||
class LoadingRoomDetailFragment : RiotFragment() {
|
class LoadingRoomDetailFragment : RiotFragment() {
|
||||||
|
|
||||||
@ -20,5 +22,12 @@ class LoadingRoomDetailFragment : RiotFragment() {
|
|||||||
return inflater.inflate(R.layout.fragment_loading_room_detail, container, false)
|
return inflater.inflate(R.layout.fragment_loading_room_detail, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
Glide.with(this)
|
||||||
|
.load(R.drawable.riot_splash)
|
||||||
|
.into(animatedLogoImageView)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
BIN
app/src/main/res/drawable/riot_splash.gif
Normal file
BIN
app/src/main/res/drawable/riot_splash.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
@ -4,17 +4,26 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<!-- 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"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="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_marginStart="8dp"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginTop="8dp"
|
android:indeterminate="true"
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
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_toBottomOf="@id/animatedLogoImageView" />
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
Loading…
Reference in New Issue
Block a user