Android tv keyboard cover textfield

541 views Asked by At

Hi I am developing android tv app by using flutter, But I face some problem that keyboard will cover the textfield if the textfield are too many.I already add the SingleScrollview to the container, but seem like keyboard wont push up the textfield. Any suggestion? Thanks

Attach of mobile screenshot enter image description here

Here is my code Main.dart

 @override
  Widget build(BuildContext context) {
    return Scaffold(
        resizeToAvoidBottomInset: true,
        body: SingleChildScrollView(
          physics: ClampingScrollPhysics(),
          child: Container(
            child: ListView(
              shrinkWrap: true,
              physics: ClampingScrollPhysics(),
              children: <Widget>[
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                ),
                TextFormField(
                  decoration: InputDecoration(
                    labelText: 'Enter Text',
                  ),
                )
              ],
            ),
          ),
        ));
  }

AndroidManifest.xml

     
   <application
        android:label="mysing"
        android:banner="@drawable/banner"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustPan">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <intent-filter>
                  <action android:name="android.intent.action.MAIN"/>
                    <category  android:name="android.intent.category.LEANBACK_LAUNCHER"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>

0

There are 0 answers