c# - How to resize view when touchscreen keyboard is visible on Android with Unity? -
in unity can't control touchscreen keyboard. touchscreenkeyboard class has 1 parameters android.
if(touchscreenkeyboard.visible) { float keyboardheight = touchscreenkeyboard.area.height; // resize view here! return zero! }
is there other way know height of keyboard on android ?
this should trick (found here):
public int getkeyboardsize() { using(androidjavaclass unityclass = new androidjavaclass("com.unity3d.player.unityplayer")) { androidjavaobject view = unityclass.getstatic<androidjavaobject>("currentactivity").get<androidjavaobject>("munityplayer").call<androidjavaobject>("getview"); using(androidjavaobject rct = new androidjavaobject("android.graphics.rect")) { view.call("getwindowvisibledisplayframe", rct); return screen.height - rct.call<int>("height"); } } }
C - How To Resize View When Touchscreen Keyboard Is Visible On Android
ReplyDeleteWith Unity? - >>>>> Download Now
>>>>> Download Full
C - How To Resize View When Touchscreen Keyboard Is Visible On Android
With Unity? - >>>>> Download LINK
>>>>> Download Now
C - How To Resize View When Touchscreen Keyboard Is Visible On Android
With Unity? - >>>>> Download Full
>>>>> Download LINK fm