android: fix directory listing, keyboard show/hide and read chars

This commit is contained in:
2017-08-20 00:51:59 +01:00
parent a2b888efd6
commit 81a5fb10e3
6 changed files with 218 additions and 14 deletions

View File

@@ -1,6 +1,11 @@
#include "pch.h"
#include "app.h"
#ifdef __ANDROID__
void displayKeyboard(android_app* mApplication, bool pShow);
#endif
using namespace ui;
void App::resize(float w, float h)
@@ -14,17 +19,23 @@ void App::resize(float w, float h)
void App::showKeyboard()
{
LOG("show keyboard");
redraw = true;
#ifdef __IOS__
[ios_view becomeFirstResponder];
#elif __ANDROID__
displayKeyboard(and_app, true);
#endif
}
void App::hideKeyboard()
{
LOG("hide keyboard");
redraw = true;
#ifdef __IOS__
[ios_view resignFirstResponder];
#elif __ANDROID__
displayKeyboard(and_app, false);
#endif
}