mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-10-26 12:27:44 +00:00 
			
		
		
		
	Android: minimum size for IME, so that it takes focus
In API 28, 0 width views can't take focus, so if someone tries to position the IME without setting a width, they'll stop getting text events. Tested on Android 9: with a 0 size, it would send correctly letters a, b, c, etc. but not numbers.
This commit is contained in:
		| @@ -1029,6 +1029,14 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh | ||||
|             this.y = y; | ||||
|             this.w = w; | ||||
|             this.h = h; | ||||
|  | ||||
|             /* Minimum size of 1 pixel, so it takes focus. */ | ||||
|             if (this.w <= 0) { | ||||
|                 this.w = 1; | ||||
|             } | ||||
|             if (this.h + HEIGHT_PADDING <= 0) { | ||||
|                 this.h = 1 - HEIGHT_PADDING; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         @Override | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sylvain Becker
					Sylvain Becker