Hello everyone. I want to make a splash screen for my game. I need the image to fit the screen's width but I want the height to be larger than the screen's. Than, I will have an animation moving the image vertically, hiding the top part and showing the bottom one.
I have searched a lot and I am more puzzled now on how I should do this.
Firstly the only solution I found for the fitting part was a combination of java and xml. But the problem here is that the java class doesn't produce a bigger than the screen image, but a cropped image. So, I can't make the animation later on.
Than i figured out that I could use a scrollview. And after combining some solutions I found on the web, I managed to have the right dimensions for my image and avoid any cropping. But now I can't do the animation because I am using the "fromYDelta ... toYDelta" and I can't find a way to calculate how much to put in the "toYDelta" value. And it cannot be a fixed value because every screen is different and so the dimensions of my splash screen.
Can anyone tell me a way to do this? Should I do it only in java and don't use xml at all? Or is it possible to do this through xml only (which would be better I think)?
Related
I've recently been playing around with my today backgrounds, however, they are never as clear as the original picture.
I used someones .cab theme with a new background and the image was very clear, but when I just change the standard themes background to a different image, it loses it's clarity.
Whats up with this and is there a way to fix it?
Also, how do I get .exe programs to load on my unit. The only files I can get to install are cab files.
Thanks
Is the image the correct resolution?
If not, it will stretch or shrink it, and that's a quick and dirty operation on the today screen rather than being done with something like photoshop where it would calculate the pixel mapping of the resized image to give better quality.
actually..
I believe what he is talking about occurs only when selecting an individual image as the background wallpaper and it appears with what looks like a somewhat transparent "white haze". I have not figured out what causes this, and the only way to "fix" it would be to use a theme generator with the image you want as the background. If done this way, the image looks fine. This has nothing to do with aspect ratio distortion.
Hey guys I'm new here i have tried looking on the web to solve my problem but no luck...is there a way to fit pictures you transferred from your computer to fit the HD2 screen.
You could use an editing program such as Photoshop or Gimp to resize your pics to the right resolution. Photbucket can resize as well.
480x800 for portrait, or 800x480 for landscape
If what you're trying to do is get the image to also cover the taskbar and softkey bar (top and bottom of the screen), you'll need a tool such as CHT to work that magic for you.
I just used Paint.
Use the wallpaper.hellaphone. com/phone/HTC_HD2 to resize your images. Cheer
Thanks ill try them out and get back to you guys
Best free image editing program EVER is paint.net. Nuff said.
Thanks they all worked but I went with paint.
ok developed an app and just decided to use images for buttons.
Made a nice glossy button in photoshop, added to my app and put it on my HTC HD 2 for a test.
Why does the image not look as smooth? like I can see the blend/gradient lines.
Does the dpi have any effect and bit depth? Image was made at 72dpi
Cheers
DPI only comes into play if you print your image. Bit depth might make a difference. I don't know offhand the color bit depth of the HD2's display, but if it isn't the same as your computer's display, your buttons will look different.
yep its the colour depth. PC, i'm using 32bpp where as most phones are at 16bpp.
What language is the pictures being used in? Recently I've found out that C# uses Bilinear image resizing, which means it inserts estimated pixels in with the image when resizing.
Try the following:
1) save the image as a 24 or 32 bit png
2) make the image the same size as the button
I'm using c# and I'm not resizing the image at all.
The other thing i have noted is that if I add a picturebox to my app and set the image to the same one I'm using for my button, again I make sure I display the image at its actual size, it looks better than what it does for the button.
Why is that?
Same image, displayed at actual size looks, better in a picturebox than it does in my custom control?
I am pretty new into android development and have a couple questions I'm sure you guys can answer pretty quickly but have so far not been able to figure out. How do I have a set background in a live wallpaper besides just creating something from canvas, I have it already loaded in the hdpi I just need to figure out how to call it. Also, is it possible to have something appear enlarge a little bit in the center of the screen then fall off the screen? I'm trying to create a time lapse of a tree where it goes through all the weather changes. Any sites you could link me too or answers you would have would be greatly appreciated. Thanks for anything you guys are able to do.
Can you be more specific? When you say background are you talking about an image file you've added as a drawable?
If you use the drawBitmap method you can draw images anywhere on a canvas.
This is roughly how I do it on my Live Wallpapers.
Code:
Bitmap background = BitmapFactory.decodeResource(getResources(), R.drawable.background);
c.drawBitmap(background, 0, 0, null);
That will draw the bitmap at the upper left most position on your canvas.
If you want your live wallpaper to slide left and right as you swipe between home screens you need to adjust the x position based on the offset. Look at the cube live wallpaper source code for more information on how to get the offset value.
What I have is a picture loaded in the hdpi file that I want to use as my background, the thing with the cube is it shows you how to draw a picture but not add one into it. I want to load in the photo and then have objects enlarge and drop down around the center of this picture. The design I'm going for is a time lapse of a tree. I was told surfaceView can set your background but I'm not sure if that's the case or not. Thanks for the reply though I appreciate it.
bearcatext said:
the thing with the cube is it shows you how to draw a picture but not add one into it.
Click to expand...
Click to collapse
It works exactly the same but instead of using c.drawLine() you use c.drawBitmap()
That makes a lot of sense thanks, and for the leaves falling would you just set the coordinates to somewhere in the middle then? Also, is there a way to have an image change color mid-screen so it looks like fall is hitting? Thanks for all your help again though.
I was wondering if anyone could help me out with a wallpaper issue I am having. I downloaded some 960x540 (or 540x960) wallpaper images and when I try to set them as the wallpaper using the stock ROM's cropping tool, the cropping tool displays the wallpaper image very large so that you are only able to crop a small portion of it to use as the background. I am wondering why it should not just be able to crop the entire image because it is the exact same size as the screen? Another strange thing I found was that sometimes I use Zedge to download wallpaper and they are not the correct size of the display and are usually larger (i.e. 800x480), but they show up smaller in the crop tool and I am able to crop a larger portion of them. Can anyone tell me how to resolve this? For now I am using an app called Wallpaper Changer which witll set the wallpaper to fit the screen exactly, but I kind of didn't want to have another app running for this. Thank you in advance!
I would l like some info on this too. Same issue here. Downloading correct resolution image but only able to display a chunk of it.
Sent from my XT907 using xda app-developers app
This is actually the Android OS's fault. Because Android is made to work in both Portrait and on Landscape (even if your launcher locks orientation), selling the wallpaper will encompass both. I ran into this problem myself when I went to make my own wallpaper. The easiest solution is to find a square image, preferably 960x960 or larger. I've included the wallpaper I made and how it looks on my phone.