Wednesday 15 April 2015

android - Some devices don't follow 'adjustpan' -



android - Some devices don't follow 'adjustpan' -

i have listview. each item (row) of list contains textview comment , edittext replying comment. comments beingness loaded @ runtime.

edittext remaining hide after keyboard. solution searched include adjustpan in specific activity tag in manifest. after pan beingness adjusted nexus 5 (5.0), nexus s (4.1.2) , hp touchpad (4.0.3). felt cool.

but story different samsung s duos(4.0.4) , samsung galaxy grand (4.1.2) though tried adjustpan , adjustresize in manifest ( individually , ) devices hides edittext behind keyboard. noticed more thing when touch edittext on these devices. edittext comes above keyboard start typing, screen jumps n downwards , edittext goes behind keyboard.

i have tried:

android:descendantfocusability="afterdescendants" edittext android:focusable="true" edittext adjustpan , adjustresize in manifest statehidden , statevisible not solutions want keyboard on touch request only. in articles, suggested set views in scrollview, not practically possible set listview in scrollview.

i've spent 2 days find out solution. think problem device specific. so? did 1 faced same problem? how can solve problem?

manifest if follow: (detailviewactivity activity problem arising)

<uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.access_wifi_state" /> <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <meta-data android:name="android.app.default_searchable" android:value="com.examandroid.activities.searchactivity" /> <activity android:name=".activities.learnaptactivity" android:label="@string/title_activity_learnapt" /> <activity android:name=".activities.splashactivity" android:label="@string/app_name" android:theme="@style/splashtheme" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".activities.loginactivity" android:label="@string/title_activity_login" android:parentactivityname=".activities.splashactivity" android:theme="@style/apptheme" > <meta-data android:name="android.support.parent_activity" android:value="com.examandroid.activities.splashactivity" /> </activity> <activity android:name=".activities.forgotpasswordactivity" android:label="@string/title_activity_forgot_password" /> <activity android:name=".activities.signupactivity" android:configchanges="keyboardhidden|orientation" android:label="@string/title_activity_signup" android:parentactivityname=".activities.loginactivity" > <meta-data android:name="android.support.parent_activity" android:value="com.examandroid.activities.loginactivity" /> </activity> <activity android:name=".activities.mainactivity" android:label="@string/app_name" /> <activity android:name=".activities.lessonactivity" android:label="@string/title_activity_lesson" /> <activity android:name=".activities.searchactivity" android:label="@string/title_activity_search" android:parentactivityname=".activities.mainactivity" > <intent-filter> <action android:name="android.intent.action.search" /> </intent-filter> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> <meta-data android:name="android.support.parent_activity" android:value="com.examandroid.activities.mainactivity" /> </activity> <activity android:name=".activities.profileeditactivity" android:label="@string/title_activity_profile_edit" android:parentactivityname=".activities.mainactivity" > <meta-data android:name="android.support.parent_activity" android:value="com.examandroid.activities.mainactivity" /> </activity> <activity android:name=".activities.detailviewactivity" android:label="@string/title_activity_item_detail_view" android:windowsoftinputmode="adjustpan" > </activity> <activity android:name=".activities.imagefullview" android:label="@string/title_activity_image_full_view" > </activity> </application>

according adjustpan not preventing keyboard covering edittext u have desable fullscreen.

try this. onclick edittext.

getwindow().addflags(windowmanager.layoutparams.flag_force_not_fullscreen); getwindow().clearflags(windowmanager.layoutparams.flag_fullscreen); activitiescurrentcontentview.requestlayout();

reference:

adjustpan not preventing keyboard covering edittext

android exit total screen mode

android android-layout android-listview keyboard android-softkeyboard

No comments:

Post a Comment