Modules/Widgets/examples/GalleryAndroid.cpp
Шурупов Илья Викторович c6a0602553 Run the widget gallery on Android
The app starts the widget gallery fullscreen, and Graphics/rsc is
packaged as assets.
2026-10-17 09:19:48 +03:00

30 lines
562 B
C++

#include "AndroidEntry.hpp"
#include "Gallery.hpp"
#include "WidgetApplication.hpp"
using namespace tp;
using namespace tp::ui;
namespace {
class GalleryApplication : public WidgetApplication {
public:
GalleryApplication() {
setMenuBarVisible(false);
setRoot(mGallery);
}
private:
gallery::Gallery mGallery;
};
int runGallery() {
GalleryApplication application;
application.run();
return 0;
}
}
extern "C" void android_main(android_app* app) {
const char* assets[] = { "rsc" };
runAndroidApplication(app, runGallery, assets, 1);
}