how to let splash page full screen in flutter - flutter

how to let the splash page full screen in flutter?
i got how to set splash page in flutter.dev
<resources>
<style name="LaunchTheme" parent="#android:style/Theme.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">#drawable/launch_background</item>
</style>

Inside your Android module go to the app/src/main/res/values
Open up the file name styles.xml
Inside this file you will have a below code that is your custom style:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="#android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">#drawable/launch_background</item>
</style>
</resources>
You need add the below line in it:
<item name="android:windowFullscreen">true</item>
Like Below:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="#android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">#drawable/launch_background</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>
Once you add the above line app stays in fullscreen mode for the entire life-cycle. To disable it you need to define a normal theme to be applied to FlutterActivity after the launch screen is gone and in that theme add the above line with value "false".
Like Below:
<style name="LaunchTheme" parent="#android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">#drawable/launch_background</item>
<item name="android:windowFullscreen">true</item>
</style>
<style name="NormalTheme" parent="#android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">#drawable/launch_background</item>
<item name="android:windowFullscreen">false</item>
</style>

Put your image inside the drawable folder and call it in src
<item><bitmap android:gravity="center" android:src="#drawable/splash" /> </item>

Related

How to change cursor color in html-editor-enhanced flutter

I am using html-editor-enhanced to compose.
I'm having problems synchronizing the cursor colors with the app's colors. when I focus on Editor, the default color of the cusor is green. while my app has a different color. How do I change the color of this cursor?
Hope to get help from the community.
I have found the answer to my question.
In android native. > Res>value> style.xml
add this line
<item name="android:colorControlActivated">#2F93EF</item>
Full code
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="#android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">#drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="#android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
<item name="android:colorControlActivated">#2F93EF</item>
</style>
</resources>

Reduce the size of Image in Splash Screen in Flutter

I have a image which is quite big for Splash Screen. I want to reduce the size of this image but unable to do so. I have read already answers to this question which are here on SO but none of those answers helped. Please help.
launch_background.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<item>
<bitmap
android:gravity="center"
android:src="#drawable/bluetoothicon"
android:width="100dp"
android:height="100dp" />
</item>
</layer-list>
Splash Screen
Splash Screen
Bluetooth Image
bluetooth-image
Try this code.
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<item
android:width="200dp"
android:height="200dp"
android:gravity="center">
<bitmap android:src="#drawable/bluetoothicon" />
</item>
</layer-list>
Output

Flutter: How to hide the progress circle while login using flutter_facebook_login

I am using the flutter_facebook_login package to login the app. This method shows a login progress bar everytime I login. I want to remove that progress bar and use my own progress indicator.
How can I do that?
I already have a working progress bar and have used it. All i want is to remove the progress indicator of flutter_facebook_plugin.
I used a method where i tweaked the AndroidManifest.xml file. but it didn't work.
AndroidManifest.xml
<activity
android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#style/LaunchTheme" />
styles.xml
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="LaunchTheme" parent="#android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:progressBarStyle">#style/InvisibleProgress</item>
<item name="android:windowBackground">#drawable/launch_background</item>
</style>
<style name="InvisibleProgress">
<item name="android:visibility">gone</item>
</style>
</resources>
Solution for Android is available here,
works fine for Flutter plugin also
Android: How to hide progress circle in Facebook login

How to remove gray screen before splash screen - Ionic 4

Has someone managed to remove the gray screen when launching an ionic app from an android device?
Is there a way to remove this annoying gray screen?
I found a solution it's working fine for me using 5 steps.
1.) Create a file name colors.xml inside project\platforms\android\app\src\main\res\values
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="gray">#fff</color>
<color name="black">#fff</color>
</resources>
2.) Then create a new file styles.xml inside project\platforms\android\app\src\main\res\values
<resources>
<style name="SplashTheme" parent="#android:style/Theme.DeviceDefault.NoActionBar">
<item name="android:windowBackground">#drawable/background_splash</item>
</style>
</resources>
3.) Then open AndroidManifest.xml from project\platforms\android\app\src\main, then search android:theme="#android:style/Theme.DeviceDefault.NoActionBar" and replace with android:theme="#style/SplashTheme"
4.) Create a folder name drawable inside project\platforms\android\app\src\main\res
5.) Inside drawable folder create a new file having name background_splash.xml and the code is below.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#color/black"/>
</layer-list>
That's all.
Hope its help.
for me i added this code in style.xml file: /Users/User/Development/project/platforms/android/app/src/main/res/values/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">#android:color/transparent</item>
<item name="android:windowContentOverlay">#null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">false</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
</resources>
and edited my AndroidManifest.xml File : android:theme="#style/SplashTheme" added that to the activity
Add
xmlns:android="http://schemas.android.com/apk/res/android"
and
xmlns:cdv="http://cordova.apache.org/ns/1.0"
( if not present) inside you widget tag in you config.xml present in the root of your project.
Then replace android:theme value of your main activity with
#android:style/Theme.Light.NoTitleBar.Fullscreen
Thats it. You need not add any custom styles (If you don't want).

How to fix the App name on the top of the Activity

In my design page of My Android Studio Project, the App Name is shown in the top of the activity(Action Bar). But, when I debug the App, the App name is not Shown on the top of the Activity. I want the App name should be shown. How to fix it.
My styles.xml is...
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
Set your App theme to Theme.AppCompat.Light.DarkActionBar in style.xml
For e.g.
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
I think you was asking about ActionBar
from docs
A primary toolbar within the activity that may display the activity
title, application-level navigation affordances, and other interactive
items.
Beginning with Android 3.0 (API level 11), the action bar appears at
the top of an activity's window when the activity uses the system's
Holo theme (or one of its descendant themes), which is the default.
You may otherwise add the action bar by calling
requestFeature(FEATURE_ACTION_BAR) or by declaring it in a custom
theme with the windowActionBar property.
If you want to change it from java code, write in
Activity.java
ActionBar ab = getActionBar();
ab.setTitle("My new title");
Or, in the Androidmanifest.xml file:
<activity
android:name=".MyActivity"
android:icon="#drawable/my_icon"
android:label="My new title" />
hope my answer help you..