comparison android/dw.cpp @ 2498:4ae2b3b77f25

Android: Get the notebook control functional. Disable recylcing of the views. Even though we are using the RecylerView we don't actually want the views recycled. Attempt to prevent the activity from restarting immediately in the simulator by enabling the required options in the AndroidManifest.xml. This didn't work so I am putting that ugly workaround back in, since in the simulator we get called twice and we want to actually run dwmain() on the second call in the simulator.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 05 May 2021 09:15:08 +0000
parents 3bf2f08fdc45
children ff3310fa6d72
comparison
equal deleted inserted replaced
2497:7b210f156eef 2498:4ae2b3b77f25
88 Java_org_dbsoft_dwindows_DWindows_dwindowsInit(JNIEnv* env, jobject obj, jstring path) 88 Java_org_dbsoft_dwindows_DWindows_dwindowsInit(JNIEnv* env, jobject obj, jstring path)
89 { 89 {
90 static int runcount = 0; 90 static int runcount = 0;
91 91
92 /* Safety check to prevent multiple initializations... */ 92 /* Safety check to prevent multiple initializations... */
93 #if defined(__arm__) || defined(__aarch64__)
93 if(runcount == 0) 94 if(runcount == 0)
95 #else
96 if(runcount == 1)
97 #endif
94 { 98 {
95 char *arg = strdup(env->GetStringUTFChars((jstring) path, NULL)); 99 char *arg = strdup(env->GetStringUTFChars((jstring) path, NULL));
96 100
97 /* Save our class object pointer for later */ 101 /* Save our class object pointer for later */
98 _dw_obj = env->NewGlobalRef(obj); 102 _dw_obj = env->NewGlobalRef(obj);