在Visual Studio工具覆盖windowSoftInputMode preference为Apache科尔多瓦config.xml文件科尔、多瓦、文件、工具

2023-09-06 07:24:28 作者:归栀°

我面对其中Android的软键盘出现在页面上的最后的EditText领域的问题。建议的解决方法包括更改windowSoftInputMode,所以我增加了以下preference在config.xml文件:

I'm facing an issue in which the Android soft keyboard is appearing over the last edittext field on the page. Suggested solutions include changing the windowSoftInputMode, so I added the following preference in the config.xml file:

<preference name="android-windowSoftInputMode" value="adjustResize|stateHidden" />

不过,我做我的构建后,在发布文件夹中的文件AndroidManifest.cordova.xml总是有adjustResize一windowSoftInputMode,因此当我运行的应用程序没有什么变化。

However, after I do my build, the AndroidManifest.cordova.xml file in the release folder always has a windowSoftInputMode of "adjustResize" and thus nothing changes when I run the app.

<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="CordovaApp" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
        <intent-filter android:label="@string/launcher_name">
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

有谁知道,如果这个设置可以被覆盖,如果是这样,有什么机制是这样做?我使用Visual Studio(2013更新4)工具为Apache科尔多瓦CTP3。

Does anyone know if this setting can be overridden and if so, what the mechanism is for doing so? I'm using Visual Studio (2013 Update 4) Tools for Apache Cordova CTP3.

推荐答案

我已经在过去类似的问题,这是我如何解决它。

I've had a similar issues in the past, here's how i solved it.

创建一个自定义的的Andr​​oidManifest.xml 的文件,在资源\\本地\\机器人文件夹中。在这个文件中的所有信息将被复制到调试文件夹(将覆盖什么是包含在config.xml文件中),当你为Android平台的构建。

Create a custom AndroidManifest.xml file in the res\native\android folder. All the info in this file will get copied to the debug folder (and will overwrite what is contained in the config.xml file) when you do a build for Android Platform.

下面是已经很多关于自定义配置的详细信息在不同的平台上MSDN文档的链接:

Here's a link to the MSDN documentation which has alot more info about custom configurations for the different platforms:

https://msdn.microsoft.com/en-us/library/ dn757053.aspx

 
精彩推荐
图片推荐