Show all drawable content in Android Studio - android-studio

In my project I have got a lot of drawable content, and when I need to add new images to drawable I can put a same resource because I forget I have it already.
It is not about preview on XML file, this works well.
Any features in Android Studio to preview all my drawable contents without double-click on every resource? It can save lots of time.
I didn't find anything at Preferences, maybe some plugin or did I miss something?

Starting from Android Studio 3.4, you can use Resource Manager, a new tool window for importing, creating, managing, and applying resources to your app's layouts. You can open the tool window by selecting
View > Tool Windows > Resource Manager from the menu bar.

Right click on drawable folder and click 'Show Image Thumbnails'.

I'm using Android Drawable Viewer that can be installed from Plugins in AndroidStudio. After installing and restarting Android Studio, you will find a tab on the right side of the editor where you can find the viewer.
Click on that tab and you'll be asked to select the root folder for drawables. Do it, and after, everything will look like this:

Consider using Android Drawable Preview plugin. It shows content of the images instead of default icons when you expand drawables.
It even renders vector xml drawables!
Like this:
To install it: go to File > Settings > Plugins > search for Android Drawable Preview and click to find in repos. Install it and restart Android Studio.
Cheers!

Note/ when using 'Show Image Thumbnails' (as #Akhil Tawari suggested) in "Android" view as opposed to "Project" view, for image thumbnails of all drawables right click the "res" folder and not the drawables folder/s.

You can right click on the folder and click open in files. This will allow you to open up the project folder in which you can more easily add and delete images and other files.

Related

Unable to set Launcher Icon in Flutter Project in Android Studio 4.0.1

I am trying to set launcher icons for Android through New > Image Asset and I don't see the option anymore. I believe this is a recent change in Android Studio as I used to do it until a few months ago by right-clicking the res folder to add New > Image Asset. How do I set the icons in Android Studio 4.0.1?
I wanted to see if Resource Manager would be of any help but it remains stuck with a message "Waiting for build to finish..."
You can follow this link if trying to change the icon of your app:
https://stackoverflow.com/questions/43928702/how-to-change-the-application-launcher-icon-on-flutter
I had the same problem and ended up creating a new empty native android project for just creating the launch icons. And then I just copied them to my Flutter project.
(After creating the icons via the resource manager, you can right click on them and clicking "show in explorer" will lead you directly to the folder. So it is easy to copy and paste from there on.)

How to access "Configure Image Asset"

I want to manipulate my App's icon using "Image Asset Studio", usually I start it by following these instructions:
1- In the Project window, select the Android view.
2- Right-click the res folder and select New > Image Asset...
so I reach this window:
but for some reason I don't see this option "Image Asset" at the "New" menu.
NOTE: If I create a new project then I can see "New > Image Asset" normally.
Update:
I'm clicking on this directory.
I run this android studio on Ubuntu 18.04:
Android Studio 3.5
Build #AI-191.8026.42.35.5791312, built on August 9, 2019
JRE: 1.8.0_202-release-1483-b49-5587405 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-62-generic
There is actually an issue filed in GitHub related to this.
In your case, it seems that you treat a Flutter project as a regular Android project. AFAIK, Flutter projects are not Android projects.
So one of the workaround is also available:
open android studio File->Open folder->navigate to your flutter
project and select the Android folder. Wait for it to sync, then
navigate inside the Android studio folder and find the res folder
right click on it and choose New you will see the Image asset studio.
Also take note of this:
don't open the whole project of flutter using Android studio just open
the android folder found inside the flutter project with Android
studio, so the Android studio can treat it as a Android project rather
than flutter project, which will give you all Android features like
the one ur looking for #image asset studio
And you can also check this blog post about changing your Flutter app icons. And this YouTube video. You will only need your desired image for the icon and App Icon Generator.
To summarize what was written in the blog and discussed in the YouTube post, here are the simple steps you need to follow:
Step 1: Visit appicon.co and upload your intended image to convert to icons, select the types you would like to be generated and click “generate”. This will download a zip folder to your system. (You may skip this step if you have all resolutions in place with you.)
Step 2: Unzip the file. You’ll have two folders by the name of “android” and “Assets.xcassets”.
Step 3: Changing icons for Android App.
In your Flutter project, move to android/app/src/main/res which has a lot of folders starting with “mipmap-”. Delete all of them. And replace from your downloaded and unzipped AppIcons folder, everything that’s under android.
if you right click on res folder and Image Asset is not enabled just follow the following steps they are working for me.
File --> Open and select to open android(which is inside your project) in a new window.
Then if you go to the res folder (on the new window) and right click the Image Asset is enabled.

Design tab is not visible in Android Studio

Design tab is not visible in Android Studio. How to enable it ?
View - Window tools - viewer is not visible.
Thanks
I recently ran into this problem. Try File > Sync Project with Gradle Files. This can also help with configuration problems
The view that you are looking for is called the "preview" window in android studio.
You have to open a layout view in your project. Navigate to src/main/res/layout/ in your project and select the xml layout file you want to work with.
If the preview window doesn't automatically open up, you can open the view by selecting from the tool bar View>Tool Windows>Preview
There will be a "Design" and "Text" tab at the bottom of the xml layout.

Can't add a new activity on android studio

I'm trying to improve my android development skills, so working on some project about it. In my project, I added a new "Navigation Drawer Activity", then I deleted it because I wanted to create a new one but I can not able to add even another type of activitiy. Android studio adds ,
<activity
android:name=".ExampleActivity"
android:label="#string/title_activity_main" >
</activity>
tag in AndroidManifest.xml but It doesn't create any classes and xml layout files.
Also studio says:
ide internal error occurred android studio.
I tried regenerate R.java and clean my project ,but it doesn't work. How can I get rid of this problem?
Try to add a simple JavaClass and write an "extends Activity" behind the class name. And put this new Activity in the Manifest like in your example. You can add a menu and a layout like this, too, when you add xml-Files in the layout and menu folders. This should work.
I can not find a exact solution to that problem. Re-installed the Android Studio . It does the solution manually
If it's about how Activities is not showing up as an option in either the shortcut menu in the Layout folder or File + New in the menu, you can try File + "Sync Project with Gradle files" and give it some time.
This also adds options to the Tools menu (great if AVD or SDK Manager is missing).

How to add color schemes to Android Studio?

I found some links to download the .icls files on the link below. However, just by adding the .icls files to the color folder is not doing the job.
Any pointers in right direction is appreciated. (I found only one dark theme here and looking for light themes).
How to change or add theme to Android Studio?
Found the issue: I was using firefox to download from the site and the site below was giving me a .zip file instead of .jar file. Used Chrome and got the .jar file. [Editor's note: the site previously linked here has changed owners and been replaced with spam, and has been edited out]
Steps to follow:
File > Import Settings. Select the .jar file.
Close and start Android studio (auto restart didn't work)
Settings > Editor > Colors and Fonts select your theme and you are good to go.

Resources