Why Android Studio 3.0.1 has no drawable(ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi) - drawable

I want to know that why the latest version of Android Studio(3.0.1) has no drawable(ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi), and has drawable-v21 ,drawable-24 and drawable folder only. for different resolution what we have to do?
I have few Questions here.
1) Whey not the drawable(ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi) created by default as before?
2) What is the purpose of drawable-21 and drawable-24?

First : ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi are not created by default here are the sites that will help you to create it easily https://romannurik.github.io/AndroidAssetStudio/ and https://www.img-bak.in/.
Second : When you set images in folder drawable-21 and drawable-24 it means that images or drawables inside that folder is the one to be use if the device SDK version is 21 (Lollipop) or 24 (Nougat) is met. The purpose of that is for compatibility.

1) Whey not the drawable(ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi) created by default as before?
As you can see you can now add vector graphics to android project.
Folders are not created to bring attention to vector graphics support and to discourage using bitmaps for icons and to escalate problem to ask questions like you asked. You can now include PhotoShop psd files and SVGs to your project. If you min target below API v21 it will automatically create bitmaps for all resolutions. If above it will use VectorDrawable and apk size will decrease drammatically, since images for highly-dense devices contribute too much to apk size.
2) What is the purpose of drawable-21 and drawable-24?
21 and 24 correspond to different API versions. So that you can have different design for Android 6 and Android 7.

to find the drawable ldpi,mdpi,hdpi,xdpi,xxdpi,xxxdpi and all
In IDE at left top corner select Packages instead of Android
under Packages you can see the Libraries -> drawable-hdpi,drawable-hdpi-v4, drawable-en-hdpi,drawable-ldpi,drawable-mdpi,drawable-xhdpi, drawable-xxhdpi and so on
drawable-21 and drawable-24 are api specific as said by Access Denied.
Thank you

Related

Flutter Pdf Viewer performance

I'm creating an educational application for poor students who have android devices running on Android 4.1 and above.
I tried lots of packages but
most of them make the app crash and the rest take long to load the file and the application becomes heavy to use.
Is there a package or a way to improve the the performance?
I don't want to convert the pdf pages to images because this will make the size of the app very big to download.
These are the packages that I used:
flutter_full_pdf_viewer: ^1.0.6
pdf_image_renderer: ^0.5.0
advance_pdf_viewer: ^1.2.2
flutter_cached_pdfview: ^0.3.5 #min API Level 20
printing: ^5.2.1
pdf_flutter: ^1.1.4
flutter_pdf_viewer: ^0.6.1
native_pdf_view: ^4.0.1
flutter_pdfview: ^1.1.0
`
If you are facing issues with every pdf viewer then my suggestion would be to not use your app pdf viewer instead if possible you can use the default pdf viewer which generally comes preinstalled in devices. And you would need a way to know if a phone has an app that can open pdf files or not and in case it is not there then use your app pdf viewer.
The second option would be to split the pdf files into multiple pdf files like chapters, etc. I think this option is very much viable.
Also, you can try this package syncfusion_flutter_pdfviewer. I'm using it as of now and it is good.

How to resize image file on Xamarin.forms. (+ writeableBitmap package can't be added)

I'm making iOS and Android app using with Xamarin.forms. (PCL project)
I need to resize my image file from 'MediaFile class' that is returned from 'CrossMedia.Current.PickPhotoAsync ()'.
What's your best way to do it?
and I have searched long time and noticed that many people uses 'writeableBitmap'.
But this 'writeableBitmap' nuget package can not be added because Xamarin platform is updated?
I got great answer from here.
https://forums.xamarin.com/discussion/comment/199212#Comment_199212
It's using DependencyService and it works beautifully.
After applied DependencyService, I got a question.
In my thinking, image file is not dependent so why don't we process it just in 'forms' using with SOME image process library in .net? (I'm not a .net developer but I believe that there is many library to process image file)
I suspect that we should have done because we want to use built-in image processing library(like UIKit) so that we could avoid adding new one?
Am I correct?

Localizable xcassets files?

In previous versions of xcode you could set image files as localizable files and import different image files for different locales.
I cannot seem to do this using the new XCAssets functionality in Xcode 5. Is there a way to do this within the xcassets structure? Or do I have to import the images as separate files.
I've also looked for this, and after some time looking around it seems that is not possible for the moment using the xcassets, although it may change in the future... or not
Apple currently recommends that the launch image should simulate the app first screen but without content.
Apple launch images guidelines
Yes seems not possible with xcassets for now as per Macistador answer.

Monodroid Layout Folder support

I'd like to use qualifiers on my layout folders as per the android documentation, but the designer in VS doesn't seem to support them. For example layout-w600dp doesn't get sent to the emulator; the default axml file from the layout folder is used.
Does anyone know if these settings are supported in Monodroid? If so, how do you make them take effect?
I think w600dp requires a certain api level to work - maybe 3.2 - see http://android-developers.blogspot.co.uk/2011/07/new-tools-for-managing-screen-sizes.html

Monodroid Custom UI controls

I want to know where I can get access to the NinePatch images specifically for Monodroid. I want to change the default coloring from blue to orange (if I was doing this in Java it would already be orange).
All I need is to change an edittext so that it's default colors are different. I have seen
http://www.androidworks.com/changing-the-android-edittext-ui-widget
which is really helpful but only as far as vanilla Android is concerned. I tried following the instructions, but I found the standard orange java images, not the Mono ones, which are blue.
Minimum framework is 2.2. I know that I am getting the java images because when I go to C:\Android\android-sdk\platforms there is no android-2.2 folder.
I'm not really sure what you are referring to. Mono for Android does not ship any NinePatch images. Mono for Android simply provides a thin binding over the Java API, it does not do anything custom.
Maybe it is triggered by changing your Android target framework?
I found my answer - and thank goodnesss it did not involve changing the 9Patches!
You can make an xml in the drawable folder which describes your button, textbox, etc. and make a selector with a solid tag, pressed event, etc. (http://developer.android.com/guide/topics/resources/drawable-resource.html)
Then you can set up the colors as a constant set in the Values folder and boom! Solution!

Resources