How Can I Choose An Image From My Xamarin Resources? - xamarin

I have an image but I want to use a image from my resources folder, I drag and drop that image into the resources folder, and I see that inside it have more folders, can someone explain me also for what is one of this subfolders?

For Android:
..\Resources\drawable
However there are multiple folders inside resources to handle different resolutions. If you want to provide different resolutions do so. Otherwise the resource in drawable will be used.
For iOS:
..\Resources\
Make sure to provide #2x to support retina display.
For UWP:
store images in root folder

iOS, Android, and UWP include support for different image resolutions, where the operating system chooses the appropriate image at runtime based on the device's capabilities.
For android :
You need to put your images in resources/drawable/, every application should have alternative drawable resources for different screen densities. You should have images with the same filename in the different drawable-xxx folder.
This article will help you.
For UWP:
You must place your images in \Assets\Images. You can provide variants of an image resource by creating folders for different scales :
Assets\Images\scale-100\img.png
Assets\Images\scale-200\img.png
Assets\Images\scale-600\img.png
This article will help you understand.
For iOS :
Here you have everything

Related

any former recommendation for making background image in flutter app compatible with all screens?

Flutter dart
I'm about to finish programming an application and I want us to set wallpapers for the application's pages as background .. and i need your help friends if there any recommendation to make image Compatible with all screens for iOS and android
thanks
Making images as a background for every page might make your application laggy and bulky. I would rather suggest you use inbuilt options like the simple background color.
If you want to use images only then you can have different resolutions of the image as asset and using MediaQuery and LayoutBuilder you can change the image as per the size of the device.
You can have a look at this page to know more about adaptive applications

What sizes do I need to specify for icons in a Xamarin Tabbar?

My icon code looks like this:
var settingsPage = new NavigationPage(new SettingsPage())
{
Title = "Settings",
Icon = "settings.png"
};
I saw some mention of different icon sizing and names. How do I handle the possible different resolutions and what sizes and names should I use?
Naming should be the same across platforms. If your icon is called settings.png it should be called that in both platforms' respective folder structures.
Android
For Android I use the Android Asset Studio website to generate my icon in all the required sizes for the Action Bar icons:
http://romannurik.github.io/AndroidAssetStudio/icons-actionbar.html
You can choose from predefined images or upload your own. When you download them from there you get the images in the required folder structure for Android (all the different drawable folders). Copying those over into your own project should be a simple task.
iOS
For iOS there are only 2 images needed, one with a #2x and one with a #3x extension in the sizes below. You put these in the Resources folder of the iOS project.
https://developer.apple.com/ios/human-interface-guidelines/graphics/image-size-and-resolution/
https://developer.apple.com/ios/human-interface-guidelines/graphics/custom-icons/

Localizing storyboard Launchscreen

Is it possible to localize the Launchscreen in storyboard?
I have an image for English and for French, I need to localize them in Launchscreen.
Please this is important to solve this issue by any means.
If there is any tips or trick, please let me know...
UPDATE
#Martin R This topic is not duplicate, you are refereing a solution of older xcode.
Older xcode we used to use Default.png, but newer xcode we use LaunchScreen.storyboard.
How can we localize the LaunchScreen.storyboard if I have two images of 2 different languages?
I had the same problem, I find all the documents has not found the contents of the localization of Launchscreen.
Here my situation:
The document of Launch screen (Launch Screen) suggest using static images:
Avoid including text on your launch screen. Because launch screens are
static, any displayed text won’t be localised.
It’s best to use an Xcode storyboard for your launch screen, but you can provide a set of static images if necessary. Create static
images in different sizes for different devices, and be sure to
include the status bar region.
It does not say whether the picture can be localized,so I localised the launch image resources like this: Launch image multiple language. But I failed like this Can't get correct localized launch images on IOS 9.
It's launch images can't be localized: Localized launch images were never officially supported?

Extract image resources from Mac's builtin applications

Just an example, Apple's Mail, Notes and Messages use the same image for their "Edit" button. However, I cannot find that image in any of the resources folder in their app bundles. I guess the image might be in a system folder that is used by these applications. There are many "common used images" like this one that are not in Xcode's media library. Since they are already familiar to the users, it makes sense to use the same image set in my own app.
My question is, where can I find those images? A side question, is it legal to use them?

universal application weight

I developed my app for Ipad, now I should adapt it for Iphone. My app is quite heavy with a lot of images that should be available offline. These images are located in xib files and are sometimes loaded dynamically from app bundle. I need to limit the size of my app.
should I make a universal app or two different apps (each one with its own set of images optimized for the device)?
If I do a single universal app can I dynamically resize my "dynamically loaded images" in code. what should I do for the images in xibs?
I finally found my answer, one app with different xib sharing the same view controllers.
To limit the weight :
Some images must be modified (eg: backgrounds) because they need to
be adapted to the iphone screen resolution. I just named them
image~iphone.png. The cool thing is that you dont need to modify
images'name in xib or code because the ~iphone signifies image for
the iphone.
Some others can remain the same (eg: buttons) and I'll just size them
down in the IB.

Resources