How to hide notification icons in Android Status Bar? - java

I'm working on a German Learning app project, inspired by Duolingo app.
I need to make my app to be a little bit similar with this feature. It's like making the user to focus on the quiz, and ignore everything in status bar (notification bar). Now, what I need is i want to hide the icons on notification bar. Is there a way to do so?
This is what I want
And this is the fact

You can dim the status and navigation bars by setting the SYSTEM_UI_FLAG_LOW_PROFILE flag.
View decorView = getActivity().getWindow().getDecorView();
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
https://developer.android.com/training/system-ui/dim.html
This decoration is reset whenever the keyboard is made visible, but you can watch for the keyboard being hidden (using an onGlobalLayoutListener) and resetting the flag.

You could just disable notifications for the offending apps in your device's settings menu. I'm looking for an option to hide them from the status bar while keeping notifications in the shade and on the lock screen. Apparently not on a Samsung device.

Related

Enable/Disable Touch Screen on Android

Is there any way of disabling / enabling the touch events in a certain activity
without disabling certain buttons. like if the phone is "frozen" on a certain activity page for limited time?
I need that the user wont be able to go back on page, slide out or any other events.
Is it possible? (I'm using android studio, java)
Thanks in advance!
Any answer would help :)
It's possible.
Actually there is no special function to make it.
To make it, you can make a full screen button with transparent background.
And you will define a function of the button.
Of course, it will be an empty function.
Well, you can do nothing on the screen.
and then you can hide or visible the button according to your necessary.

can we change status bar or notification bar position programmatically

I had locked my app to portrait only mode and I handled orientation changes myself, but I realized that in landscape mode the status bar stays the same, and the UI experience would be bad.
Now, that I have developed everything accordingly, the only workaround seems to be for me is to change the status bar position programmatically, since I don't(or actually can't at this point) respect system orientation changes.
Is this possible? To change the status bar position programmatically? Only inside my app and restore once I exit?
Below I have illustrated the desired effect:
first, the app is locked to portrait mode and when I rotate the device the app's views rotate since I parse the raw sensor data and apply the rotation, but in this case the status bar doesn't rotate(since the app is locked to portrait mode, and I only have access to app's views for rotation):
A pseudocode of how I've done the above is:
View views[] = new View[]{view1, view2, view3, view4 ....};
float rotationAngle = parseRawSensorData();//typically accelerometer input
for(View view: views){
rotateWithAngle(rotationAngle);
}
Therefore the views rotate but the status bar is affixed.
what I'd like to do is to be able to rotate the status bar using some code like this:
i.e. rotate the statusbar according to the sensordata I fetch.
The statusbar is part of the Android system, not part of your application. So there is no way you could control that from your application.
Instead of rotating a status bar, you can just hide it when using your app.
Import:
import android.view.WindowManager
And write this:
getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN
)

Android N 7.0 status bar animation

I need to implement the new Android N notification drawer into my app. I've managed to mimic the L and M themes already, but my question is
How is the expansion animation created? What type of view is there and how it reacts to swiping down? Below is a GIF so you can see what I mean. Is that a custom GridView? Or something more advanced?
Thanks a lot for any thoughts on how this works.

Corona SDK android keyboard and native textFields

I'm developing an app for iOS and Android using Corona SDK and have problems with managing native textFields in Android.
I'm trying to achieve the following effects:
tapping on textfield will animate its sliding with keyboard so it will be always on top of it while moving up.
Tapping on back button will dismiss the keyboard and slide textfield back with it
My problems are:
To know the height of the keyboard in order to know where to stop moving the textfield.
To catch back button tap in order to eliminate the textfield
What I am doing:
I've looked over the Internet to find out how to check keyboard height on Android. All solutions assume we have Activities.
We have registered onKey listener to catch back press in corona code, but it is not fired if keyboard shown.
Ok so I made this Draw & Guess Online game and I used Native TextFields as well. What I did is just set my device resolution to lets say 600x1024. Then I just tested on a few different devices, and just eyeballed where the keyboard was located. I'm afraid this is what your going to have to do. Just use a for loop to make around 10 small rectangles and print the pixel values next to each of them. Then take your test devices, and see where the keyboard lyes on each device. Then just animate them up.
There is no easy way to do it in Corona unfortunately. Also people could have custom keyboards which would make your life even more difficult. All I can recommend is to over estimate and release.

showing overlay help in android app

I have an app where the action bar and notification bar is hidden when user opens the app. I have seen some apps where some overlay help is shown with the image of a hand and up,down arrows and text below which says:
"Tap to view action bar. Tap again to go full screen"
Any help?
Do not use full screen for your app unless you really knows it's the only way. Full screen is annoying for user as you hides clock, nottifications etc.
As for help you may want to use ShowCaseView library: https://github.com/Espiandev/ShowcaseView

Categories