Anvil is a tiny library for creating reactive UI in Android. It simplifies declaring layouts and binding data to layout views. There is no need to get a view by its id and update its properties when data models change. Once the view is bound to data variables, Anvil will track these updates and present the most recent changes in UI.
Find Anvil on Github
Related
Hi,
I'm working on an application where the UI is created dynamically,
and the different Layouts must be populated during runtime.
For some reason, when I add a new control such as an EditText, of a small height - for instance 20, the control is not displayed correctly - that is instead of the entire control being resized, it is being partly cropped.
What could be the reason for such a behavior?
Many Thanks!
Vitaliy
Flash files are used widely, but when people use it, they always need new demand. People always chase perfect. SWF files optimization is one of the chasing things. Here is the tip for how to optimaiz flash swf files.
General optimization
Please use symbols, animated or otherwise, for every element that appears more than once. You need to use tweened animations when you are creating animation sequences, because these animations occupy less file space than keyframs. Use movie clips instead of graphic symbols for animations sequences. You need to reduce the area of change in each keyframe as possible as you can to make the action happen in as small area as possible. Try your best to avoid animating bitmap elements and use bitmap images as background or static elements.
Colors
You can use Color menu in the Symbol Property inspector to create many instances of a single symbol in different colors. Then you need to use Color Mixer to match the color palette of the document to a browser-specific palette. Use gradients sparingly. You need about 50 bytes for filling an area with gradient color. You can use alpha transparency sparingly because it can slow playback.
Texts and fonts
You need limit the number of fonts and font style. Please use embedded fonts sparingly because they can increase file size. Select only the needed characters instead of including the entire font for Embed Fonts options.
Lines and elements
Do your best to group elements. You can separate elements that minimize the number of separate lines that are used to describe shapes by using layers. Reduce the number of special line types as possible as you can, such as dashed, dotted, ragged. Solid lines require less memory and lines that are created with the Pencil tool need less memory than brush strokes.
With these tips, you need not to spend extra money to buy some software or tool. What’s more, these tips are easy to understand, you are not required much flash knowledge.
I am making simple ball game and l have problem.I can't change position of Ball. I tried:
1. SetX() and setY() but lower APIs aren't supported.
2. Params and margins but when I move it left or right, the whole activity content is moving with it. Up and down moving is working fine. (Activity will have 10 ImageViews)
3. Android animations - Problem is that I can't get coorinates (getLeft(), getTop()) during the animation.
4. Canvas and draw elements - I change position of image with onDraw() and invalidate() functions but when I but backgorund and all other images (as bitmaps) it is very slow.
Can you give to me any ideas or suggestions? Thanks in advance.
Can you post the code? What do you exactly want to be done, there can be many different "ball games". You want to change the position of a bitmap or circle on the screen create x and y variables, draw bitmap or circle using them and if they change, the object will be drawn elsewhere
ListViewAnimations is an Open Source Android library that allows developers to easily create ListViews with animations. Feel free to use it all you want in your Android apps provided that you cite the project and include the license in your app.
You can start animating your ListViews using a bare minimum of 2 lines of code!
It currently supports:
Appearance animations
Swipe-To-Dismiss
GridView animations
Animate dismiss
Expandable rows
And more
For more information see the site, or view a demo in the Play Store.
Niekfct said:
ListViewAnimations is an Open Source Android library that allows developers to easily create ListViews with animations. Feel free to use it all you want in your Android apps provided that you cite the project and include the license in your app.
You can start animating your ListViews using a bare minimum of 2 lines of code!
It currently supports:
Appearance animations
Swipe-To-Dismiss
GridView animations
Animate dismiss
Expandable rows
And more
For more information see the site, or view a demo in the Play Store.
Click to expand...
Click to collapse
Nice work mate.
Highly useful.
That's awesome, I will use it for sure. Great work!
Nice work
Finally working ListView animations, thank you. Works nice
I have a listview that for various reasons act more like a gridView . Each row actually holds multiple cells.
How can I add swiping (of cells) and insertion/deletion (of cells) animations for it?
:good: Good control, collecting
Good animation
Espically swipe to dismiss
Hey folks,
I have been into this app which has a lot to do with calendar and dates.
I am still confused about the libraries available for it, I will be requiring the calendar to have following features:
- The calendar should change (by month) when I swipe UP or DOWN
- The boxes of month should have specific colors according to the events of that particular day, eg: red for urgent issues, green for vacation and so on
- The boxes should also have ICONS like weather updates for that particular date
- A LIST VIEW of the calendar will also be needed
If anyone has seen any which can accommodate these features, do let me know.
Cheers
Alex
Hey Alex,
for me, these seem more like programming issues, rather than library ones.
For the first one (The calendar should change (by month) when I swipe UP or DOWN) implementing a gesturedetector is the best way to go Imo.
The other three are simple coding issues, like setting backgrounds, drawables and implementing a listview.
As a tip, you should check out a library we made called "CalendarWrapper" (sorry, I can't yet post links, search for it on GitHub). Basically it's a wrapper around the CalendarProvider, so there's no need to mess around with cursors, everything can be done with object methods. It lacks a few features though.
I don't think there are any ready to use libraries with these specific features, so I'm afraid you will have to build it yourself. There are a few date picker / time picker dialogs floating around, or android-times-square from Square, but you'll have to look into extending it with the specific features like image overlay support for the weather/icon.
caldroid
Have a look at caldroid, it does not have all the functions you seek but is very customizable.
Since you are asking for too much in one library, you will have to do a lot of coding on top of any library that you choose.
thankx
Thankx guys, CalendarWrapper did give me something to look into but caldroid has almost done the job for me.
I have finished the bulk of the job with caldroid now it is printing images inside the dates and list view left.
I do know where to start for list view but printing icons inside boxes could be tricky
Will update you guys when I am done with the APP and put it on play store.
Cheers