When soft keyboard is shown, onSurfaceChanged method is called with wrong size and breaks my image capture function.
I tried below workarounds (from other stackoverflow questions) but still doesn't work:
Other non-desirable options:
I'm looking for a clean & easy solution for this.
I found simple solution for this is adding below line to Android Manifest:
android:windowSoftInputMode="adjustPan"
onSurfaceChanged doesn't get called 2nd time. In addition, the surface is pushed up when soft keyboard is shown, which I like better.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.