yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Google have changed things again, haven't they? Sigh..

It's worth looking at your "navigation_layout.xml". That seems to be the file we're after..

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
<FrameLayout android:id="@id/nav_buttons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/ends_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/center_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</FrameLayout>
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="horizontal" />
</FrameLayout>
[Sony Cross-Device Development Themes and Apps] whalesplaho:
Thought as much too but doesnt has much so look useless to me.... Its hard brov!
[Sony Cross-Device Development Themes and Apps] Ticklefish:
You just need to work out what those parts of the code actually do. You have an "ends_group" and a "center_group" LinearLayout inside your "nav_buttons" Layout. It's a reasonable assumption that these are what displays the icons you see.

So you need to know which Layout is responsible for what. A good way to do that is to set a background colour and see what difference it makes to the bar.

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
<FrameLayout android:id="@id/nav_buttons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout [COLOR=red]android:background="#ccff0000"[/COLOR] android:orientation="horizontal" android:id="@id/ends_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<LinearLayout [COLOR=red]android:background="#cc00ff00"[/COLOR] android:gravity="center" android:orientation="horizontal" android:id="@id/center_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</FrameLayout>
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="horizontal" />
</FrameLayout>

This will make the ends_group Layout translucent red and the center_group Layout translucent green. If we know where those are, we'll have a better idea of where we need to put a line of code to add a menu softkey.
[Sony Cross-Device Development Themes and Apps] whalesplaho:
after trying tha code, i got dis budddy.... seems nothing happens to tha nav bar!
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Looks like something's happened to it to me...it's green!

That means, if your nav bar isn't normally that colour, that you're looking at the center_group Layout. The first thing I'd try is putting that Layout inside another LinearLayout with a line of code to make the menu softkey. Something like:

<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" >
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/center_group" android:clipChildren="false" android:layout_width="0.0dip" android:layout_weight="1" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="end" android:layout_width="@dimen/navigation_extra_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:scaleType="centerInside" systemui:keyCode="82" />
</LinearLayout>

Of course this is assuming your APK has the smali for the KeyButtonView, the preset dimension for navigation_extra_key_width and the drawable for ic_sysbar_menu. So you might need to do a bit of adjusting if it doesn't.

This should work, in theory. Whether it looks good is a different matter. Give it a try and let me know what happens!
[Sony Cross-Device Development Themes and Apps] whalesplaho:
SystemUI FC..... Everything was in place..

smali/com/android/systemui/statusbar/policy/keybuttonview.smali

Navigation extra key width in res/values/dimens.xml

Ic sysbar menu.png is present in drawable-xxhdpi.
[Sony Cross-Device Development Themes and Apps] Alvian_P:
when screen landscape can't scroll navbar
[Sony Cross-Device Development Themes and Apps] levone1:
Not sure, but I think it's the second frame layout...
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Do you have a logcat?

This mod is for the portrait nav bar. To do it with the landscape bar, you need to use a normal ScrollView and put it in the second Layout.
[Sony Cross-Device Development Themes and Apps] whalesplaho:
systemui was fcing & couldnt get a logcat.... let me try again!
[Sony Cross-Device Development Themes and Apps] whalesplaho:
[MENTION=4315551]Ticklefish[/MENTION] was able to get a logcat... hope it helps!
[Sony Cross-Device Development Themes and Apps] levone1:
This worked for me...

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
<HorizontalScrollView android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content">
<FrameLayout android:id="@id/nav_buttons" android:layout_width="720px" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/ends_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/center_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</FrameLayout>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/ModDown" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/downwhite" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="4.0dip" systemui:keyCode="20" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/ModLeft" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/leftwhite" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="4.0dip" systemui:keyCode="21" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/ModRight" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/rightwhite" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="4.0dip" systemui:keyCode="22" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/ModUp" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/upwhite" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="4.0dip" systemui:keyCode="19" />
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="horizontal" />
</LinearLayout>
</HorizontalScrollView>
</FrameLayout>

Also, you might be interested in this - https://xdaforums.com/showpost.php?p=71370001&postcount=75
[Sony Cross-Device Development Themes and Apps] whalesplaho:
Gonna try tha mod now and seee....:highfive::good::good:
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Thank you for this. I haven't been online much lately. My life away from the keyboard has turned a little unpleasant..
[Sony Cross-Device Development Themes and Apps] levone1:
Sorry to hear that. Hang in there and keep your priorities straight... Thanks for your work.
[Sony Cross-Device Development Themes and Apps] whalesplaho:
Yhu av always been amazing and awesome buddy.... Personal life first den yhu can update tha thread later! Thank yhu always!

[MENTION=6283426]levone1[/MENTION] thanks for yur post.... I have menu key now but setting up tha nav tuner is cunny but i got and i added a code to navigation_layout.xml....
[Sony Cross-Device Development Themes and Apps] :
It makes a lot of accidental presses when I scroll through,for example it turns on music since it accidentaly hits the music button.

How can I fix this?

