Custom NavBar with adb crash on rotate - Samsung Galaxy S8 Questions and Answers

Hello,
I am using adb to customize the navbar, as seen here: https://www.xda-developers.com/add-custom-buttons-to-nav-bar-on-samsung-galaxy-s8-galaxy-s8/
It seems they add a new required button in the left side to 'pin/unpin' the navbar, to have like a constant immersive mode. Is there a way to get his name to use it int the command like we do for menu_im, back, home and recent ?
When I rotate the screen system crash because of a null exception, it say it crash on setPaddingMenuImeSidePadding in logcat but menu_ime should be there, I even try to put it in every section and still the crash, so I suppose it's coming from the new button. Is there a way to get the key name from somewhere to use it ?

Related

Putting PPC (Harrier & iMate) app on Treo 700wx Issues

Hi,
I have an application which has been running nicely on Harrier and iMate devices, well any PPC devices really because of their rectangular screen shape.
My client has gone and bought some Palm Treo 700wx devices, and they have a smaller square screen.
In the resource of my project the screens are designed to fit PPC. When it runs on the Treo the Treo automatically pops up a scroll bar to allow the whole view to be seen.
The issue is when I first go into the app I can't see the top of the screen, about 20 odd pixels heigh aren't displayed. The scroll bar still displays and I can scroll down to the bottom of the view, and when I scroll up again the top of the screen is still out of sight.
If I exit the app just by tapping on the x in the top right corner (so the app is still running, not exiting properly via my Exit button which shuts down the app), I exit the app and then when I go back into the app the screens are displayed correctly, there is no missing space at the top of the screen.
If I exit the app via my exit button and then start the app again, the top of the view is missing again.
Does anyone know why the screen isn't displayed correctly when I first enter the app, or why it should come right when reloading the view again? Has anyone else had problems with screen layout when putting PPC apps on the square Treo 700wx?
Thanks
It sounds like you have a 'refresh' problem. I haven't encountered this my self and it is really hard to diagnose when you don't even tell us what language your app is written in, but basically here is what I think happens:
When your app is launched, part of its window doesn't get properly painted (not sure why exactly).
When you click the X the app isn't closed, but minimized.
When you return to it the window is maximized and repainted. Second repaint goes correctly.
The quick solution to this would be to force a window refresh just after the app is fully started.
Sorry I forgot to add the language.. it's written in eVC++ 3.0
I'll give the refresh a go, thanks
Further Questions..
I thought that minimising and then maximising the screen fixed the problem, but only partially..
Because the screen in resource is designed for regular PPC it is bigger than the Treo 700 screen size, so the OS automatically shows a scroll bar.
The new issue I'm seeing is to do with the scroll bar. The steps I take to reproduce the issue are:
1. Go to View1, and I scroll down the view (I'm using CView not CDialog)
2. Go to View2
3. Go back to View1. When I go back to the first view the scrollbar is scrolled down in the position I left it.
4. Scroll up to top of view and some of the controls in the wrong place. Some controls I dynamically create in OnInitialUpdate, and as part of the Create() I pass in CRect to tell it where to create the control.
If I set CRect.top to say 10, it's created 10 down from the top of the visible screen. The problem is that because I've scrolled the view previously the view draws it 10 down on the visible portion of the view.
I had thought that the easiest solution would be to always reset the scroll bar to the top of the view before creating my controls, but I'm not sure how to force the OS scroll bar to the top of the view. I've tried SetScrollPos(0,0) or ScrollWindow(0, y). ScrollWindow moves the actual view up or down, but the OS scrollbar is still in the same position.
Any ideas on how to set my view window to the top and to reset the scrollbar?
Thanks again
How to refresh a view?
I have sorted the issue mentioned just above, by finding the scroll position and factoring in that when I set the value of CRect area of the controls I need to dynamically draw.
I'm now just left with the first issue, of when I first start up the app the top part of the window and scrollbar are covered by the Title/Taskbar at the top of the screen.
If I close the app via the x button and restart the app, the issue resolves itself. Or if I open up any dlg like the About screen or even display an AfxMessageBox, when I close the dialog the original screen is redrawn correctly, in the correct position and scroll bar fully shown.
I have tried calling RecalcLayout(), RefreshWindow(), UpdateWindow(), Sending WM_SIZE messages and a whole range of things, but I can't seem to get the screen refreshing correctly apart from when I open any dialog and close that dialog.
When you close a dialog what messages get sent to the previous view that force it to redraw? Does anyone have any suggestions how I can force a refresh myself?
Thanks again
Did you try InvalidateRect?
I am getting a bit rusty with MFC, since I now try to do things the hard way and use pure win 32, but this should work.
If you can't use it as a class member, call the API directly using you view GetSafeHwnd() function for window handle). Use NULL for lpRect to redraw the whole window and FALSE for bErase to prevent flickering.
Note that UpdateWindow() only triggers repaint if part of the window becomes invalid (the contents needs redrawing).
No I hadn't thought of using InvalidateRect(), so I should give it a go.
In the end I just wanted the issue fixed so opted for a quick 'n dirty solution of displaying a temp CDialog as soon as the app starts and calling EndDialog() immediately in the OnInitDialog() so the dialog disappears before you see it.
It worked and the original screen gets updated to correct size, layout and scroll bar.
Cheers.

[Q] Put device in standby from Terminal Emulator or Gscript

Hello,
I am using CyanogenMod nightlies and would like to setup my long-press home option to shut of the screen and lock the device. There is an option to have it run a script from gscript, but I can't find the right commands. I have search the internet and haven't found anything(maybe not looking for the right thing).
I have also tried some programs from the market(didn't try them all), but they have funny side effects. The programs make the arrows that allow you to hide the status bar appear but not function, and won't go away without a reboot. They even show when I'm on the home screen.
Any help, advice, or some direction to where I could find the answer would be great.
Thanks,
Rsotbiemrptson

[Q] Navigation Bar not working in Portrait working in Landscape in Nexus 4

My Nexus 4 has Stock ROM Android 4.3 & the Navigation bar at the bottom does not respond to touch in Portrait position but works in Landscape position for applications where I can use the Landscape mode. In the Landscape mode the screen rotates the position of the Navigation bar.
I have through the developer option selected the Show Touches option which shows me the exact touch position on screen as a blob. In the portrait position I can see the touch points on the Navigation bar the home screen works for Google Now but the back & task do not work however I can see from the Show touch it registers the touch but no execution of the command happens. The same Navigation bar in Landscape mode works perfectly as required. These developments are after the OTA 4.3 upgrade. Can someone help me to either remove the navigation bar in the Stock ROM Android 4.3 as now I have an application from Google store called Button Saviour (Non Root) working perfectly. I have also observed that the due to the Show Touch option activation it generates sometimes on the navigation bar area on the extreme left a clear Show touch blob where as there is no one touching the screen. This Show touch blob sometimes rapidly oscillates horizontally in the Navigation bar area & which ever icons it crosses it automatically triggers them as well randomly. On touching the screen in the Navigation Bar at that time does not make the back or task button work but without touching I can the Show touch blob while oscillating managing to make it work while crossing over the respective button icons.
So the hardware does not seem to be the issue but some bug in the new 4.3 which is triggering this weird behaviour. I use the Nexus 4 mostly in Portrait mode hence it is frustrating to now suddenly not have the Navigation bar functional the way it was suppose to work. Can some one help & guide me on what to do to resolve this problem.
The softkeys are enabled within the framework.
Sent from my Nexus 4 using Tapatalk 4
Help
manojsap said:
My Nexus 4 has Stock ROM Android 4.3 & the Navigation bar at the bottom does not respond to touch in Portrait position but works in Landscape position for applications where I can use the Landscape mode. In the Landscape mode the screen rotates the position of the Navigation bar.
I have through the developer option selected the Show Touches option which shows me the exact touch position on screen as a blob. In the portrait position I can see the touch points on the Navigation bar the home screen works for Google Now but the back & task do not work however I can see from the Show touch it registers the touch but no execution of the command happens. The same Navigation bar in Landscape mode works perfectly as required. These developments are after the OTA 4.3 upgrade. Can someone help me to either remove the navigation bar in the Stock ROM Android 4.3 as now I have an application from Google store called Button Saviour (Non Root) working perfectly. I have also observed that the due to the Show Touch option activation it generates sometimes on the navigation bar area on the extreme left a clear Show touch blob where as there is no one touching the screen. This Show touch blob sometimes rapidly oscillates horizontally in the Navigation bar area & which ever icons it crosses it automatically triggers them as well randomly. On touching the screen in the Navigation Bar at that time does not make the back or task button work but without touching I can the Show touch blob while oscillating managing to make it work while crossing over the respective button icons.
So the hardware does not seem to be the issue but some bug in the new 4.3 which is triggering this weird behaviour. I use the Nexus 4 mostly in Portrait mode hence it is frustrating to now suddenly not have the Navigation bar functional the way it was suppose to work. Can some one help & guide me on what to do to resolve this problem.
Click to expand...
Click to collapse
same issue here even i try a factory reset
I flash the stock rom again and no clue of what to do
The exact same issue here, started behaving quirky since 4.3 and went bat**** crazy after the update second 4.3 ota (1.8mb patch google released recently). i used developer options to show the on screen touch blobs as well and it registers touches in the nav bar area, it just will not work in portriat (or rather that section of the screen) It is extremely frustrating.
I even went as far as to use adb and fastboot to restore my phone to stock 4.3 which would remove all files and place a stock 4.3 directly from dev.google but still It doesn't work.
The same issue
Im having this exact issue just a few days after i install a new update i hope that its a software issue :crying: and if is not warranty will cover it?
Navigation Bar issue
Same problem here , wont respond on portrait mode.
I did try to downgrade my android version to 4.2.2 (from 4.3) after the factory reset did not work, that did not work either.
Any ideas? could use some help
I have the same problem, I tried to restore the 4.3, the 4.2, but the problem remains, I also tried the cyanogenmod and 4.4, but it still does not work the navbar in portrait mode ..
No one knows a solution to the problem? You may have a hardware problem? Who takes care of the navbar?
Having the same issue here. Works in Landscape but not portrait. It went spastic this morning randomnly opening the clock and pullin the bar down itself. Show touches showed it registering touches all around the nav bar then suddenly it stopped. I cant use the bar now at all in portrait but the random touches are gone. I downloaded a touch detector and it shows all the way up to where the nav bar would be then deadzone, but fine in landscape again
anyone know a solution to the problem? I tried to put the last KRT16S factory image, but the problem is always the same ...
sorschumi said:
anyone know a solution to the problem? I tried to put the last KRT16S factory image, but the problem is always the same ...
Click to expand...
Click to collapse
Before update to 4.4, I installed purity rom, and in purity system settings there was option to change navigation bar height. Default height is 48dp, but you can change to 52dp and the buttons working. Not ideal solution, sometimes you must to hit button few times, but it's working!
But, after I update my N4 to 4.4 kitkat, and install purity rom for 4.4, there is no option to set button height to 52dp (max heigth is 48dp-default height) I hope so that purity rom will be updated and return option to set to 52dp.
Same issue here
Tried lot of things still not working .........
pls someone find the solution.......
skycoresaunish said:
Tried lot of things still not working .........
pls someone find the solution.......
Click to expand...
Click to collapse
I think it's a hardware problem. Mine just went bad as well.
I have this problem now, too. Google now NAVRING still works to open Google Now from the middle nav button, which is why I do not understand why they nav bars do not work at seemingly the bottom of the screen. It just seems like that part of the screen has died, though some times it randomly works....... what the hell is this?
Huawei ascend mate navbar problem
I have same problem. And not only that my landscape control also got messed up After factory reset.
Also when I try to scroll down the web page in landscape mode it dosent work on the same area. So does this mean screen is screen is not registering my touch.
Some times the middle button start acting funny. It operates by itself even the internet is off. Like virus or some thing I did checked with antivirus nothing found. After activating show touch option it is shows Google shortcut is always pressed.
Dont know how to fix. Dont know the reason pls. Help. Xda.
Do you use dt2w? For me, after enabling that feature this would happen after a while. The borders of the screen would become unresponsive. I disabled dt2w, rebooted and it was fine again.
Sent from my Nexus 4 using XDA Free mobile app
Hi to everyone!
I have the same problem since some days with the nav bar on stock 4.4.2. Factory reset + rom flash via fastboot + CM 11 innstallation did not help at all. I'll bring my Nexus 4 today back to the retailer for reparation / replacing.
I'll inform you guys about the report of service center but it can take up to 45 days.
Thanks. This works for me
haris0032 said:
Before update to 4.4, I installed purity rom, and in purity system settings there was option to change navigation bar height. Default height is 48dp, but you can change to 52dp and the buttons working. Not ideal solution, sometimes you must to hit button few times, but it's working!
But, after I update my N4 to 4.4 kitkat, and install purity rom for 4.4, there is no option to set button height to 52dp (max heigth is 48dp-default height) I hope so that purity rom will be updated and return option to set to 52dp.
Click to expand...
Click to collapse
Hi, I was facing the same issue on my mako. It just started without any notice. Being a flashaholic I thought it could be due to something I installed. Tried a lot of differnt ROMS including stock but no luck. Read somewhere about the "Show touch" function in the developer options and found that almost 7.5mm of the bottom of screen was not responding to touch. I then installed the stock 4.4.3 ROM, rooted it and installed gravity box. In Gravity I changed the navigation bar height to 120% and selected "keep at bottom" for landscape. I am now able to use the phone. I wish some custom ROMS start implementing 52dp height option so we could use these directly. I tried using gravity with Mahdi ROM but there is some conflict and I cant see the recents button. Also, the NB reverts to original and it needs to be enabled again manually
But thanks anyways. I dont want to buy a new phone for the next 6 months and this will work well for me.
Cheers

Problems with gestures

Hi everybody!
I'd like to know your opinion on the implemented gestures on our Note 4? Do they work the way you want them to?
I myself do have the following problems from time to time:
1) Pop up window gesture -> pulling down the notification bar instead
2) Shrink the whole screen size -> activating something different
3) Activating multi window side bar by holding down the back button -> some apps seem to react as if I used the back button
Many greetings
pop-up window never fails for me.
in fact, I regularly trigger it by accident when I try to access the tab slide or address bar in Atlas(web browser)
and for multi-window I use the recent app screen, or more often just floating windows.
Interesting, so it's the other way round for you as far as popup windows are concerned.
Recent app screen seems to be the easiest way, but unfortunately the apps have to be opened already to be available.

