keyboard height

216 views
Skip to first unread message

Chris

unread,
Oct 18, 2015, 10:06:33 PM10/18/15
to AndroidScript
Anyone figure out a way to measure how much room the keyboard takes?

Paul Norman

unread,
Oct 19, 2015, 7:43:31 AM10/19/15
to AndroidScript
Numeric is shorter, Google English UK is taller than Hacker's keyboard, and the User can change settings that effect it all.

I was wondering about it today myself.

This thread from two years ago suggests its problematic.

http://stackoverflow.com/questions/16788959/is-there-any-way-in-android-to-get-the-height-of-virtual-keyboard-of-device

There's a couple of serious suggestions here...

http://stackoverflow.com/questions/29665435/how-to-get-the-height-of-android-keyboard

Paul

Chris

unread,
Oct 19, 2015, 3:58:31 PM10/19/15
to AndroidScript
Seems only possible through java - will need Dave/Chris to implement an app.GetKeyboardHeight() method.

I found numerous solutions. All java.

Will add to the 'things we want' list.

Paul Norman

unread,
Oct 20, 2015, 7:43:06 AM10/20/15
to AndroidScript
Absolutely Java needed as far as I coukl tell.

Makes me wonder for needed Android system things like this (in development phase) whether sufficient hooks could be placed in the underlying Java code of DS to make it possible to run trial JavaCode with a generic exposed "trial" JS object, that can all execute live, so that Java code can be trialed and then submitted to Dave and Chris?

Sort of like a super eval() for Java Code pushed through from JS, and tested on the proposed JS "app.trial." interface?

Steve Garman

unread,
Oct 20, 2015, 8:09:52 AM10/20/15
to AndroidScript
Paul, if you are talking about Java source code, I am sure you realize that however many hooks you put in, Java cannot compile new code on the fly.

If you mean Java byte code, it is possible to call functions from a .jar using the plugins SDK.
https://groups.google.com/forum/m/#!topic/androidscript/ysjOLDdjUvw

That, I think is the way this sort of thing needs to go.

Unfortunately, I find the SDK impossible to use because it is designed to work with Eclipse and not with Android Studio and I can no longer set up the Eclipse Android setup from scratch.

I am hoping for some advice soon on an alternative way to create plugins using neither of the big PC based systems.

Chris

unread,
Oct 20, 2015, 11:25:36 AM10/20/15
to AndroidScript
Well Steve, AIDE is working perfectly :). I finished my FtpClient plugin this morning. I am going to test it for a couple days, finish the docs, and release it.

I posted the java needed for a getKeyboardHeight in the beta group. Hope it is incorporated, this is a very needed method.


Paul Norman

unread,
Nov 9, 2015, 2:39:02 PM11/9/15
to AndroidScript
From 'Tell us what you want' June 7th - answering Thomas Dave wrote -

"You can't call Java classes directly from DroidScript because we do not wrap the Java SDK with a 1:1 mapping, it is more like a 1:10 mapping...so that you guys can do ten times less coding to get your Apps up and running. (It might be worth us looking into exposing the reflection API though :) "

( https://docs.oracle.com/javase/tutorial/reflect/ )

<- that's what I was thinking, but to be effective it would involve going above the 1:10 mapping with latent code redundancy and so bloat when I think about it (my reference to hooks) and indeed it's obviously far too much work for Dave and co. compared to people just writing plugins - agreed.

Maybe a series of plugins which expose JS objects as libraries with methods and properties for generic areas of need like the FTP plugin had just done? Encouraging people to generalise as much as possible when developing new areas of functionality - helping to develope a series of "system" core library plugins, before specialising to their own specific project's purposes?

Is there anyway a need for a clearer naming convention for the JS side of plugins to avoid potential collisions if more than one plugin is to be loaded?

Chris

unread,
Nov 9, 2015, 6:12:08 PM11/9/15
to AndroidScript
Paul? What are you talking about? DroidScript already has a user plugin sdk. And, it allows communication from javascript to the java plugin.

Are you part of the beta group?

Reply all
Reply to author
Forward
0 new messages