Image becomes black when exporting from the Figma to Android Studo - android

I have a Figma Design and I want to convert it to Kotlin Jetpack Design in the android Studio.
However, I am having an issue when export an illustration from Figma as image and add it Android Studio as drawable. When I fire up the emulator, all the image colors becomes black.
Please see the image below for the view from Figma and Android Studio.
Image from Figma and Image observed in Android Studio
Could you please help me to solve this issue?
P.S.
Thanks.
I have tried png and jpeg formats but both of them shows same issue.
I copied the image as Png in Figma and past it to Paint, then saved it to use it in Android Emulator but the same issue happened.

Related

Unable to import png or jpg images in Android Studio

Since the new versions of Android Studio (Starting at 4.2 I think), I haven't been able to import images correctly. Let me explain what I mean by 'correctly'.
Before, importing an image of a high resolution (usually xxxhdpi) would automatically be converted to different sizes for lower resolutions (down to ldpi). Nowadays, all Android Studio seems to want to do is convert images to some grey rectangle and say "here you go, use that".
Now I don't think this is the desired behaviour which makes me believe that there is possibly some configuration to change or update that I have missed.
Below is the image I would like to import (with its resolution) and what Android Studio shows me:
Original: 832x456 image in PNG format
Android Studio import:
Can someone either explain if I'm doing something wrong or if this is the actual behaviour now ?
If this is the behaviour, my only option is to write a simple python script to generate the correct resolution versions based on the Android guidelines but I'd like to avoid this if at all possible.

React js app having same folder images but in ios png images showing alpha tranparency issue

In React js app having one folder images use for both app Andorid and IOS. but in IOS PNG images showing alpha transparency issue.
I have opened image in IOS and fix transparency issue:
Open image in Preview app click File -> Export and uncheck alpha
After uncheck alpha its working fine in IOS. But its showing white background in Android. any solution here?
Issue fixed. its due to we have compress icons from tinypng website. due to its showing alpha transparency issue in IOS

Preview icon images in Android Studio editor's sidebar

I know it's not a vital problem, but it occupies my mind. As you can see in the image, Android Studio shows a nice preview of some images in the editor's sidebar.
There are 3 PNG images with the same format and same dimensions. But Android Studio only shows the preview for just two of them.
I'm using Android Studio 2.0 Beta 2 .
Does anyone knows the reason behind or is there any special property for the images to be able to be previewed by Android Studio?
I'll appreciate any answer.

Phonegap 3.5.0 removes 9-patchness from my 9-patch splash screen

I have a 9-patch splash screen, screen.9.png for my phonegap app. When I build the android project from the phonegap command line:
<phonegap|cordova> <build|run> android
The 9-patch PNG is copied to the drawable folder in platforms/android/ant-build/res/drawable, as expected. BUT it's copied without the 9-patch marks.
This results is the image being stretched on the device.
Note that:
the 9-patch works fine (tested with the draw9patch tool and in another app.
if I manually overwrite the PNG in the drawable folder and put my original 9-patch in it, it works fine and it doesn't stretch on device! [this is for now the best workaround]
Why is this happening, how is this happening (since I don't have a non-9-patch version in my project) and how can I prevent this from happening?

Android: draw9path doesn't not work on Emulator

I 'm using Android draw9path for an image that I will set for background.
after I process picture on software (default tools of android SDK) an put it in drawable-hdpi folder, and put it in background by:
android:background="#drawable/background".
I test successfully on graphical view, but when I run on Emulator, Android Emulator acts as normal image.
Who can help me solve this issue, please.
thanks :)
I think you didn't create p pitch image properly.
save the file like filename.9.png

Categories

Resources