-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable EdgeToEdge on the Egg pages
Signed-off-by: Hu Shenghao <[email protected]>
- Loading branch information
1 parent
3493249
commit 3e0b5a9
Showing
19 changed files
with
145 additions
and
82 deletions.
There are no files selected for viewing
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
This file was deleted.
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
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
33 changes: 33 additions & 0 deletions
33
core/activity-actions/src/main/java/com/dede/android_eggs/util/actions/EggActivityAction.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,33 @@ | ||
package com.dede.android_eggs.util.actions | ||
|
||
import android.app.Activity | ||
import androidx.activity.EdgeToEdgeCompat | ||
import com.dede.android_eggs.util.ActivityActionDispatcher | ||
import com.dede.android_eggs.views.main.util.EasterEggShortcutsHelp | ||
|
||
internal class EggActivityAction : ActivityActionDispatcher.ActivityAction { | ||
|
||
private val edgeToEdgePagers: Set<Class<out Activity>> = setOf( | ||
com.android_o.egg.octo.Ocquarium::class.java, | ||
com.android_m.egg.MLandActivity::class.java, | ||
com.android_l.egg.LLandActivity::class.java, | ||
com.android_k.egg.DessertCase::class.java, | ||
com.android_j.egg.BeanBag::class.java, | ||
com.android_i.egg.Nyandroid::class.java, | ||
) | ||
|
||
private val Activity.isPlatLogoActivity: Boolean | ||
get() = javaClass.simpleName == "PlatLogoActivity" | ||
|
||
override fun onPreCreate(activity: Activity) { | ||
if (activity.isPlatLogoActivity || edgeToEdgePagers.contains(activity.javaClass)) { | ||
EdgeToEdgeCompat.enable(activity) | ||
} | ||
} | ||
|
||
override fun onCreate(activity: Activity) { | ||
if (activity.isPlatLogoActivity) { | ||
EasterEggShortcutsHelp.autoReportShortcutUsed(activity, activity.intent) | ||
} | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
...tivity-actions/src/main/java/com/dede/android_eggs/util/actions/PlatLogoActivityAction.kt
This file was deleted.
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
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
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,2 @@ | ||
- EdgeToEdge mode is enabled on the Easter Egg pages | ||
- Upgrade project dependencies |
Oops, something went wrong.