Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Android 15 #98

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

bhaskar966
Copy link

Description

I added support for Android 15 and found a small bug in a function named "clearBitmap" so I fixed that.
To make the app useable and buildable I needed to update the AGP version as well as opt-out from edge to edge view.
Regarding edge-to-edge, I prefer that you or someone who knows about XML layouts adapt the design according to the guidelines of Andordi 15.

Motivation

I wanted my own apps to support Android 15, so updated here too.

Copy link

welcome bot commented Dec 28, 2024

Thanks so much for opening your first PR here 😃. Please be sure to check the contribution guidelines! 😉

return Bitmap.createBitmap(newBitmap, minX, minY, maxX - minX + 1, maxY - minY + 1)
newBitmap?.setPixels(pixels, 0, width, 0, 0, width, height)
return newBitmap?.let { Bitmap.createBitmap(it, minX, minY, maxX - minX + 1, maxY - minY + 1) } ?: bitmap.also {
Log.e("clearBitmap", "newBitmap is null")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this log

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the log.

@@ -4,7 +4,6 @@ import com.github.javiersantos.piracychecker.PiracyChecker
import dev.jahir.kuper.ui.activities.KuperActivity

class MainActivity : KuperActivity() {

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, there are no changes in MainActivity. Sorry for the mistake 😅

-- we can't create a bitmap which is nullable
now if the bitmap is present it will it will clear it otherwise it will return the actual bitmap.
-- Due to my limited knowledge about Views or XML layouts, I'm not able to fix the overlapping content with status bar in Android 15.

Rather I have, opted out from the enforcement. For now it is fine but Google will soon make it deprecated, so we need to adapt the layout for Android 15 before it deprecate.

It is because Android 15 by-default enables edge to edge view.
@bhaskar966 bhaskar966 changed the title Master Add support for Android 15 Dec 30, 2024
@jahirfiquitiva
Copy link
Owner

thanks for the help @bhaskar966

@jahirfiquitiva jahirfiquitiva merged commit 70f41a0 into jahirfiquitiva:master Jan 2, 2025
1 check passed
Copy link

welcome bot commented Jan 2, 2025

Congrats on merging your first pull request here! 🎉 How awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants