Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android keyboard slides down leaving Black screen behind

I am using fragments in my application. There is scrollview in one of fragment containing many views. When user click on edittext, keyboard opens but when user click done button on keyboard then keyboard get hidden leaving black screen. I tried a lot my self but no luck. Please guide me..

like image 852
Dipak Keshariya Avatar asked Dec 20 '22 16:12

Dipak Keshariya


2 Answers

Put this code in your AndroidManifest.xml file in your activity tag-

<activity
     android:name="com.example.YourActivity" 
     android:configChanges="keyboard|keyboardHidden|
                   orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
     android:windowSoftInputMode="stateHidden|adjustPan">
   </activity>
like image 136
Piyush Avatar answered Jan 12 '23 08:01

Piyush


Surly you are doing lot of things on UI thread.

do long running processes on other thread or Asynctask.

See this link, it will help you out.

http://developer.android.com/training/articles/perf-anr.html

like image 35
Jaspreet Chhabra Avatar answered Jan 12 '23 08:01

Jaspreet Chhabra