I have been working on some icon packs for months & will be completed within a few days and I came across CandyBar dashboard.
I'm new learner for android and java. Still studying java & So not enough knowledge of programming but I read the tutorial on CandyBar's wiki page and understood about I guess 80%.
I understood how to configure that app according to my needs.
but I'm little bit confused regarding certain xml files.Tutorial didn't clearly explained which xml needs to be edited & which to be ignored & how to be edited to make my icons pasted in drawable folders to work on different launchers.
From this xda tutorial I understood, three xmls:-
/res/xml/drawable.xml ...........to make icon appear on app to let user select icons
/res/xml/appfilter.xml..................need to add activities in it of various apps
/res/values/iconpack.xml _________(Not available in CandyBar)...... why ?
so by editing 1 & 2 xml I'm able to make my icon pack work on nova launcher and few similar launchers but not on "go launcher", so I'm confused if I'm doing something wrong.
Same xml which are in assets folder too ! :( should I edit them ?
Just want some clarification regarding xmls anybody used it ? or know about it ?
all xml files picture
You can create your icons, right click and right click> New Asset Vector at the top Type of resource: vocaloisa two options Clip Art and Local File (SVG, PSD) by clicking the clip art icon You can do download your own computer with SVG or PSD in case you want a standard that android requires.
You can also import a PNG vector directly into the drawable mass if you can not generate the SVG or PSG, as it is a graph of one and not an image that needs several dimensions you can choose to import only 1 size and work in your By while the default is already 24dp x 24, but when the default is already being erased, 24dp x 24, when you have some impression at some point of view you leave these dimensions, but it is recommended to use the Android icons or whatever you want stay in a more elegant standard. so the icons come in xml and you can edit them if you know how to mechanize with pure xml
Related
My CodenameOne app needs that some buttons have special icons.
ScaleImageButton is the component that is suitable.
The icons to be used are from the material icons repository, but some are modified, so the CN font is not suitable.
I created the icon images with the Flamingo tool that converts svg to java classes.
It is cumbersome but it can be useful and practical, but at present time the resulting Java classes are not working on iOS.
It works on the CN simulator and Android although the button size is not exact: if state-changes reflect on some icon-changes, the layout would be rearranging and uneven.
On iOS, in addition to that, the drawing is huge or tiny in its viewport, depending of the button size that is assigned to the Flamingo image.
saveIconImage=new SaveIcon().scaled(normalButtonSize,normalButtonSize).toImage();
saveButton=new ScaleImageButton(saveIconImage);
There is an opened issue but the solution can take months or forever to come, if any, at least for such a niche issue.
So I decided to exploit the icon sets from the native Swift XCode version of my app I wisely created in parallel.
They are organized in nested subfolders (like in Assets.xcassets of XCode project), and when it comes to load resources files from the app bundle in CodenameOne, the path are special flat ones that do not like '/' or '.' chars.
Now they have a new maven building system but I do not know if something is changed about that.
So I ask whether it is possible or not to load images from folder hierarchy in the bundle and how it is achieved in terms of method calls and path strings.
The "right way" to do this is to add the images to the res file as that's the most portable way. You can do that via the theme or by including the images in your CSS, both options are discussed in the developer guide.
You can also create a separate resource file for each icon set and you can give any name you want to the icons within.
We don't support hierarchy for assets in Codename One. There's a special case for HTML which uses TAR to workaround platform differences but overall we don't allow that to avoid different behaviors between platforms.
My CodenameOne app is mainly intended to be the iOS counterpart of an existing Android app. It is for older devices, in fact, as soon as possible, or in the future, a Swift app is going to replace it for OS 14>.
I need some customised icons and I have the svg code for it.
Initially I had to use the Flamingo tool, that converts svg files in Java classes.
I used it like
ScaleImageButton appButton=new ScaleImageButton(new AppIcon().scaled(doubleButtonSize,doubleButtonSize).toImage());
It is cumbersome but it does not even work on iOS.
So now I resorted to create png images for every icon in every dpi level, as it can also be done on Android.
I renamed the files so they follow the standard I think it is proposed in CodenameOne.
The possible names are:
verylow.png
low.png
medium.png
high.png
veryhigh.png
560.png
hd.png
2hd.png
4k.png
In the end it has to be used like
Image icon = theme.getImage("icon.png");
It seems that the images can be imported in the project in more than one way.
I was said to include them in the theme.
According to the CN1 developer guide I have to set the size for each.
If I import them as a whole (selecting the folder or selecting all images and hitting the "Open" button) in the theme editor a dialog appears with all wrong sizes (but they resemble a particular set of choice, although very unlikely).
They are not always the same sizes but neither they are defaulted according to the provided set of images.
I provide images as 24px, 36px, 48px, 72px, 96px, 144px, 192px, 288px, 384px for normal size icons, and also I provide double sized images for double size icons in my app (the values are not doubled as expected).
I also have to check "Square image" and "Preserve aspect ratio" options (my images are already square).
Then the strangest part is that there is a percentage, I see it is 20 for example.
The caption reads "will affect all entries". I understood that it is to scale images, that is what a developer just do not want, unless the developer has wrong sizes, but still proportioned among themselves, that cannot be the case I think.
However I do not need any scaling, the images are right as they are. I created them on purpose.
The developer guide is not enough clear to me.
So I am asking
is it right to tweak the wrong size to match the right ones, and what about the percentage?
This specific UI is a bit out of date by now and wasn't used much even when it was added. Most users opted to do desktop scaling for multi images.
The scale option is designed to scale down from a high resolution image on the desktop. You don't want/need that.
You don't need to edit the file. Just make sure to turn on the XML team mode and make sure your images use the right file names. Then once you save the images will appear in the resource file.
I suggest adding a multi-image using the standard method of add in the menu. Then replacing all the generated images with your copies and reopening the file, then saving again (the last save is important as it will override the res file).
I made a layout-small xml file to fit smaller screen sizes for my activity. I was told that if you create a folder, named layout-small(with the XML inside it, of course) inside the res folder, android would recognize that the phones screen size is small and would automatically use the layout-small XML file.
I used the 3.2" HVGA Slider AVD to test the program, but it still used the normal layout. I hope this make sense, as I couldn't find another question similar to this.
If you need any additonal information or have any questions, let me know.
Thanks.
According to this page your AVD device has a screen size of "normal", so you will not pick up the definition for "small".
Device Definitions
The platform includes the following device definitions for use in creating Android Virtual Devices in the AVD Manager:
...
• 3.2" HVGA slider ADP1 (320 x 480, Normal mdpi screen)
If you want to target your AVD with a different layout, take a look at ways to specify an alternative.
This is usually done in JavaScript/ JQuery. I'd like an implementation in Java/ JavaFx.
A bit more details:
I have a gallery of pictures I'd like to list, first as small 32 * 32, then when a user clicks on one of the 32 * 32 icons, a larger one of the clicked should appear on another pane.
The problem I have is listing them horizontally so that a user could use Left-Right navigation arrows on either edge to show other new pictures not yet in view (more 32 by 32 picture icons become visible as others slide out of view either to the Left or Right), so I don't think that TableView's the best way to go.
I'd like something like this:
Please help me on how I could implement this? Thank you in advance....
Take a look at the DisplayShelf example from the Java 8 Ensemble 8 sample application.
The sample is more complex than what you need, but you could probably learn from it, simplify it and adapt it for your work.
The Ensemble 8 application is in the Java 8 Demos and Samples download for Java 8, so you can easily download and run it (use java -jar Ensemble8.jar) out of the demo/javafx_samples directory. Then search for DisplayShelf from within the Ensemble 8 application.
I'm creating toolbar with icons, but i face one problem: can't find how to load stock icons for buttons like save, open, new, ...
I know how to use my icons, but i don't want to create my own or find somewhere and i like applications with stock system icons.
I'm looking for cross-platform solution.
Besides, Dispaly.getSystemImage(), it is not currently supported by SWT (according to this bug report). You can look at the patches attached to the bug report and modify code for your platform to extract other icons/resources.
See Eclipse icons. They are licensed under EPS, so free to use.