4package org.qtproject.qt.android;
6import android.content.Context;
7import android.content.ContextWrapper;
9class QtEmbeddedLoader
extends QtLoader {
10 private static final String TAG =
"QtEmbeddedLoader";
12 private QtEmbeddedLoader(
Context context)
throws IllegalArgumentException {
13 super(
new ContextWrapper(
context));
15 int displayDensity =
context.getResources().getDisplayMetrics().densityDpi;
16 setEnvironmentVariable(
"QT_ANDROID_THEME_DISPLAY_DPI",
String.valueOf(displayDensity));
17 String stylePath = ExtractStyle.setup(
context,
"minimal", displayDensity);
18 setEnvironmentVariable(
"ANDROID_STYLE_PATH", stylePath);
19 setEnvironmentVariable(
"QT_ANDROID_NO_EXIT_CALL",
String.valueOf(
true));
21 extractContextMetaData(
context);
24 static QtEmbeddedLoader getEmbeddedLoader(
Context context)
throws IllegalArgumentException {
25 if (m_instance ==
null)
26 m_instance =
new QtEmbeddedLoader(
context);
27 return (QtEmbeddedLoader) m_instance;
static const QString context()