-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-Image is not loaded from CSS file #2569
Comments
You can't use multi-images like that in CSS. The You can, however, use existing multi-images as constants. E.g.
This will search for an image (or multi-image directory) at the following locations:
For example, suppose our css file is at Then the following locations would work for Check-Box_Normal.png (and Check-Box_Normal.png can be a directory with the appropriately named images - e.g. hd.png, etc..)
This is set up so that the standard XML version of the theme.res file will work. This would allow the multi-image to be loaded using Adding support for this directly via a |
Thanks for the detailed clarification of Image Constants. From the source I could find out its operation myself, there was no problem with it. However I found |
…h mm unit. #2561 (comment) Added some code to support loading multi-images as background-image url directives in CSS - but this is currently disabled because it would produce unexpected results when generating image borders. #2569 (comment)
I added code in the above commit that will produce a background image using the specified multi-image - but I have disabled it. This will produce unexpected results with generating image borders so it isn't appropriate. However, I left the code in as a guideline in case we want to implement it fully later. |
Multi-image loading generates null pointer exception from css file. The latter one contains the following style/uuid:
MenuImageContainer { background-image: url(images/menu.png); }
Image is from project belongs to the book named "Create an Uber Clone in 7 Days". In fact it is a directory containing the images in different densities:
The directory named menu.png is still found (renaming that I got file not found error), but the following error is printed to the log during css -> res generation:
Cheking the source, CSSTheme.java:2021 probably
dpis
array isnull
} else if (dpis[0] > 0) {
However I could not debug that file, I'm just guessing.
The text was updated successfully, but these errors were encountered: