7

I have the same problem described in this question, but on Trigger.io. Unfortunately, the solution requires to edit AndroidManifest.xml, which appears to be impossible in Trigger.io

In some of my app views, the Android keyboard is overlapping some input fields, making it difficult to input values.

Here is a couple of screenshots showing the problem. The "Senha" field is overlapped by the android keyboard, and the view doesn't scroll to it, even after the user inputs a value.

I tried the trigger.io email support, but they asked me to search here for an answer...

screenshot 1 screenshot 2

fjsj
  • 10,501
  • 9
  • 36
  • 54
  • Sorry, but the only way to alter how the keyboard pans or resizes the app is via the manifest. If you can't edit that, you're stuck. – Gabe Sechan May 28 '14 at 14:13
  • please paste manifest and xml file for this – Akarsh M May 28 '14 at 14:34
  • @GabeSechan Shouldn't `getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);` during `onCreate()` work? – matiash May 28 '14 at 14:35
  • @matiash Haven't tried it, I suspect it would- so long as you call it before setting the content view (various other window parameters only set correctly if done before setting the view for the activity, I assume the same here). – Gabe Sechan May 28 '14 at 14:55
  • Been experiencing this bug (Bug 5497) across many different device types where Android ignores (or fails, not sure) using the keyboard settings with regards to layout resizing/panning. Thankfully someone created a helper class that seems to work across all devices without issue and is a single-line implementation: https://github.com/madebycm/AndroidBug5497Workaround/blob/master/AndroidBug5497Workaround.java – Cruceo May 28 '14 at 16:39
  • Basically the solution is to disable fullscreen and set adjustResize. See the accepted answer for details on how to do this on Trigger.io – fjsj Jun 17 '14 at 04:51

2 Answers2

3

If you want to make changes to the AndroidManifest.xml your best bet would be to create a native module for your apps:

https://trigger.io/docs/current/api/native_modules/index.html

Specifically, you can make modifications to the manifest by creating a custom build step:

https://trigger.io/docs/current/api/native_modules/native_build_steps.html

i.e. something like:

[
    {
        "do": {
            "android_add_to_activity_manifest_attributes": {
                "attributes": {
                    "android:windowSoftInputMode": "adjustResize"
                }
            }
        }
    }
]
  • 1
    `adjustResize` worked for me. But additional to this, I had to disable fullscreen (of display module) on Android. Thanks! – fjsj Jun 17 '14 at 04:50
  • Perhaps one of you could release a community module for this? That will save the rest of us from having to build and maintain native modules... – samcheng Oct 08 '14 at 23:58
1

This worked for me...

First add this

final bottom = MediaQuery.of(context).viewInsets.bottom;

Then use a SingleChildScrollView() to wrap around the main widget (whatever you're using, e.g. Column, ListView, etc) like this...

You need "reverse: true"

Widget build{
return Scaffold(
body: SingleChildScrollView(
reverse: true;
child: Container(...

You also need these two lines of code for the Scaffold as well..

return Scaffold(
resizeToAvoidBottomInset: false,
resizeToAvoidBottomPadding: false,
body: SingleChildScrollView(...

and finally, reference the 'bottom' for your EdgeInsets..

body: SingleChildScrollView(
reverse: true,
child: Padding(
padding: EdgeInsets.only(bottom: bottom),
child: Container(...
Chris
  • 670
  • 3
  • 18