[Q] Live Wallpaper Falling Images and Sizes - Android Software Development

I am wondering how to take a bitmap image and have it drop vertically from the top of the screen to the bottom and then wrap and do it again. I can only find how to rotate it around a certain access in the help portions. I'm assuming we can use different speeds as well to do the dropping. Also, what sizes need to be set in the hdpi and so forth? It seems that 920x740 is way to big of a picture for that folder and would be a memory hog.

I've not done any wallpapers apps, but typically, to do what you intend, you'd create a thread (class derived from java.lang.Runnable) with a simple loop and a wait timer (call Thread.sleep(). As the loop iterates, send a message to a class derived from android.os.Handler. In the handler, update your coordinates and refresh your view with view.invalidate().

What has it drop? I'm curious how you have your program realize it needs to drop down and then wrap around. All I understand is how to make it rotate around a set axis point.

bearcatext said:
What has it drop? I'm curious how you have your program realize it needs to drop down and then wrap around. All I understand is how to make it rotate around a set axis point.
Click to expand...
Click to collapse
You're thinking at too high level. There is no built in api for falling objects or animating bitmaps, you need to do it yourself.
The way I do it on my doom live wallpaper is to create a java object for each character or projectile I want to draw. The object contains variables for current x and y coordinates on screen and a method to update the position for a new frame.

That makes sense, that is what I was thinking on my drive home today that maybe all it was is setting the x or y coordinates and subtracting or adding depending on how you want it to look. Thanks for the response though I think this is the second time you've helped me out so I appreciate it.

Related

Horizontal seperator lines on Today screen…

Is there any way to get rid of them or to make them transparent?
Something I have tried time and time again to find out. There was a program called Pocket Facelift, which either got rid of them or cloned the today screen and superimposed an image over the top without the lines. I've searched for registry entries, hacks and cracks. Everything. Never been able to find it.
I still wish someone would produce a low memory footprint version of a screen that say the later Nokias and Samsungs have, where all the information about the phone is held in the corners (battery, SMS, signal, etc), leaving the rest of the screen for the picture (without lines).
Cheers
Ant
Anton.Valleyman said:
Something I have tried time and time again to find out. There was a program called Pocket Facelift, which either got rid of them or cloned the today screen and superimposed an image over the top without the lines. I've searched for registry entries, hacks and cracks. Everything. Never been able to find it.
I still wish someone would produce a low memory footprint version of a screen that say the later Nokias and Samsungs have, where all the information about the phone is held in the corners (battery, SMS, signal, etc), leaving the rest of the screen for the picture (without lines).
Cheers
Ant
Click to expand...
Click to collapse
Thanks...
Anton.Valleyman: when you say "low memory", I guess WDA is out of the question
I hadn't seen Facelift before. The page seems to suggest that Facelift may be a replacement Today plugin host:
Today screen scrolling is fully supported. The today screen plugins are resized in order to avoid covering information by the scroll bar.
Click to expand...
Click to collapse
Resizing Today plugins requires some messy coding or hosting plugins yourself. That might explain how they get rid of the seperator lines - if you host the plugins yourself, you obviously don't have to draw the lines... that's just a theory though!
still wish someone would produce a low memory footprint version of a screen that say the later Nokias and Samsungs have, where all the information about the phone is held in the corners (battery, SMS, signal, etc), leaving the rest of the screen for the picture (without lines).
Click to expand...
Click to collapse
My unreleased VJEphemeris is entirely skinnable, and I'm trying to design it around a thumb friendly design. I want to use the corners in the way you described... but your idea is a good one, a nice clean full screen today plugin just showing basics, operator logo and a wallpaper is a nice idea...
For the lines, I just suggest you choose a color similar to your background. I use a plain white wallpaper, so easy for me
It might be feasible to do some hairy hacking to subclass the today screen and intercept the line drawing function, but I don't recommend it as an easy solution :shock:
V

converter program (finger friendly) need suggestions

Hi wanted to create my first program..
right now Im trying to make a unit converter that is finger friendly..
so far I've tested it and here is what I have so far..
any suggestions? regarding the buttons positions, the interface, etc?
thanks
Hi Providense,
Looks good so far.
Do you have a development schedule as to what it will convert?
Keep it up.
John
Provedence,
It seems that some people like to have a configuration facility.
So perhaps some suggestions:-
Favorites so that the list can be tailored to favorites for that person to save a more compact list of 'things to convert'
I would be happy to have any theme for now but cooks may prefer to add there own theme.
I have used this type of function with calculator type programs but they can become unweildy so one that is specific would be usefull.
Thanks
John
thanks Johny1fin
as of now these are the things i've done
Temperature:
degree Celsius
degree Fahreheit
degree Rankine
degree Reaumur
kelvin
Acceleration: (still doing it right now)
centigal
centimeter/square second
decigal
decimeter/square second
dekameter/square second
foot/square second
g-unit(G)
gal
galileo
gn
grav
hectometer/square second
inch/square second
kilometer/hour second
kilomter/square second
meter/square second
mile/hour minute
mile/hour second
mile/square second
milligal
millimeter/square second
still a long way to go. But the Acceleration should be done by today.
Then I'll add Area, Date/Time and etc
I like the idea of favorites. I'll see if i can implement that. Im still a beginner at programming. Using VB.net 2003 right now
oh by the way. Here's the main menu, where I will put all the buttons
providence said:
Hi wanted to create my first program..
right now Im trying to make a unit converter that is finger friendly..
so far I've tested it and here is what I have so far..
any suggestions? regarding the buttons positions, the interface, etc?
thanks
Click to expand...
Click to collapse
Providence,
It may be a limitation of the APIs but could the vertical scroll buttons be next to each other horizontally rather than vertically as this may produce larger buttons?
John
Look nice.. however, on the finger friendly issue, you may want to avoid the scroll list (on your first screenshot) and have another screen for the choice of (say) different temperature units. Something like, making a screen (of your second shot) for temperature units. If you get what i'm trying to say
thanks for the feedbacks i've changed how the scrolling works. Now im using a custom button for that.
Looking good providence
I am not sure if you like this idea, but I think it will be more useful if you can add:
- Currency converter
- Currency quick view (to view several currencies at once)
There is an example of a very nice and complete project with source code here:
http://www.codeproject.com/netcf/PocketCurrency.asp
Add option to have automatic currency update as well
[ x ] Update when connected to ActiveSync
[ x ] Automatic update every X hours
hi, well the main idea was to create a finger based Unit conversion program. To add Currency Converter would be a challenge for myself.
Since first of all, Currency changes daily, so there must be a way to update it. Secondly, im still learning how to program by self teaching myself on my free time.
By the way, Here's the latest screenshot of the program.
I fixed the buttons so its easier to use.
unfortunately, this will only work on PDAphones and not on smartphones. Since you'll need to use the touch screen as input method.
Here is an idea, as mentioned by one of the post above, instead of stacking your scroll button up and down, it may save you that more space if you were to stack them left and right.
From what it seems, the < and > , are buttons, which you use it to 'affect' your lists. If you were to (example) sandwish your list in between these two buttons, you would save like another 2 button height. Example.
Currently, you have the layout
Code:
. item1 <
. item2
. item3 >
. item4
if you can just do this (which is possible in VC, not sure about VB), instead
Code:
< .item1 >
.item2
So, instead of 4 item height, you are now only left with 2 items height.
ahh i see..
I tried doing it
< item 1 >
item 2
but i find it harder to navigate, since when you go back you have to drag your finger across the other side of the screen. And while doing that, you are blocking the item list with your finger.
I dont need to save space, i think i got everything in there..
by the way, here's the test i took
then again, if i put them on the sides, it makes easier for those who are left handed as well
The spaces you save, may able you to bloat up the keypad below.. from what it seems, now they are on the 'flat' side of it.
If you think the "left-list-right" is not very finger friendly, you can try the "list-left-right"? That is
.item1 < >
.item2
Hi thanks for the suggestions..
right now here is what i have, and will probably be the final change in the button positioning..
i got big fingers and I can use them without stylus.
Should have a pre-alpha version ready soon. As of now I've done temperatures and acceleration.
Will add more soon

[REQ] Help to create text and walk app

I am looking for some help from the many people on here more talented than me, I have very basic programing skills but am hoping to learn more though this process.
The plan : Create an app for winmo that can do similar to this http://www.theregister.co.uk/2009/05/14/email_n_walk/ ideally for texting as well as email.
My ideas so far (very early stages):
1. Use the generic windows messaging screen and replace the white standard background with a transparent one, probably with shaded area for tx to make it readable, and call the camera app behind it.
2. Use the tf3d messaging screen and use something like MunBackground all tabs to again run the camera view instead of a static picture.
In an ideal world I would only like to use one of these methods meaning that text/email could be written with or without the camera app running.
I would appriciate any input and help with this, I am well aware this will be made more difficult with my lack of experience, but am hopful that the wealth of knowlege here can help.
Im sorry, i cant offer my help, but you have my support; this would be great, especially for wvga devices.
If I understanded, you want transparent screen to send messages?
I'd be willing to donate some money toward anyone who could create such an application.
I'm sure came across this before as an idea if i'm reading it correct, the problem being that when we walk we don't hold the phone up infront so we'd be viewing the floor infront of our feet
One way would be to take a picture every x ms and draw it and additional items like rectangles and text in the paint method of a panel control.
P.S.: How would it look like in manila? Remember this fake/bug live camera image in home screen?
bug description
stylez said:
I'm sure came across this before as an idea if i'm reading it correct, the problem being that when we walk we don't hold the phone up infront so we'd be viewing the floor infront of our feet
Click to expand...
Click to collapse
Possibly not completely upright, but maybe 45 deg, and would still stop you tripping over stuff!!
heliosdev said:
One way would be to take a picture every x ms and draw it and additional items like rectangles and text in the paint method of a panel control.
P.S.: How would it look like in manila? Remember this fake/bug live camera image in home screen?
bug description
Click to expand...
Click to collapse
In my head, it would ideally be a seperate way of opening/writing text/email to save battery life when not needed, and would probably be a video/camera image behind, with a semi transparent overlay/greyed out area where message text was typed to enable the text to be readable.
Will try out that diamond bug/fake

Screen size help

I am attempting to create a layout with two objects of different sizes, one of which will be bigger than the other, about 80% of the screen. The other object will be the remaining 20%. Obviously you cant use percentages in the XML layout to make these objects the right size. Is there a better way to create these objects(they will be some type of view with a background that is a shape drawable) so that i wont have to get the screen resolution from java and do the math in there?
Thanks for the help.. if i get any this time..
Come on some one has to know.. this issue is holding my development up, i cant really go any further until i got this figured out.
I think dips (density independent pixels) are what you want to use. The android dev guide covers them. I can't post a direct link yet because I'm waiting for my account to be verified but a google search for "android dip unit" should get you to the relevant documentation.
Let's say you are using a vertical linear layout. Get screen size, sets smaller objects height to .2* screen height and the others height to fill parent.
Sent from my Nexus One using XDA App
Thanks for the replies. I will retry dips, they didnt seem to come out the same on my G1 as the did on the Evo. But maybe i failed somewhere. If it comes down to it I will just have to use java to resize the screen.

[Q] How to have the same visual position for Portrait and landscape mode

Dear users,
I am writing an app right now, which puts a floating window on top of every thing.
The only problem is, when i rotate the screen to landscape, the position of the window is all messed up.
If the position is here in portrait:
__________
|"-x-----------"|
|"--------------"|
|"--------------"|
|"--------------"|
|"--------------"|
__________
The position will be like this in landscape:
_______________
|"---------x------------"|
|"-----------------------"|
|"-----------------------"|
_______________
And the position needs to be like this:
_______________
|"-x--------------------"|
|"-----------------------"|
|"-----------------------"|
_______________
There is one thing i forgot to mention above:
The position of the window is fully dynamic, that means that the user can reposition the window when he or she wants too.
I really hope someone can help me out with this issue!
Thank you in advance,
Tim
well i would make a separate layout xml in folder layout-land then everything looks like you want it
That's impossible since the position of the window is set programmatically, and there is no way to set it using XML
tim687 said:
That's impossible since the position of the window is set programmatically, and there is no way to set it using XML
Click to expand...
Click to collapse
Then save the view's coordinates as floats relative to the screen width/height instead of dp or pixels and restore that position after the rotation (you only need to multiply it by screen height/width). Like so:
Java:
float posX = getX()/screenWidth;
float posY = getY()/screenHeight;

Categories

Resources