Fixed issue with new main activity blanking rather than staying on. Fixes #141

This commit is contained in:
Graham Jones
2024-01-31 21:32:30 +00:00
parent 1a98e1094e
commit 1be6e51406
5 changed files with 12 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
@@ -154,6 +155,10 @@ public class MainActivity2 extends AppCompatActivity {
} catch (Exception ex) {
Log.e(TAG, "exception starting main activity " + ex.toString());
}
// Force the screen to stay on when the app is running
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}