-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
81 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
Assignment1/JourneyTrack/app/src/main/java/com/example/journeytrack/SplashActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.example.journeytrack | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import android.os.Handler | ||
import android.os.Looper | ||
import android.widget.ImageView | ||
import androidx.appcompat.app.AppCompatActivity | ||
import com.bumptech.glide.Glide | ||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions | ||
|
||
class SplashActivity : AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_splash) | ||
|
||
val splashGif: ImageView = findViewById(R.id.splashGif) | ||
Glide.with(this).load(R.drawable.journeytracksplash).transition(DrawableTransitionOptions.withCrossFade()).into(splashGif) | ||
|
||
Handler(Looper.getMainLooper()).postDelayed({ | ||
val mainIntent = Intent(this, MainActivity::class.java) | ||
startActivity(mainIntent) | ||
finish() | ||
}, 1500) | ||
} | ||
} |
Binary file added
BIN
+5.15 KB
Assignment1/JourneyTrack/app/src/main/res/drawable/journeyTrackSmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+696 KB
Assignment1/JourneyTrack/app/src/main/res/drawable/journeyTrackSplash.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
Assignment1/JourneyTrack/app/src/main/res/layout/activity_splash.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<ImageView | ||
android:id="@+id/splashGif" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:src="@drawable/journeytracksplash" | ||
android:contentDescription="@string/journeytracksplash" /> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<resources> | ||
<string name="app_name">JourneyTrack</string> | ||
<string name="journeytracksplash">journeytracksplash</string> | ||
</resources> |