2016-05-06 17 views
5

http://ionicframework.com/docs/api/service/$ionicPopup/の中に表示されるフォームがあります。問題は、カーソルが最後の入力(テキストエリア)の内側に配置されている場合、キーボードが表示されますが、入力が表示に戻らず、キーボードによって隠されてしまうことです。ユーザーは下にスクロールする必要があります。キーボードが入力テキスト領域を隠す

私はアンドロイドデバイスを使用しています。

documentation

イオンはそれがビューにそれらをスクロールして表示されたときに入力し、フォーカス可能な要素を曖昧からキーボードを阻止しようとしますと言います。これを有効にするには、フォーカス可能な要素がスクロールビュー内にあるか、スクロールビューを持つコンテンツなどのディレクティブに含まれている必要があります。

フォームをイオンコンテンツタグで囲んだ場合、入力ボックスはスクロールして表示されますが、私のレイアウトではうんざりしてしまい、別の解決策を探しています。

更新:あなたはコルドバのキーボードを使用している場合 マニフェストlookslike

<?xml version='1.0' encoding='utf-8'?> 
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="myAwesomeApp" xmlns:android="http://schemas.android.com/apk/res/android"> 
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> 
<uses-permission android:name="android.permission.INTERNET" /> 
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true"> 
    <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" 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> 
    <activity android:name="me.apla.cordova.AppPreferencesActivity" /> 
    <activity android:clearTaskOnLaunch="true" android:configChanges="orientation|keyboardHidden" android:exported="false" android:name="com.google.zxing.client.android.CaptureActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden"> 
     <intent-filter> 
      <action android:name="com.google.zxing.client.android.SCAN" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity android:label="@string/share_name" android:name="com.google.zxing.client.android.encode.EncodeActivity"> 
     <intent-filter> 
      <action android:name="com.phonegap.plugins.barcodescanner.ENCODE" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity android:label="@string/share_name" android:name="com.google.zxing.client.android.HelpActivity"> 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
</application> 
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" /> 
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> 
<uses-permission android:name="android.permission.CAMERA" /> 
<uses-permission android:name="android.permission.FLASHLIGHT" /> 
<uses-feature android:name="android.hardware.camera" android:required="false" /> 

+0

私は[同じ問題を抱えていました](http://stackoverflow.com/questions/31353335/keyboard-hiding-edittexts-in-fragments)、解決しました[ここ](http://stackoverflow.com/a/ 31405304/3956566)これが役立つかどうかは不明です。お知らせ下さい。 –

答えて

0

がAndroidMenifestであなたの活動にこれを追加する方法

android:configChanges="keyboardHidden|orientation|screenSize" 
+0

この設定はすでにそこにあります – user1275105

0

あなたはcordova.plugins.Keyboard.disableScroll(false);を使用することができたときにポップアップがオープン終了時にcordova.plugins.Keyboard.disableScroll(true);を使用してください。 この方法では、ポップアップを使用する場合にレイアウトが重なり合うキーボードを扱うことができます。

+0

コードバーのキーボードを使用していません – user1275105

0

マニフェストのandroid:windowSoftInputMode="adjustResize"ApplicationまたはActivityに設定する必要があります。

アクティビティにgetWindow().setSoftInputMode(...)のような設定をしているかどうかを確認してください。その場合は、それらの行を削除してください。

+0

私の質問でマニフェストを見てください。その設定は既にそこにあります。 – user1275105

+0

はい。私は見ていただけで、アプリケーションではなく、1つのアクティビティで設定されています。どのように私はキーボードの問題が存在するアクティビティを知っていますか? – Bob

+0

各アクティビティタグの設定を追加する必要がありますか?このファイルは生成され、手動でまとめられません。私はcordovaが私たちのためにこのファイルを生成すると思います。この設定を行うことができるIonicまたはCordovaにフックがありますか? – user1275105

関連する問題