aspose file tools*
The moose likes Android and the fly likes Help in configuring Multiple Screens Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Help in configuring Multiple Screens" Watch "Help in configuring Multiple Screens" New topic
Author

Help in configuring Multiple Screens

zoheb hassan
Ranch Hand

Joined: Apr 01, 2009
Posts: 153

Hello guys i am working on application and i want to have screens similar to those that an android home screen has or the angry birds screen where an horizontal flick will move you to next screen and there is a dot below that moves by one step.I want to know what that view or Layout is called and how can it be implemented also i wanted to know how to add a crystal glosss look to the gallery items.Any help or article on this will be a big help

Thanks,
Zoheb
Bill Mote
Ranch Hand

Joined: Feb 04, 2010
Posts: 44
I would be interested in an answer to this as well. You can use a view flipper to move between different activities in a similar way.

Bill Mote
Dave MacLean
author
Ranch Hand

Joined: May 10, 2011
Posts: 49

Is this for tablets or for smartphones? Android 3.0 introduced a whole new animation capability, and also makes it easy to do animations with fragments. But of course this isn't available on the older phones. Bill's suggestion of ViewFlipper is a good one. There's sample code in this stackoverflow post:

http://stackoverflow.com/questions/3928488/how-can-i-create-a-sliding-layout-like-the-main-android-menu

I haven't tried this personally so I can't vouch for it. You have some other options. The Home screen of Android is itself an application, and is actually available as a sample app on the Android Developer's site:

http://developer.android.com/resources/samples/Home/index.html

This is rather old code however but may help you understand how to do what you want to do. The other place to look for existing source code is within the Android source itself. This is a treasure trove of useful information, as we've often dug into it to figure out how something works.

As to your second question, I'm not sure I understand. What's a crystal gloss look? Are you talking about image manipulation? Or how images are arranged in the layout?

- dave

Dave MacLean our book (Pro Android 4)
zoheb hassan
Ranch Hand

Joined: Apr 01, 2009
Posts: 153

Hi dave i want to display items in my application in a way similar to this, You have a default display screen on the application start up and when the user flicks it moves to screen2 displaying the second item, Now moving to my second question i wanted to give each item displayed an padding where the border has kind of crystal transparent look



[Thumbnail for screen1.png]


[Thumbnail for screen2.png]

Dave MacLean
author
Ranch Hand

Joined: May 10, 2011
Posts: 49

I'm still not sure I'm fully understanding the crystal gloss part, but I think you should definitely explore the ViewFlipper class in Android to do the swiping part of your app. For the crystal gloss part, I think you would just manipulate your image sources to have whatever look you want it to have. I don't see the value in trying to manipulate the images at runtime.

- dave
zoheb hassan
Ranch Hand

Joined: Apr 01, 2009
Posts: 153

Yes i will definitely look at the ViewFlipper actually was considering it but thanks for the help

Zoheb
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help in configuring Multiple Screens