Android app is brighten up after keyboard is closed - android

This might be an emulator only issue, no reproduction on physical devices so far
We have a Xamarin.Forms App for Android and iOS. The app supports dark and light theme and follows. Most of the colors are defined in styles using the AppThemeBinding of Xamarin.Forms.
We use Material Renderers and Xamarin.Forms 5.0.0.2337 (i.e. most current).
We use the Switch control for some settings. Cause there is a dark mode bug in Xamarin renderer for switch, the Android main style parent was changed from Theme.AppCompat.Light.DarkActionBar to Theme.AppCompat.DayNight.DarkActionBar as proposed as workaround.
Now I observe this issue in Android Emulators (cannot test on real device at the moment):
click an Entry or Editor, soft keyboard opens
make some keyboard input
close keyboard either by "finish" button or "back" button
the whole app (page, controls etc.) is rendered brighter now. example: page background was #121212 before keyboard was shown and is #2f2f2f after it was shown. sometimes it needs 2 or 3 tries to reproduce
by clicking in another entry, the app may be rendered correct again or may be not.
The issue leaves helpless cause I do not understand what is going on.

Related

Android 5 changes operation of user interface buttons. Is there obvious way to recover Kitkat fuctional features?

Quick question, Android related..
How do I display a working "THREE VERTICAL-DOTS" floating action button, to trigger same functionality as Android menu button that worked on Kitkat (Android-4), and all previous Android versions?
Details:
I have an Android app that uses Java Native Interface. It worked fine in Kitkat (Android 4.x series), but in Android 5.x, the menu-options button (three vertical dots) no longer responds. Originally, in Kitkat (Android 4.x), the standard Android menu button brought up the applications configuration menus. Now, in Android-5, the Menu button has been replaced with a "Recent Apps" button (this was a very poor design change - probably the worst basic re-design of a working interface I have seen in 30 years... ). Is there an easy way to use a "floating action button" or something like that, to restore functionality of the standard Android "Menu" button?
On Samsung tablets, one can tweak: "Settings / Accessibility / Dexterity and interaction / Assistant menu " to "On", and then a floating-action-button appears, which then has the three vertical-dots as one of it's optional push-buttons, if invoked. Pressing that three vertical-dots button (on the Samsung FAB (floating-action-button)), triggers the old Kitkat/Android4 menu, and at least Samsung users can alter set my app config parameters.
In my app's AndroidManifest.xml file, I have minSdkVersion="8" and the targetSDKVersion="8". I have tried setting the targetSDKVersion to higher levels, which results in a non-functional floating action button, showing three vertical dots, appearing on the screen.
There must be an obvious way to fix this damage that the Android "Material Girl Design" people did to Android Kitkat(and previous Android vers.) Android Menu Button. I've detailed a work-around for my user-base at this point, and released an new app version which offers details on the work-around - at least for Samsung phone and tablet users, but an in-app button really should just appear to allow the main app configuration menu to be triggered.
I have looked at this:
http://developer.android.com/training/appbar/setting-up.html#utility
Don't want an "Action Bar". My app is a DOS-emulator, and needs all the screen space.
I have also reviewed:
Android Options Menu in Fragment
This gets closer, but rather than trial-and-error, I would like to just jump to the solution, if possible. There must be some code or a feature selection that just fixes the little action button that appears (but does not work), when I set the targetSDKVersion="12" (or higher values), in the AndroidManifest.xml file.
My app uses SDL (Simple DirectMedia Layer) vers. 1.2 and 1.3 to control and draw the screen.
I will post the answer here when I find it. I know it is possible, because Samsung is already doing this, within its "Accessibility/ Dexterity.. /Assistant Menu" feature.

PhoneGap in Android: Inputs do not move with soft keyboard

I am helping to style a Banking mobile app, and the company is using PhoneGap to build across all platforms. I am using a Nexus 4 (android) to test the app, and have noticed that when input fields are tapped, the screen does not scroll up with the soft keyboard - many input fields get lost behind the keyboard.
I can NOT have the addressbar at the top of the screen show, so the one fix I found that said to change the xml file fullscreen preference won't work.
How can this be fixed? I have not been able to test on other devices yet.
The plugin suggested in the comments worked.

Android: Navigation using Tab key doesn't work properly on input boxes

