Using PSD templates in android - android

I found a lot of free templates in PSD format for android here. How do we actually incorporate these templates into our applications? Could I have some pointers?

Templates are used by and large for mocking layouts. Generally you have to build the layouts in XML by hand using a composition of existing widgets, bitmaps and drawables.
So you would need to create or extract the bitmaps you want from the PSD templates and incorporate these.
As I said though, a lot of templates are just used for mocking designs, and you might not find them easy to slice and dice.

Related

Is there any performance gain with FlutterIcons instead of using the SVG directly?

Is there any performance gain or any other advantage to use fluttericon or fluttericon instead of just using each icon svg directly with flutter_svg for example?
This question is a bit old so you might have already found the answer but here's my take on the subject:
Performances
Performance-wise, while the package flutter_svg has improved a lot over time, it is still a complex widget which will parse an SVG file and try to render it with its properties. There is still a few issues that are related to performances whenever you try to display a high number of svg widget:
Performance to render many SVG in an animation
SVG asset loading/rendering performance in PageView widget
Solution such as fluttericon or any other package to provide more icons through fonts will always provide better rendering performances as it is as simple as rendering a text.
Now which one to choose between fluttericon and a font file generated by the website fluttericon.com ?
Fluttericon (package) vs. FlutterIcon (web)
Well as said by Ravindra and ilikerobots importing directly the package fluttericon would increase the size of your application because it would contains all the font packs. It is also mentioned in the package's README file:
Please note this package is not intended for production use, due to
the large size. Instead, it can be used as a development aid to help
identify/test icons.
For production use, it is highly recommended to use FlutterIcon to
customize your icon pack, limiting your icon font to needed icons and
building your own from custom SVG.
Conclusion
So the best choice in terms of performance and app size would be to use FlutterIcon and only select the icons you want to include in your application. The package should only be used to try out which icon would fit your needs while developing.
Finally, the package flutter_svg should be mostly used if you need to display some complex SVG that cannot be imported accurately with FlutterIcon.

How to convert psd to android xml file

How to convert psd image to xml code to reducing size of android application and work effectively and android xml design improve to application performance fast.
you can use these software for convert the psd to xml
http://www.psd2androidxml.com/
2nd is you can use the png file to drawable folder and use it
There are some ways to achieve this.
One way is to watch tutorials and learn how to do it by yourself.
The second way is to use some automated online tools, however they are not reliable, and you will have to correct the code manually.
The site that was mentioned by Nirav Shah, www.psd2androidxml.com, is a service, not a software. You send the PSD files to them, and they hand code them according to your specifications. It may cost more than the previous two solutions, but the result is better compared to automated online tools.

Android : creating drawables with CSS input

I am new to Android but not to Java. Is there already a little framework which allows me to create layouts, custom views and drawables programmatically using CSS sheets for padding, borders etc; just like Nimbus/Three20 for iOS ?
We've working on an "App-Studio" so all the views, lists etc. are rather dynamic, basing on the CSS the user created by a visual style template editor.
And if not, would you recommend to create such Android layout xml files on the fly and then load them from file, or is it better to create the drawables by hand ? We'can't bake such files just into the build because the user needs to be able to change the style in real-time on the device.
Thank you.
Partial ans only to:
And if not, would you recommend to create such Android layout xml files on the flyand then
load them from file, or is it better to create the drawables by hand ?
I dont think you can create layout xml files on the fly and load them in the running app. They have to be created prior to compilation of the app.
Android uses Styles and Themes. Reading about these will help you generate some common patterns which you can use in your context. Once you have some patterns you can create these xmls using some automation tool prior to compilation (and avoid writing them by hand...:), funny computer changed the definition of by hand).

Android: How to organize project resources?

I'm wondering what some good ways of organizing Android projects are. I'm building a little recipe application and have already made dozens of layouts, drawable resources, menus, etc., not to mention Java source code.
Android does not allow sub-folders for resources, so is there a way to organize them? Right now I'm trying to organize them through naming conventions (e.g. new_list_ingredient_edit) but I'm wondering if there is a better way, as the names will probably get pretty long and cumbersome.
Same thing with resources such as string values. As I understand it, I can create multiple resource files (e.g. strings_new_ingredient.xml, drawables_new_instructions.xml, etc.) but all my resources across files have still have to have unique names, which again is cumbersome.
Although android doesn't allow sub-folders for resources, it does for assets, but this is much more cumbersome to use.
A possible option would be to use a sql database with all of your strings, but this approach is probably too much work and more cumbersome anyway.
Your naming convention method is probably your best option. You could think of some of the seperated words as directories if you want, which should keep it organized enough.
user864684,
I normally try to use heirarchy in my naming. If it is a layout for dialog, i will start with dialog_sharing or something like that.
As for graphics, I will start with btn or bg or txt or ic_menu depending on what they are for. Other than that, you just get used to it as you dev more for Android.
Make sure you also have a support folder on your drive for your local resources. I mimic the android layout so i keep my graphics sorted in res/... on my local drive too. I keep the psd and graphic files there and then just copy the pngs to eclipse.
Hope this kinda of helps. There is no real standard but you will pick up a style.
Specifically with respect to organizing drawable resources, I would advise choosing names that describe the drawables structurally, not functionally.
For example, if you have a gray circle shape resource that you are using as a placeholder for an image, I would avoid naming it *image_placeholder*. Instead, I would call it *gray_circle_1*.
My advice comes from having had the experience on multiple occasions of having given things names like *image_placeholder*, forgetting what they actually contained, and then rewriting the same exact thing in a separate resource file without realizing it.
Don't do what I did.

Convert PSD to Android XML (layout) Format?

I am coding an Android App for a research project at my institution, and have been working with a designer who has rendered some attractive UI mockups in Photoshop (using CS5). I'd like to implement her designs as layouts for my Android application, and this would be WORLDS simpler if there were some way I could convert the files to XML format. I think it's rather counter-intuitive that PS offers android templates, but no real way to apply these in the android design/layout process, short of (attempting to) mimic her artwork in XML code, which I cannot do by any stretch. Is this conversion possible? Is there something I am missing?
Thanks
~Taichou
I'm not aware of any such tool.
But you can approximate it by slicing up her mockups and using them in your GUI like you would convert a website template from an image to HTML.
As long as her layouts aren't too terribly complex you should be able to get by with flow layouts or relative layouts.
Right click - properties - Background (in Eclipse layout design) might be what you're looking for, but remember a bitmap image won't look the same on many devices with different screen resolutions.

Categories

Resources