[Tasker] Clear navigation bar color in non-samsung apps - Samsung Galaxy Note 20 Ultra Guides, News, & Discu

Ever since I got my note I've been annoyed that some non-samsung apps had a white nav bar in dark mode (e.g. google messages). I use gesture navigation, and my expectation is that the nav bar should be clear revealing the content below it. Hiding the gesture hint is an option but I like having it there sine it makes switching apps easier and shifts tab bars up a little but, preventing accidental touches.
I've seen posts about changing the color using ADB but that's too cumbersome to have to do every reboot or after applying a theme. I found a reddit post detailing a tasker task which is supposed to let you set the nav bar color to any arbitrary color, but you need to use a separate tool in order to compute the value of the color (since android settings uses a decimal representation of the color rather than the usual hex code) and the provided one no longer seems to be working. Setting a custom color is not really what I wanted it to do anyway (I wanted it to be clear, as it is in most apps). This task also seems to not set navigationbar_current_colorwhich is needed on our devices.
So I went ahead and made a modified version of this task which does work on my note 20 ultra, and just sets the nav bar color to clear:
https://taskernet.com/shares/?user=...cqdIuFWjZaj&id=Task:Set+Navbar+Color+to+Clear
Of course you should use this at your own risk. Samsung hardcodes the nav bar color to white to avoid burn in, so if you change the color to something else and view a lot of white content above the nav bar, you may experience burn in. If clear is not your preferred color, I pre-computed some different values that you can replace the color_codevalue with:
Gray: -14671579
White: -1
Black: -16777216
Clear: 0
If you do want to use a custom color here's a little JS snipped that will compute it:
Code:
function computeColor() {
// Color code #202125 with an alpha of 1
var r = 0x20;
var g = 0x21;
var b = 0x25;
var a = 0xFF;
var value = (a << 24) | (r << 16) | (g << 8) | b;
console.log(value.toString()); // this will output -14671579
}

Related

Help get rid of background in SMS

Hi
I loaded WM6, which was really simple thanks to the details instructions on this site.
Now I loaded a Theme which I like, but it has an annoying background when I view my sms's/mail (Inbox area - not within the actual item) and my contacts. How can I get rid of it?
(I can't attach a pic because the file attachment function doesn't seem to work? )
This is the background I'm trying to get rid of?
You'll need some system color changing utility, like SKTools, or UITweaker. Look for items called something like:
"list color left 1", "list color left 2", "list color right 1", "list color right 2"
or
"left of a gradient listview", "left of a gradient listview (interlalced)", "right of a gradient listview", "right of a gradient listview (interlalced)"
And set both left and both right colors to be equal to each other - then you'll have no horizontal nines, or at least close - then you'll still have horizontal lines, but they won't be as visible.
Of go to WM5 color registry tweaks in XDA wiki and change the colors in registry by hand.
http://wiki.xda-developers.com/index.php?pagename=WindowsMobile5Colors
use themegence to change colour in TSK file..

[Q] using getSurfaceFrame to get display width/height?

So I'm trying out making a live wallpaper and I'm using the sample code provided in the SDK for the cube live wallpaper
I wanted to use this code to get the height/width of the display
Code:
@Override
public void onCreate(SurfaceHolder surfaceHolder) {
super.onCreate(surfaceHolder);
Rect frame = getSurfaceHolder().getSurfaceFrame();
float width = frame.width();
float height = frame.height();
// By default, we don't get touch events, so enable them.
setTouchEventsEnabled(true);
}
and if you're wondering about the context of the code, just look at this sample
Unfortunately, when I run this code, the width and height return as 0, though if I put this in onVisibilityChanged, the correct values are returned, why is this and where should I put it?
Also, when I do get the display width/height, it includes the real estate behind the notification bar as well. Is there a way I can get the width/height area of everything excluding the notification bar?

windowIsFloating=true & window size

