Better android input handling: sending notifications about CInputText changes to java so that we can display textinput overlay there; (#354)

This commit is contained in:
Fay authored and ArseniyShestakov committed 2017-07-23 20:23:48 +03:00
1 parent 069f295165
commit 80f149e296
4 files changed
+59

No files matched your search

+10
View File
@@ -83,6 +83,16 @@ std::string CAndroidVMHelper::callStaticStringMethod(const std::string & cls, co
return std::string(env->GetStringUTFChars(jres, nullptr));
}
void CAndroidVMHelper::callCustomMethod(const std::string & cls, const std::string & method,
const std::string & signature,
std::function<void(JNIEnv *, jclass, jmethodID)> fun, bool classloaded)
{
auto env = get();
auto javaHelper = findClass(cls, classloaded);
auto methodId = env->GetStaticMethodID(javaHelper, method.c_str(), signature.c_str());
fun(env, javaHelper, methodId);
}
jclass CAndroidVMHelper::findClass(const std::string & name, bool classloaded)
{
if(classloaded)