I am making an app icon in flutter. And I have a problem. I want to make my app icon with square shape. But I am just getting the circle shape icon.
How can i change the shape of the icon?
You can't change the shape of app icon by coding.
So, what you can do is that:
Make a circular icon with it's background transparent
Save it and drag & drop that image file here
Generate the icon, it will download a zip file
Extract the android folder from that (other files are not necessary)
Copy all the contents ("mipmap-" folders) from the android folder (it's basically the different icon sizes)
Go to res folder in your project location -> F:\flutter\project_name\android\app\src\main\res
And replace all mipmap- folder with the new one which has your created logo
This may help you
I think it's set up automatically by Google through Adaptive Icons.
So your app Icon will automatically change based on your device theme, setting, etc.
You don't need to worry about that. All you need to do is provide a square app icon.
In your image, you can look at the YouTube icon. It's basically a square, but because it's adaptive (automatically as long as you set it up correctly), it could transform into several different shapes.
You can read more here, or here.
Yes you can do that. But you need to have sdk higher than 26.
https://www.youtube.com/watch?v=hpQenyqxTmw
After you generate your app icons from: https://appicon.co/, simply replace all folders contained in zip for android with the already existing folders in res directory .
Then go to app>src>main>res
Right-click on res and select new> image asset.
Adjust the icon to how you want it to appear.
Related
I'm experimenting with .net maui. i'm using vs 17.3 preview 4. I'd like to change the spash screen. i would think that i would change the content of the spash.svg file. I've changed the content of the file. I've left the property of the file as mauispashscreen. I've created a simple png file and have converted it with an online svg converter. the file is viewable with msft edge browser. All i get is a purple screen without the text changes. I'm just trying to do something simple. what should i look for in the setup of the file or the project? any suggestions are appreciated.
Wally
At first, please double click your project and check if there is the code in your projectname.csproj file or not. It seems when you delete the splash.svg file and add a new one in the resources, the code will be auto deleted.
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" />
And then, I have tried to convert a png to svg, but the picture can't show perfectly as the splash. So I download a svg from the svg picture website and it can work well.
It seems maui can't make all the svg show as the splash screen perfectly. You can also download one instead of converting the png.
I want to change background icon to #fe6017.
I use flutter_launcher_icons, set adaptive_icon_background: "#fe6017". But it doesn't work.
I also try to resize image. But it always shrinks and put white color around my image. Thank you.
Open android folder in Android Studio.
Right-click the res folder and select New > Image Asset.
In the Icon Type field, select Launcher Icons (Adaptive & Legacy).
In the Foreground Layer tab, select an Asset Type, and then specify the asset in the field underneath:
Select Image to specify the path for an image file.
* Select Clip Art to specify an image from the material design icon set.
* Select Text to specify a text string and select a font.
In the Background Layer tab, select an Asset Type, and then specify the asset in the field underneath. You can either select a color or specify an image to use as the background layer.
In the Legacy tab, review the default settings and confirm you want to generate legacy, round, and Google Play Store icons.
Optionally change the name and display settings for each of the Foreground Layer and Background Layer tabs:
Name - If you don't want to use the default name, type a new name. If that resource name already exists in the project, as indicated by an error at the bottom of the wizard, it's overwritten. The name can contain lowercase characters, underscores, and digits only.
Trim - To adjust the margin between the icon graphic and border in the source asset, select Yes. This operation removes transparent space, while preserving the aspect ratio. To leave the source asset unchanged, select No.
Color - To change the color for a Clip Art or Text icon, click the field. In the Select Color dialog, specify a color and then click Choose. The new value appears in the field.
Resize - Use the slider to specify a scaling factor in percent to resize an Image, Clip Art, or Text icon. This control is disabled for the background layer when you specify a Color asset type.
Click Next.
Optionally, change the resource directory: Select the resource source set where you want to add the image asset: src/main/res, src/debug/res, src/release/res, or a custom source set. The main source set applies to all build variants, including debug and release. The debug and release source sets override the main source set and apply to one version of a build. The debug source set is for debugging only. To define a new source set, select File > Project Structure > app > Build Types. For example, you can define a beta source set and create a version of an icon that includes the text "BETA" in the bottom right corner. For more information, see Configure Build Variants.
Click Finish. Image Asset Studio adds the images to the mipmap folders for the different densities.
You can create an image filled with color #fe6017 and use it for adaptive_icon_background as in example
flutter_icons:
android: "launcher_icon"
ios: false
image_path: "assets/icon/icon.png"
adaptive_icon_background: "assets/icon/icon-background.png"
adaptive_icon_foreground: "assets/icon/icon.png"
In my Flutter app, I want to be able to create some kind of certificate of completion. The layout will be always the same, but picture and text in it should change. This certificate should be created in a jpg format, so I can share it with other apps.
Does anyone have an idea how this could be accomplished?
The only way I can imagine is that I create a Screen template where I put in text and picture, then let the phone take a screenshot and save that screenshot automatically. But this might lead to unwanted content in the picture and different image sizes. I have searched for Widgets/ ways to create an image in Flutter but could not find anything.
You will need to create a widget with constructors (Image and text).
Then use a flutter package called screenshot to capture the parent widget as image and save it to the users phone.
plugin link: https://pub.dev/packages/screenshot
https://snag.gy/iuDznR.jpg
What's the name of this widget on the left in xcode? Or something similar?
is it a scrollview ? im trying to create a list of images just like it on my program.
Also, while i'm here I might as well explain the desired functionality. I'd like a user to be able to drag images from the desktop or finder etc into my app and that it adds a thumbnail to the list. also, when clicked on, it should show the image in an imageview. I also need to maintain the lists traits, like the path to every file and their image name.
That UI is not from Xcode, it's from Preview.app.
And the functionality you're describing along the left edge is a NSCollectionView. To do what you're describing, you'd need to create custom (subclassed) NSCollectionViewCells in which you can save the file path (or URL), the image name, a NSImage, ec.
Trying to make my own progressing/loading message dialog by keeping an animated image like GIF in it. But, its not working.
Can any one help me how to use the animated images in Smartface app studio.
Thanks in advance
Up to now, only png files were being used to show icons in Smartface.
But, with the new release (4.5.0), "Assets" folder will be in use. You will be able to place different kind of files inside this folder, and you can reach them such as below :
assets://myfile.txt