I am running Sony COncept ROM on a Sony Xperia Z3 Compact.
[Sony Cross-Device Development Themes and Apps] levone1:
Good question. I noticed the same thing with dpad keys, but not such a big deal, since you can just move back... I have a feeling it's in small somewhere, to add long-press functionality, or something. I'll look into it and see what I can figure out. Maybe [MENTION=4433143]venkat kamesh[/MENTION] can help...
[Sony Cross-Device Development Themes and Apps] levone1:
Only idea I can come up with is to change the length of time you press a key before it responds and give yourself a half second or so to touch the key so you can scroll. I think I found out that it is controlled by keybuttonview smali file in SystemUI/smali/com/android/systemui/statusbar/policy, and the function is called 'downtime'. Problem is I don't know smali, and not sure what to change. I've dabbled a little, and I have the sense by looking at the file that the method is not there, but would have to be added, which is way over my head. Seems like it used to be there in earlier versions, called 'setduration', (http://rootzwiki.com/topic/16728-how-to-random-mods-for-the-do-it-yourself-er/), but I don't have it. Maybe someone out there can help...
[Sony Cross-Device Development Themes and Apps] 04_ryan:
Great Work

It looks great and I want to try it, I was thinking if it would work if I just replaced the .xml file.

If yes, then please upload it. I can open "navigation_bar.xml", I can see it as a text, but I can't edit it.

Using Xperia SP with Stryflex MM Rom.

Thank You for great work, I hope you see it :)
[Sony Cross-Device Development Themes and Apps] renzetti.s:
Have you decompiled?

With what trying to open?

Inviato dal mio LG-H850 utilizzando Tapatalk
[Sony Cross-Device Development Themes and Apps] kin201303:
thank you

Ticklefish

work my note5 NN7.0:good:
[Sony Cross-Device Development Themes and Apps] kumbangdesa:
hi [MENTION=5262778]kin201303[/MENTION] .. Is there any different guide to make it work for Note 5?.. or just follow the guide?.. thanks
[Sony Cross-Device Development Themes and Apps] kumbangdesa:
Not succeed.. Can you please help me sir?..

I attach the log.. :(
[Sony Cross-Device Development Themes and Apps] kin201303:
i haven't add dimen/navigation_key_outer_margin

layout_marginEnd' with value '@dimen/navigation_key_outer_margin'

this is Ticklefish code

<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" android:layout_marginEnd="@dimen/navigation_key_outer_margin" />

you fllow my code

<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/CocoyayaHome" android:layout_width="60.0dip" android:layout_height="35.0dip" android:src="@drawable/cocoyaya_home" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="25.0dip" systemui:keyCode="3" />

thank you Ticklefish again
[Sony Cross-Device Development Themes and Apps] kumbangdesa:
Thanks sir.. I will making one more try.. miss the value actually.. :D
[Sony Cross-Device Development Themes and Apps] kin201303:
go to this forum

https://xdaforums.com/note5/themes-apps/s8-nav-bar-keys-t3583376

Here is the s8 on screen buttons with automatic colour changing(see screenshots)
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Always a pleasure. :)

I'm hoping to update this mod soon. I've got plans to make it work a bit better for people.

Watch this space!
[Sony Cross-Device Development Themes and Apps] levone1:
I just hit my first failure with this mod - Omni 7.1.2 on Z3c. I've used it successfully on at least 5 other rooms, but can't figure out what's going on. I guess it's just Omni code or something... Any ideas? I modded navigation layout xml identical to what works perfectly on my Z1c rims, and it compiles fine but systemui fc's on boot...
[Sony Cross-Device Development Themes and Apps] levone1:
Just saw your post here... I'm guessing that has something to do with it... But - if all these things weren't present, would it still recompile OK? I'll keep messing around.
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Can you share your XML code please?
[Sony Cross-Device Development Themes and Apps] levone1:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
<HorizontalScrollView android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content">
<FrameLayout android:id="@id/nav_buttons" android:layout_width="720px" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/ends_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/center_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</FrameLayout>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/ModDown" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/downwhite" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="4.0dip" systemui:keyCode="20" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/ModLeft" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/leftwhite" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="4.0dip" systemui:keyCode="21" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/ModRight" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/rightwhite" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="4.0dip" systemui:keyCode="22" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/ModUp" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/upwhite" android:scaleType="center" android:layout_weight="0.0" android:layout_marginEnd="4.0dip" systemui:keyCode="19" />
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="horizontal" />
</LinearLayout>
</HorizontalScrollView>
</FrameLayout>

I'm pretty sure it's identical to what I posted here - https://xdaforums.com/showpost.php?p=71428657&postcount=115 - which worked fine on that rom...
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Sorry, I meant could you share the original XML please? :)
[Sony Cross-Device Development Themes and Apps] levone1:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
<FrameLayout android:id="@id/nav_buttons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/ends_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/center_group" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</FrameLayout>
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="horizontal" />
</FrameLayout>
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Interesting. I wonder what the end_group and center_group are all about..

There's nothing obvious I can see that could give us a problem. I suggest doing this mod in stages. Put the scrollview in first and see if your APK runs. If it does, you can look at adding another part of the mod and seeing what happens.

If it doesn't, we know that's where we need to look.
[Sony Cross-Device Development Themes and Apps] leo31:
how to add my own custom navigation shortcut?