Samsung Galaxy A5(2014) navigation bar that works with all apps?

Hi all, this is the Korean Olleh version of A5(2014) SM-A500K - Original english android 6.0.1
https://www.gsmarena.com/samsung_galaxy_a5-6761.php
This is my GF's phone and she don't want to change it to something else(believe me I tried), the Home button has not worked for long time. The screen broke and we got a replacement, but after the repair the Recent button also don't work, Back button works.
She doesn't want it opened again(not easy on this model, often the screen breaks again) so I have been looking for an Navigation/Gesture app that could work in the background without problems.
I tried Softkeys and Navigation Gestures from Play store but almost all Pre-installed Apps on the phone complain about "Overlay detected" and then says I need to grant permission to the app complaining, but trying that doesn't work because it wants the Overlay to be switched OFF first - switching OFF the overlay(Softkeys or Navigation Gestures) doesn't do it though, only uninstalling them do. Then Granting the Permissons an re-installing Softkeys or Navigation Gestures.
I have tried to give the 2 navigation apps(Softkeys and Navigation Gestures) all the permissions they need, but it didn't help much. As soon as the other Apps get updated, we are back to square one "Overlay Detected".
So I'm asking here if any of you can help getting some navigation buttons working. No need for something fancy, just Recent + Home + Back, that sits in the bottom of the screen and moves App screen up so it don't interfer with the App's own buttons(like browser buttons, typing on keyboard, etc.).
Thank you in advance
Jan

Categories

Resources