So you have an image that you want to use as a background on one of your activities.
You probably have something that looks like this.
But the desired effect is to scale the original image into the blue outline below.
The actual effect (depending on your current layout) is the graphic anchored to the top left (android:scaleType=”fitStart”) or center (android:scaleType=”fitCenter”) of the device’s screen with no scaling performed. Through all of your research on Google (directing you mostly to Stack Overflow threads) you’re stuck with a non-scaling graphic that’s positioned incorrectly on the screen. Or maybe you’ve got a distorted graphic that has stretched both in length and width and looks terrible. The short answer?
You can not scale the width of an ImageView to the screen’s resolution while maintaining aspect ratio in an Android layout using only XML.
That’s the information I got from one of the random Stack Overflows I found. And I ignored it for quite a while before giving in and trying to scale the image manually through code.
I finally figured out how to record video on my computer (no audio). So here’s a session of Squishy Bugs, in case you’ve wanted to see it in action before downloading and playing this relatively small in file-size and free game.
December 24 (12 hours or so from now) you can get your hands on the Squishy Bugs beta. I’m presently testing the beta making sure all of the features are in place and that everything is working. It has been a long time in the making. 1 year ago tomorrow I released the very first version of the game. It wasn’t pretty and I probably “shot myself in the foot” by releasing the game in such an early unfinished state. If I can find some screenshots I’ll edit this post and put them below this paragraph.
Shoot forward ~365 days, now I have no problem calling the game done. You’ll get to play the beta, I’ll continue testing for a few days after the beta release, then I’ll release version 1.0 on my birthday! I turn 29 on December 29.
That image above is the “big feature” of this next update. You can now share your high scores to Twitter and Facebook directly from within the game. I wouldn’t call coding that feature “game development” but I think it’s a necessary addition to the game. There was a lot of programming external to the actual game that was required in making Squishy Bugs.
The biggest Squishy Bugs related project being the WaggSoft api and accompanying Squishy Bugs high score list. Developing those server side features was a lot of work but the bright side is those features will be used in my future games. I don’t need to code them again. They’re done, which will speed up development of my next game(s).
So please, if you have an Android device, give Squishy Bugs a try. It’s free. It’s ad-supported. I make pennies from it per month so I’m not getting rich off this. Tell your friends. When the beta and version 1 are released please make use of the Twitter and/or Facebook sharing feature at least once.
The end is near! There’s some quote out there that sums it up and I wish I could link to it but my Google-Fu is not with me tonight. Paraphrasing:
The goal is not to add features but to remove as many as
possible while still retaining the essence of the game.
Something like that. I cut a few features that were already implemented, and axed a couple that I was planning to add but really didn’t contribute to the game. And I added a few features that I felt did contribute to the game.
What was cut? The “group drop” power ups. That includes the “color dropper” and the “icon dropper”. What do those do, you ask? Exactly. They were confusing while playing, even to me.
Color Dropper
When you activated this power up, any time the ball hit a tile all of the similarly colored tiles adjacent to it would fall as a group.