I'm developing an activity with a floating main window (e.g. windowIsFloating=true in the activity style). Unfortunately, within a floating window my layout (using fill_parent) is not expanded to the full screen size; fill_parent behaves like wrap_content instead. I suppose floating windows are not automatically sized to the regular/maximized window size.
To circumvent this problem, I use the following code to add the layout to my window:
View view = getLayoutInflater().inflate(R.layout.main, null);
setContentView(view, new LayoutParams(width, height));
This renders my layout correctly. However, how do I find out the correct width and height, taking into account decorations like the status bar? According to the documentation, floating windows automatically get the FLAG_LAYOUT_INSET_DECOR set, causing the WindowManager to report inset rectangle needed to ensure the content is not covered by screen decorations. However, I can't find any documentation on how I can retrieve this inset rectangle; does anyone know this?
I've tried many options (all called from my Activity onCreate method), but they all either return non-usefull information or the full screen size, not taking into account the status bar height:
WindowManager.LayoutParams lp = (WindowManager.LayoutParams)getWindow().getAttributes();
Rect rect = getWindow().getDecorView().getBackground().getBounds();
getWindow().getDecorView().getGlobalVisibleRect(rect);
getWindow().getDecorView().getHitRect(rect);
getWindow().getDecorView().getLocalVisibleRect(rect);
getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
I'm now using a work-around that simply substracts 38 from the height to account for the status bar, but of course that's not a real solution.
Also, does anyone know whether it is possible to hide or overlay the status bar when using a floating window? Setting windowFullScreen=false only works correctly for non-floating windows.
I believe you can set the theme in xml to remove the status bar in your app.
<activity android:name=".YourClassName" android:theme="@android:style/Theme.NoTitleBar"/>
And
<activity android:name=".YourClassName" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
From something awesome
O yea that is in the AndroidManifest.xml
From something awesome

[Q] Overlay list item when it's pressed

I want to add a layer when list item's pressed. The layer will overlap any object in list item (imageview, textbox, layout background, ...). It's exactly like Google apps (Play, Youtube,...), when you press or hold an item, you can see it. My app has some complex list items, so using background seletor is not good enough.
Thank you.
Looking at the play en youtube app, it seems like they only change the backgroundcolor and don't add an overlay.
If you have created your own row layouts and added them to the list, you can get the most outer viewgroup from this layout in your onItemClicked method.
Just change the background of this viewgroup.
Code:
onItemClicked(View v) {
[INDENT]v.setBackground(your background);[/INDENT]
}
If you do want an overlay instead of another background, you can wrap your row layout in a frame layout with an invisible overlay. Then just change the visibility in the onItemClicked method.
Code:
onItemClicked(View v) {
[INDENT]View overlay = (View) v.findViewById(R.id.overlay);
overlay.setVisibility(View.VISIBLE);[/INDENT]
}

[Q] Progress Bar Stairs

Hey @all,
i'm just getting started with developing Android Apps. Therefore i have a question, for designing my GUI. Maybe there is a possible build-in widget, but i don't have the right wording to find it (English is not my native language).
I'm looking for something like the Rating Bar, where you can select a value between 1 and 5. Instead of the stars, i'd like to have some bars (the left one is the smallest, the right one the highest). Should look like the "Stairs" within a Signal strength notification. To make it a bit more challenging i'd like to have different colors for every bar (least value is green, highest value red). Therefore i don't think that the Rating Bar with different drawings will fit my needs, because afaik i could just change the star layout, not like the first star should become a 5dp bar, the second a 15dp and so on.
Is there any build in widget i could use?
I attached a picture to show my idea.
I hope you can help me
Additional Information: I like to develop for min API 17
fighterii said:
Hey @all,
i'm just getting started with developing Android Apps. Therefore i have a question, for designing my GUI. Maybe there is a possible build-in widget, but i don't have the right wording to find it (English is not my native language).
I'm looking for something like the Rating Bar, where you can select a value between 1 and 5. Instead of the stars, i'd like to have some bars (the left one is the smallest, the right one the highest). Should look like the "Stairs" within a Signal strength notification. To make it a bit more challenging i'd like to have different colors for every bar (least value is green, highest value red). Therefore i don't think that the Rating Bar with different drawings will fit my needs, because afaik i could just change the star layout, not like the first star should become a 5dp bar, the second a 15dp and so on.
Is there any build in widget i could use?
I attached a picture to show my idea.
I hope you can help me
Additional Information: I like to develop for min API 17
Click to expand...
Click to collapse
I think your best bet would be to make pictures (drawables) to use inside of an ImageView widget. You would need to draw every possible outcome or picture that the user will have displayed to them. Then depending on what you want done, set the drawable to imageview.
Here's a very brief example (Sorry, typing from phone):
ImageView imgView = (ImageView) findViewById(R.id.my_image_view);
If (outcome1) {
imgView.setImageDrawable(R.drawable.my_rating_bar_green1);
}
Something like that should work for you.
______________________
Root it and boot it!
Current device: Sm-n900p/Sprint Note 3
ROM:AICP ROM
Service: Straight Talk
Check out my apps on Google Play

Categories

Resources