im bad with decompile things
[Sony Cross-Device Development Themes and Apps] levone1:
I think I figured out that '720px' is the problem. I tried changing nothing but that and I got fc. On a hunch, I tried it with '720dip', but the same...
[Sony Cross-Device Development Themes and Apps] Ticklefish:
What do you want a shortcut to?

Try changing it to "wrap_content"? Or "fill_parent" maybe?
[Sony Cross-Device Development Themes and Apps] levone1:
So I tried several more times, and it seems that any changes will cause systemui fc. I tried wrap_content, fill_parent, and adding just scroll view, etc. Somehow there's some kind of clash. I tried changing values in other navigation bar xmls to be consistent, (like if I mod 'id/navbar buttons' to '720px' in Navigation_Layout xml, then I would change the same line in Navigation_Layout_rot90, [or whatever it's called]). I'm wondering if there's something coded into this rom, either in framework or in smali, that trips when changing values?... Maybe I'll reach out to Omni team.

Anyone else tried this mod on an Omni N rom?
[Sony Cross-Device Development Themes and Apps] thereassaad:
U saying its fc only , its like u pay a fish in the sea , come on man how we can help u without logcat to see why it is fc ,
[Sony Cross-Device Development Themes and Apps] levone1:
Which rom? I have used this mod several times with no problem, but can't get it to work with Omni 7.1.2...

---------- Post added at 08:53 AM ---------- Previous post was at 08:51 AM ----------

Didn't realize that you posted - I'll post a log, if you're interested. I wasn't necessarily trying to put it on anyone else to try to figure it out, just wondering if anyone else has tried it on Omni...
[Sony Cross-Device Development Themes and Apps] leo31:
i'd like to make it able to pick my own custom shortcuts. play/pause , rewind, forward music player function. lot of shortcuts that i need for real :silly:

but i prefer to have those music buttons, flashlight shortcut, expanded screen shortcut, and screen rotation shortcut. i know i can easily toggling it from quicksetting panel, but i just want to make it more faster without need to pull my status bar first.

really sorry for my bad and poor english, but i hope u still can understand it :good::laugh:
[Sony Cross-Device Development Themes and Apps] Ticklefish:
For a lot of custom shortcuts, like the ones you mentioned, you can find keycodes on the Google page I linked to in the OP.

The quicksettings are a different matter. For that you'll need to do some serious smali editing as you'll have to make the quicksettings yourself. Sadly, I'm not a smali expert so I can't really help with that.
[OnePlus 3 Questions & Answers] deecept:
SOLVED! See my last post on How-To

So, I can't access fastboot. At all. I've tried the following:

Power+Up - Nothing

Boot to fastboot from stock Recovery - Nothing

Boot to fastboot from OS (Advanced power menu) - Nothing

Boot to fastboot from All in One Tool - Nothing

Tried from 3.2.8, and 3.2.7, same result. I have an unlocked bootloader, but that shouldn't matter. And I can't lock it either, since I have no fastboot access.

I can access stock recovery, but have no way to install TWRP.

Please help!
[OnePlus 3 Questions & Answers] Deleted member 6155102:
Are u rooted?
[OnePlus 3 Questions & Answers] deecept:
Was, but with a stock restore I'm fairly sure the root is gone.
[OnePlus 3 Questions & Answers] Deleted member 6155102:
You can sideload zips with stock recovery

---------- Post added at 12:44 PM ---------- Previous post was at 12:43 PM ----------

U can try flashing stock again after a backup
[OnePlus 3 Questions & Answers] deecept:
I don't care about data here, so I have tried reflashing stock several times. Both 3.2.7 and 3.2.8, but still refuses to boot into bootloader so I can use fastboot.

Sideload is used to flash stock zip. It still refuses to boot into bootloader mode.
[OnePlus 3 Questions & Answers] Deleted member 6155102:
Sorry this as far as I know and can help hope u find a solution soon:svetius:
[OnePlus 3 Questions & Answers] ihuman007:
Sideload oxygen 3.2.4. The newer ones have updated firmware. once ur in 3.2.4 then try to boot into fastboot.. you should be able to
[OnePlus 3 Questions & Answers] deecept:
Thanks man .. but no go. Still won't boot into fastboot from any of the ways possible.

I'm running out of things to try here! Trying to OTA update from 3.2.4 to 3.2.7 now, see if that helps.
[OnePlus 3 Questions & Answers] AFschizoid:
Try adb reboot bootloader?
[OnePlus 3 Questions & Answers] deecept:
I did notice something weird. Whenever I'm in stock recovery, and ask to boot to Fastboot, the phone vibrates twice. It seems it's trying to boot into fastboot/bootloader, but fails, and then reboots (second vibration) into the "this phone can't be trusted" image.

Unsure what that means, other than something for sure is corrupt. Any and all help is greatly appreciated!
[OnePlus 3 Questions & Answers] deecept:
Tried, does nothing :( Same as any other option to boot into bootloader. Thanks tho
[OnePlus 3 Questions & Answers] AFschizoid:
Ok turn it off, hold volume up, and plug it in to the computer and tell me if it shows anything in device manager