package com.app_name.app;
import com.getcapacitor.BridgeActivity;
import android.os.Bundle;
import android.graphics.Color;
// import android.webkit.WebView;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Set WebView background color
// This gets rid of the white flash that occassionally occurs when there is in a lag in drawing the app and during the expansion and collapse of the keyboard
this.getBridge().getWebView().setBackgroundColor(Color.BLACK); // or any color
}
}
The above file is located in:
app/src/main/java/com/app_name/app/MainActivity.java
However, the above file is simple. It merely sets the background color to black, which works as expected.
Goal:
Instead of a simple uniform background color, I want the background to be my brand logo, rounded, and centered on some chosen background color.
Note that this is not the splashscreen. If this file was not set, then occasionally, when the app wakes up or lags, a white flash appears on the screen before the app is rendered. This file is meant to replace that white screen flash with chosen background with the brand logo centered and rounded.