I am facing this issue several times while using material design and I could not find any solution for this issue. Whenever I visited Activity A which is the main screen I moved or opened Activity B then I went back to Activity A after that I opened Activity C. When I landed on Activity C it shows blue color to the whole activity as like some overlay of blue color. IDK is there some rendering color?
I have all the possible solutions. But I am sure it is an issue regarding the material theme. The expected screen will be like the original white background color.
Related
I have created an overlay menu that is a rectangle.
It displays on top of everything else while active. All other apps, the home screen, etc.
If you click anywhere outside of this rectangle your click hits
whatever is visible.
If you click the red part it allows you to drag the menu around the
screen. Clicking the green part performs some function.
I have created this rectangle from inflating layout xml. The rectangle itself is a relativeLayout and the green and red parts are both imageView children.
Since I'm unable to move the relativeView off screen and since the background needs to be clickable my only solution was to calculate margins and apply them to the relative view to imitate the desired effect.
However, the code to calculate these margins is almost 50 lines and fairly complex and hard to understand at a glance if someone else needs to refactor. I can post the code but I don't believe it's relevant to the actual problem's context.
Is there a much simpler way to do this that I'm missing? Is my approach wrong?
I hope this simple project may help you Android Floating Widget
I am developing an application in which map is integrated and there are multi markers on it...
As you seen in the picture I want to design my application like this...
Means in first the map markers are visible on the map. By clicking on it the bottom menu will appear as in the first screen in example picture...
Then if the user drag up this menu then the more detailed view will cover the half of the screen.
And by dragging up again then the full screen will cover up with activity or by fragment and the toolbar name is changed...
As seen in the example picture.
Some context.
I have a RelativeLayout that is added with a WindowManager the type is TYPE_SISTEM_ALERT with the flags FLAG_NOT_TOUCH_MODAL FLAG_WATCH_OUTSIDE_TOUCH.
I'm able to get touch events either on this RelativeLayout or in the Activity "behind" it, but as long as it's not part of the "RelativeLayout window" added.
* The black bars are the Views on my RelativeLayout;
* the red rectangle is the whole container of this RelativeLayout;
* the yellow stars are the spots of space that is created from the black views;
* the white space is the Activity behind this RelativeLayout window on top.
Imagine there is a Button on the yellow stars spots that are from the Activity A, BUT are VISIBLE to the user and if he clicks there.
the Button of the Activity A should be able to respond, even though its "behind" this RelativeLayout Window.
My references, but unfortunately without success so far are :
Android overlay to grab ALL touch, and pass them on?
Android : Multi touch and TYPE_SYSTEM_OVERLAY
Is there a workaround to this?
Is there a workaround to this?
If the activity in question is your own activity, get rid of the system-level overlay and implement the overlay in your activity's own view hierarchy.
If the activity in question is not your own activity, then AFAIK what you want is not possible. Windows in Android, at the moment at least, are purely rectangular; I know of no way that you can set up your window to be non-rectangular and have the activity truly be the top-most item in those transparent areas. And, passing touch events along has been blocked since Android 4.0, for security reasons (tapjacking attacks).
Hello I have some questions for adding images for a ImageButton.
I have an icon for example a play button now if I hover over the button it just should get a blue surounding box the inside Image should not change.
Should I draw for every icon the two states or are there other options.
If an button is not clickable it should get Grey. Same how to do this? Add an additional Image to every Icon?
For what is the Checked drawable in the ImageButton?
ImageButtons have a drawable for their background (up, down, over, etc.) and a drawable for the image on top of the button (imageUp, imageDown, imageOver, etc.). The only ones you must provide are up for the background and imageUp for the icon. These are the defaults used when you leave the other states null. But for visual reasons, you need down for the background or it will be hard to tell if the button is being pressed. It's up to you whether you think you need to also change the icon appearance with an imageDown.
All you need is to add the background drawable for disabled. If you want the icon to also turn gray, you need to create a gray version of the icon and assign it to imageDisabled.
The Buttons in Scene2d all support toggle functionality. When you press it, it will toggle to the checked state, so you can use the checked drawable to change its appearance while it is stuck down. If you don't want that to happen, leave the checked drawable null.
My app consists of five different fragments where the user can slide from one to another.
I have applied the stack (Official Google Animation) to the fragments so the layout looks more appealing when transitioning from one page to another. I went ahead and made some changes, but when swiping you an see a black background so I had changed the default background in my styles.xml to a pre-fixed image. But I wish to apply the wallpaper of the system. For example I'm on my home-screen and I have lets say a picture of a cat as my wallpaper, and when I open my app, and scroll across screens I want the background to display the system wallpaper, aka the cat picture.
How can I go about achieving this?
I have searched on this but nothing is showing up, I've tried adding a colour item to colors.xml and setting the hex value to #00000000 and applying this to the background, but when sliding across the fragments, there is no transparency, instead it's black.
It seems so I can use this code -
WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
Drawable wallpaperDrawable = wallpaperManager.getDrawable();
But how can I apply this as a background to all of my fragments? I'm aware that it must be applied in the fragmentlauncher class where all my fragments are launched from.