For large size screens, the default android keyboard automatically displays Tab keys. I have a phonegap application which contains several input boxes on one page. When I try to navigate between input boxes using tab key on soft-keyboard, nothing happens.
I also tried to open gmail login page on browser and Tab key didn't shift focus there as well. However, I noticed that only in case of input boxes, I had to use shift+tab key to navigate to next input box. For navigating between other elements, just pressing tab key was sufficient. Is this the specific behavior implemented by android & is there any particular reason for it? I am using nexus 10 but found same behavior on emulator too.
I think this is a problem with Nexus 10 in particular, as I observe the same thing and here is another user that reports the same (https://stackoverflow.com/questions/16651669/nexus-10-keyboard-tab-key-not-working).
Tab key does work on native Android apps as it is supposed to, but not on hybrid apps which are basically wrapped in WebView. I think this is an oversight from the Android team. You can always install a Swipe or Hackers keyboard from the Play Store where the Tab key does the job.
This seems to be an issue specific to Android Tablet devices. A workaround I found was to change the keyboard mode to either split or floating. Also I noticed flipping the device around to landscape view allows the input elements to behave correctly.
The original issue is related to the viewport size change that happens when any input receives focus which is caused by this so-called soft keyboard. Android seems to handle the rendering of a soft keyboard differently from other manufacturers.

trigger.io Android webview app - grey background appearing after keyboard closes or orientation change

I'm building an html5 wrapped iOS / Android app with Trigger.io.
I have a problem on Android with a grey background appearing on the screen in some occasions after the virtual keyboard has closed, or after the phone has changed orientation.
Example screenshots are shown below.
The grey background is after the end of my app's page. Sometimes it is visible for a split second, other times it stays visible until you make an action such as scroll the page, bring the keyboard back, change orientation.
It's pretty jarring to look at.
I'd ideally like to stop the issue occurring, but as a temporary fix I'd be happy with being able to set the grey to my own background colour to make it less noticeable.
This looks like the HTML's not being re-drawn when the keyboard disappears... does it clear up if you do something to trigger a render?
Are you using a framework to handle the UI here? Something that might be trying to do something clever based on the visible viewport?
From what I can tell, the root of the issue is in the webview not re-drawing correctly, or something in your JavaScript failing to respond to the viewport changing size.
You could try running the app on the "web" target (instead of Android) then opening it in your phone's browser: if you can get far enough into the app to create the same effect it would help isolate the problem to the webview rendering or your JS.
I had a very similar issue in my project, in my case on Android 2.3.5 but not on Android 4.*. The cause in my case was not setting a window soft input mode for the associated activity in the manifest:
android:windowSoftInputMode="adjustPan"
Instead, the window was resizing when the keyboard appeared but apparently not resizing once more when the keyboard disappeared.
More details can be found here.
I almost went crazy with the same issue. I finally found out that this largely depends on the device you are using. I had a similar problem : Fixed elements (HTML) break after android keyboard dissapears?
And I am also using trigger.io. This doesn't happen with some devices. Could be the particular OS in android or could just be the way the specific device handles the memory latency.
I have looked for this but I go with #jamesbrady in that the HTML doesn't redraw. The problem in trigger is that you cannot edit the
android:windowSoftInputMode="adjustPan"
because the activity tag in the AndroidManifest.xml updates on each run. You would need to build a private module for that.

My Android AIR app shows white screen when TextInput loses focus

That's pretty much sums up the question. I have an AIR Mobile Flex App project in FlashDevelop that is using views to show content. Everything works fine, I can add a TextInput or TextArea to the stage, select it (Soft Keyboard shows up then), type some text. But when I press enter or change focus to the other element to hide the keyboard, the screen turns completely white except for the text that has been entered in the field.
Now it becomes interesting. If I rotate my tablet to force the screen to adjust, the content becomes again visible. Sometimes it doesn't even show a white screen, but rather a pitch black one that shows a blank preview when looking at the list of the running apps.
I cannot grasp the logic besides this behavior. It seems that somehow screen just doesn't want to redraw.
UPD:
AIR verison: 3.1
Tested on HYUNDAI SmartPad H-SP701G, Android 4.0.4
UPD2:
Tested on SANSUI ETAB 801VP, still getting the same effect.
The problem is in your application configuration XML.
Check your tag.
Entering value of "auto" or "cpu" should fix the problem.
<renderMode>auto</renderMode>
In my case I set direct and this was the cause of the issue. Using direct render mode caused the application to not work on HTC Evo 3D and Samsung galaxy s3. It did work on HTC Desire though.

Categories

Resources