Today I had my first time with Android 4.2, and I noticed how the home screen automatically repositions widgets as you drag them:
I recently worked on a similar code for our project, and I have to admit its performance is much worse. My algorithm is really stupid, and I'm looking for better alternatives. This is the closest one I've found yet, but I haven't tested it yet.
From my understanding, this is related to bin packing, but bin packing algorithms focus on putting rectangles as close to each other as possible, while Android implementation focuses on making as few changes as possible from the initial configuration, and thus is aesthetically pleasing.
Because Android is open source, I hoped to learn from their code, but I can't find anything related to laying out rectangles in android.appwidget. What is the right place to look at?
I'm not 100% sure but it looks like CellLayout.java from Launcher2 is reponsible for this.
I am building an application and currently am in the process of add backgrounds in. The way I make the backgrounds are by designing it in Microsoft Word and then pasting it into Paint then saving it as a .png file. This way works but it does not give a clear and crisp picture on phones. I'm wanting to know what do you guys use when putting backgrounds in on your applications. (ie. Photoshop)
Yes Photoshop is better option, but now a days you can make them online if you are not familiar with Photoshop, easily.
Check the following...
wallcreater
bg patterns
x3studios
click this to googled results
Photoshop or GIMP would be my first suggestions
Has anybody experience with using svg for creating custom buttons on android? I recently stumbled upon the svg-android project that was used for androidify and I'm wondering whether it is worth the trouble rewriting the code.
At the moment I'm using nine-patch buttons. The only problem is that I need to create several images for different resolutions. However, if I switch to vector graphics, I'm not sure how to preserve the rounded corner radius when I resize the button, for example.
Has anyone experience and can tell me whether it's worth the trouble ?
It sounds like you should maybe use Shapes instead of 9-patches. They superior in most of the cases (especially with rounded corners, gradients ...) : http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape
You can also use layer-lists to stack shapes.
The last time I used the svg-android project, it wasn't sufficient for my SVG's due to limitations in its rendering. I don't know what its current state (if different) is, but based on my year-old experience with this on Android, I'd say spend some time to experiment with it before you commit to using it -- perhaps its limitations will not affect you.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I've been "Googling" for a while now but I am coming up empty on any decent tutorials on how to "prettify"my android app.
Currently, my android app is fully functional but all it is is a bunch of buttons,text on several views.
What options or techniques exist to make it look beautiful, other than changing the font type, size or colour. Also changing the background colour or image isn't exactly a job done.
I appreciate any guidance on this!
Update
I am not looking for a designer. I just want know how else is someone supposed to design beautiful android apps - surely its just not the XML? Is it just about making a great background and fitting everything around that?
I know the pain you're going through - I'm still coding my app but I'm also on my third design iteration. UI design is definitely out of my comfort zone but then again, it's good to push yourself into other areas, now and again, if only to appreciate the skills which the pros have. That said, check out the new Android UI patterns here and you should definitely consider things like a colour scheme, fonts and overall look-and-feel. There's another good article here by Reto Meier about his approach. Good luck.
Although it is sacrilege of the highest degree, you could sneak a peek (sic) at the UI guidelines for iPhone.
In general, there are two approaches to making a good looking UI.
The first approach is to specialise. Pick a particular resolution, set your font sizes in stone, use precisely positioned images for rounded corners etc.
The second approach is to generalise. Make sure that your layout looks 'okay' on most of the screen sizes. Make sure it still looks good when the user changes the font sizes (etc). Try to keep the graphical elements away from the text elements (e.g. you might put a graphical border around the edges of your app - whereas the specialist would have a graphic filling the whole background with 'holes' for the text to go in)
Thirdly ( generalisations are made to be broken :D ) you can make your app skinnable. It is hard for one person to come up with a design that everyone likes. But if you allow the user control over the ui elements (especially colours and contrasts) they can personalise it and achieve something that is better for them than anything you could come up with. Everyone else on the planet might hate the colour scheme they pick, but they feel that it is perfect.
Fourthly ( sorry ) you can try customising the controls. On the iPhone (for instance) the built in buttons that come with the API are incredibly ugly on anything other than a white or light grey background (their shadow is wrong) - but you have no control over the appearance of the button! You can't even change its colour. So in order to have buttons that don't suck, you pretty much have to roll your own custom control. I highly recommend looking at the Donut Games iPhone apps - they have a 'big round bouncy button' that they re-use a lot.
Don't clutter your app.
Make sure your controls are a fair distance apart. Find someone with 'fat fingers' to user test it for you (use a frozen sausage if you don't have any friends).
Keep in mind that a touch UI is fundamentally different from a mouse and keyboard UI. For starters the tip of a mouse is 1x1, the tip of a finger (according to Apple HIG (and again, apologies for mentioning Apple)) is 40x40 on the old (non-retina) displays. Presumably it is 80x80 on the new one. That means a finger is somewhere between 1600 and 6400 times less accurate than a mouse. One implication of this is that no control should be smaller than 40x40. If you were making a boardgame for instance, that would imply that (on older iPhones) that a chessboard is about the smallest your squares/hexes should get (8 across at 40 pixels is 320 pixels, the same as the phone width).
You can see this effect (a control being too small) with the default Apple info button (the i in a white circle) - it is something like 18x17 pixels, and sometimes can be quite hard to hit (sometimes you get it first go, it creates an inconsistent feel to the app). Cunning developers stick a 40x40 invisible 'panel' behind the button and delegate the clicks that go through to that back to the button.
Don't use small controls!
I don't know if this helps you as much as it helped me but I really got a lot out of this Google IO 2010 Video on UI-Design-Patterns:
http://www.google.com/events/io/2010/sessions/android-ui-design-patterns.html
If you don't have an hour to spend, just read over the slides of the presentation:
http://dl.google.com/googleio/2010/android-android-ui-design-patterns.pdf
I would definitely recommend to watch the video session though!!!
Good luck and have fun!
From experience, a good Software Engineer is not necessarily a good UI Designer. They require two different skill sets, I recomend subcontracting the design to a good UI designer. Even if all they do is a mock up and then you go back and implement their design idea.
One cannot learn desing because it is an art. For this one has to believe in onself and let it happen. There is nothing more important for desing than a positive attitude and of course, in this case, some good Photoshop and Fireworks skills...
But essentially it is an ability to visualise that matters and this is why so many games on android market just don't look good, for rare are people who are good programmers and graphics artists at the same time... yet everything can be achieved given proper attention.
Basically, my answer is: if you want to do it yourself, then you must forget that you are a programmer and believe that you are an artist, desinger and producer. Only then, from that new perspective, you can create what is needed for your product.
I'm new to Android and Java programming and I've manage to create a simple paint program, but how do I add a zoom feature? Right now I'm just extending the View class and using the "onDraw()" method.
Do I have to use a Drawable to be able to add zooming functionality? I'm not really understanding the differences between the two.
If I am way off base then please point me to a good tutorial on paint/zooming.
I think your question is beyond the scope that stackoverflow Q/A format can provide. I know you're asking for 'simple' but imho that's probably due to your lack of perception about the scope of the question that you're asking.
In order to support zooming you need to know what kind of image processing engine you want. Are you creating a vector or raster based drawing program? If you do not understand the difference between the two then you'll going to have a difficult time figuring out what to do.
You should probably at least gain a basic understanding about these various topics (links to books pulled more or less from the top of amazon's search results):
Image Processing
Computer Graphics Fundamentals, two, and three
SVG (vector graphic format)
Wikipedia links:
Vector Graphics
Raster Graphics
Image Processing
Open source image processing apps (not android but source code never hurts to see how others have done something)
Paint.net
GIMP
Inkscape
I'm sorry there isn't an easy and direct answer to your question. I'm also not saying that you need to become an expert in these topics to do what you want. You just need to familiarize yourself with them and then you'll probably be able to implement what you want without much difficulty.