SoFunction
Updated on 2025-03-11

Click the icon to enter the specified browser to set the home page to fully transparently solve the problem of flashing by

Click the icon to enter the specified browser.

Just add the following code to the onCreate() method:

String url = "/"; 
Uri u = (url); 
Intent intent = new Intent(Intent.ACTION_VIEW, u); 
// (u); 
// ("", 
// ""); 
startActivity(intent); 
finish();

But before entering the browser, a page flashed, because it jumped over from that blank homepage. The customer said he didn't want the page that flashed by, and said it was a bug.

The final solution is to turn it into transparent.

Add the following code in:

<style name="Translucent_NoTitle" parent="android:style/"> 
<item name="android:windowNoTitle">true</item> 
<item name="android:background">#00000000</item> 
<item name="android:windowBackground">@android:color/transparent</item> 
<item name="android:colorBackgroundCacheHint">@null</item> 
<item name="android:windowIsTranslucent">true</item> 
</style>

Then add the following code to AndroidManifest:

<activity 
android:name="" 
android:label="@string/app_name" 
android:theme="@style/Translucent_NoTitle" > 
<intent-filter> 
<action android:name="" /> 
<category android:name="" /> 
</intent-filter> 
</activity>