On android , is it possible to create a opaque filter that displays only half the screen ? Think of it like a half screen advertisement in black allowing you to see only half the screen and working on a service i.e in the background.
Any code for this would be helpful as i am a bit clueless.
Related
This is part of my curiosity, I want to make a simple android app which display few text in the middle with white color in a black background. I am trying this in a OLED display. I want the black pixel completley off. Is there any special method by which I accomplish this.
I don't know if this is the right place to ask for a solution.
I have a weird bug on Samsung S9 Android 8.0:
The area for the 3 Buttons (Menu, Home, Back) is blocked for some apps, so their UI ends on the top border of this area although I set these buttons to not fixed so that I have to swipe up to see them. One of these apps is Instagram.
Also, there is the problem that the outline of some UI is shining through the current UI of each app, no matter which app is currently running. This UI is always the same. I removed all UI elements from an app I'm working on so that I have a completely white screen. Then I made a video because on screenshots the UI fragments are not visible:
https://der-magere-student.com/public/media/WIN_20210115_02_29_04_Pro.mp4
On the bottom you can see:
In more or less black: the android menu buttons (BUT NOT THE REAL ONES, the real ones are hidden until I swipe up)
In more or less white: 4 of the five toolbar button of Instagram (home (house icon), the magnifying glass, the Plus (inside the android home button), and the heart) The fifth is not visible
On the top you can see:
The right side of the WhatsApp toolbar: From right to left. The more icon, the call icon, and the video call icon
horizontally centered with a bit offset from the top display border you maybe can see a little bar. I don't know where this comes from
There is a lot more but it's not visible on the video and also not identifiable for me. But I can see something.
Does anyone know where this bug comes from? Is it known? How to fix it?
You're looking at OLED screen burn-in. It's not a software problem; it's actually wear on the screen that happens slowly over time.
The UI you're seeing at the bottom of the screen is Android's navigation buttons, which are particularly notorious for getting burned into the screen (see, for instance, this image from this article), because they're always in about the same spot. Newer versions of Android take measures to reduce the burn-in from them, but there's only so much that it's possible to do.
Try opening something that shows a white screen with the navigation buttons hidden: you'll see the same thing.
I am working on an App that captures the phone camera feed and display it into a GLSurfaceView and then in the renderer I add ImageViews to the screen in some specific coordinates.
The problem I am facing is that the camera feed in the GLSurfaceView is never full screen. In some Android versions it will put some black space horizontally in the top and bottom and in some other versions the black space will be smaller but vertical on the Left and Right of the screen.
I wanted to ask if there is any way to force fullscreen on every version ? I am fairly new to working with GLSurfaceView and nothing I tried works.
You could look into immersive mode to get rid of the system buttons if that's appropriate to your app: https://developer.android.com/training/system-ui/immersive
You should also look into the android.max_aspect manifest setting to eliminate black bars on very widescreen devices: https://android-developers.googleblog.com/2017/03/update-your-app-to-take-advantage-of.html
You should also look into supporting display cutouts (notches): https://developer.android.com/guide/topics/display-cutout/
As mentioned in the comments by BDL, if the screen and camera aspect ratio don't match, then you are going to have to have black bars, or cut off some content.
There's problem with HTC Hero and AndEngine's BaseGameActivity: when launched, there's only white screen, without any graphics like background and sprites. But I can see objects like lines (org.anddev.andengine.entity.primitive.Line) etc. and also I can tap on invisible buttons and my code is performing, but it's still white screen.
When I'm launch this app on other devices everything is ok.
Where is the problem?
Seems like my TextureAtlases was too big for this phone and I have to use several smaller atlases.
To improve the perceived startup time of my application, I am using an image as a drawable for my initial activity as described in
http://developer.android.com/resources/articles/window-bg-speed.html
and it works wonders for what it is intended to do. The application seems to be presenting its first screen within a tenth of a second, much before my onCreate is even called.
However... My application, like most applications, should display under the notification bar of the system (it is not windowFullscreen, only windowNoTitle), and the background image I specify will take the size of the full screen, its top part going under the title bar.
My application will then start and as any well-behaved application it will display content adapted to the actual size of the viewport... which means it will not match the background image.
I could possibly leave room at the top of my startup image, but even at the same screen resolution, different devices have different size notification bars, so I can't have it fit the screen smoothly that way either - not even by supplying one image for each existing screen size, because they will have different notification bar sizes.
This happens before even the first line of code of my activity is even executed - that's the whole point of putting a background image there, to give feedback to the user as early as possible, even before the activity is actually started. The only way I can see would be to somehow tell the android framework to fit my window to the region under the bar and not the whole screen, but I couldn't find how to do that. Does anyone have an idea how to make my image closely fit the interface that will then be presented by my activity ?