I assume the correct folder is drawable-nodpi.
I just need to know this so that I can set up PNGexpress in Photoshop to generate the folder automatically (on asset export) and know that im not forcing my developers to move the files around a bunch on their end.
Fire and forget type approach - best to be sure than assume though!
Thanks!
If you create the SVG from inside of Android Studio it puts the file inside the drawable folder. You can check it here: https://developer.android.com/studio/write/vector-asset-studio.html in the 7 step of the section "Adding a material icon".
So, with this, I would choice to use the drawable folder to keep the same behavior as Android Studio.
Related
I am trying to develop an android app, where I will be required to display a lot of images such as infrastructure, events and so on.
I don't think that storing them in drawable folder is the best option. So what would be the most efficient way to do it?
If you use vector drawables it shouldn't be a problem if you store them in the drawables folder - they're small and scalable.
You can store them in assets directory.
Additionally you can convert these images to webp by right-clicking them inside android studio project explorer and clicking convert to WebP.
For Vector assets, you can let them be inside drawable folder.
I feel irritating to develop the xamarin now since it is so not stable... i am intend to create splash screen for the android, however from what i seen from the xamarin documentation,however before i am able to achieve it, i need to add the resources to my project. Please see the following documentation
https://developer.xamarin.com/guides/android/application_fundamentals/resources_in_android/part_1_-_android_resource_basics/
from the beginning the resource folder has been done to create all the mdpi , ldpi those folder... they skipped to teach us how to create those resource folder, so in the end, i tried to create a new folder which is named as drawable-mdpi and put some icon into it. In the end the files and folder name does not exist in the Resource.Designer.cs.
In the end my resources is unuseable... Google no solution
Earlier Xamarin project template used to have all Drawable folders by default. Now the template just has the mipmap folders. You need to create all the drawable folders manually by Right Clicking Resources Folder > Add > New Folder. Give names as "drawable-mdpi" "drawable-hdpi" and so on. You can then add images to them by Right Clicking respective folders > Add > Add Files. If the Image's Id doesn't appear in Resource.Designer.cs file, it might be due to some build error already existing. Try cleaning and re-building. Either Resource Id will appear in Resource.Designer.cs or the already existing error will pop-up fixing which your issue will be resolved.
I realized those documentation is the xamarin old documentation, by the default the xamarin created those folder already, however i dont know why the xamarin don't show when we create the new project and i still dont understand why only create 3 density which is hdpi, xhdpi and the xxdpi, is it the mdpi not longer use? I have no idea. However i will need to add those folder again in the project so i am able to see it.
I recently created a new project to add some features to an existing app (I'm planning to just integrate it to the existing code base later).
When I'm trying to copy image assets, I noticed there is no /res/drawable folder existing just (drawable-hdpi, ..-ldpi, ..-mdpi, ..-xhdpi, ..-xxhdpi).
1) Is using the /res/drawable folder obsolete?
2) Where do I put my image assets? (manually create /res/drawable folder?)
More Info:
Using Eclipse Luna (4.4.1)
1) Is using the /res/drawable folder obsolete?
Since it is a synonym of res/drawable-mdpi/, there is no particular reason to use res/drawable/.
2) Where do I put my image assets? (manually create /res/drawable folder?)
You create ones for appropriate densities, then put them in the appropriate density-specific directory (e.g., res/drawable-mdpi/, res/drawable-hdpi/). Since you are using Eclipse, you may be able to use the Icon Set Wizard to help you set up your per-density drawable resources.
When I overwrite an image asset in Android Studio, for example the default ic_launcher, the IDE keeps showing the old image - no matter what I do, the image is never refreshed in the IDE (the deployed app uses the correct one). After a while you are not sure which files you have already changed and which are to be changed. You can prepare a list and check the items, but it would be nice to see the actual files in the IDE.
Is there any way to force this incredibly buggy IDE to 'sync' the cached image resources with those actually chosen by the developer?
I am using Android Studio 1.1.
Cheers
Open your src/drawable folder and make sure that this ic_launcher is not in any folder of your drawable, it means that in your mdpi, hdpi, etc... folder is this icon, then you can delete it in each folder on your drawable or you can replace it with yours (with the same name, if you don't want to replace the ic_launcher on the whole code), and Clean / rebuild the project.
I'm trying to change the background of my first app to a png I have. I put the png in a newly created folder called "drawable." When I go to browse my "drawable" I can't see it's "children" or files. The only error of sorts that it gives me is "You must... rce item" anyone run into this? Android API 7 by the way.
Put the png in /res/drawable and then do a clean on your project in eclipse to force the .R class for your app to be recreated. You might also need to do an f5/refresh in eclipse on the project to get it to see that you have added a file in filesystem to /res/drawable.