In android how to swipe screens with image buttons? - android

I want to create an android application..Where I have 3 xml files. 1st one is the splash screen, 2nd one describes the overview third one is the about me..
My requirement is in the page there will be three circles in the bottom for 3 screens.
when i click to a screen(swipe) it will go to another screen and one of the circle will fill up a colour.other wise
it will blank..
Actually I want like :--- This image
This image has 5 circles for 5 screens..if we are in page3 then 3rd no circle will fill up a colour others will empty..
Please give me some suggestion..how can I do that????

You can use the ViewPager to swipe and for circle indictor you can use the image views with selectors background and manage this in onPageChangeListener.
One of the best and standard solution/example you can find here :
http://developer.android.com/training/animation/screen-slide.html
I have used this and working fine. please let me know if you are having any further issue.
For main screen xml You have to use FrameLayout as the images(circle indicators) will be on the top of the screens.

Related

View pager android with single background picture

Is it possible to have one picture as a panorama background of a viewpager, without having to cut the image into 3 and put each of the 3 images as a background for each of the different views?
Like the home screen of android.
You want a horzontal Parallax .
this library should to the trick, or at least get you on track.

Android varied image position alignment in single layout

I am creating a game with circular buttons. I am thinking about a strategy that allows me to display variety of buttons in variety of positions in the same screen in an efficient way.
Like,
Sample images:
Image 1: 1 button
Image 4: 4 Buttons
The game works on seconds and I want the images to be changing so smoothly and should not take much time for transition. My ideas to implement this are below. Please advise me the best way to achieve this.
Use Grid view and populate items as required.
Use Open GL to display buttons.
Use a fragment and assign layouts as required.
Any other perfect way you suggest.
Note: I don't use strips to animate. All I want to do is just to do some calculation according to which button the player picks to click. And my concerns are,
1. Quick and smooth transition of layouts.
please guide me to pick the right path.
Thanks,
Karthick.

How can I create a Horizontal Image Gallery

I am trying to create a horizontal like image gallery on one of my activities. I want it to take up about 1/4 of the screen and when you swipe left or right it'll go to the next image. Also over the bottom portion of the image there is an indicator showing you where you are in the list of images. Similar to what was done in these apps:
I can't seem to find out how to create this in android. I'm hoping someone out there has an idea and can point me in the right direction or to a tutorial.
Have you taken a look at ViewPagerIndicator?

how to design this UI in android app

i am trying to create the following UI in android app
In the above image all the five are to be image buttons. How to design this UI as like in the screen shot please help me friends....
Inside LinearLayout take RelativeLayout and make it centrally aligned.Then
Take first image Near me and set it's property.
Now take the second image Explore and set it to right of first image.
Place third image My network and place it below first image.
Fourth image Live set this to right of third image and and below second image.
Now center aligned your center image.
You will need to create 5 images, each of which has transparent areas. This layout type lets you position elements relative to the layout group itself, as well as to items within the group.
I'm not very familiar with Android advanced layout design, but the common layout objects give an idea:
There is a SurfaceView which gives you the ability to manipulate z-coördinates. In the SurfaceView you can then place a Grid/Relative/TableLayout for the 4 buttons (which you pre-render as rectangular images with transparency) and a simple Layout which centers and only contains the middle button.
If you then set the Z value of the first layout to less than that of the second you will get the view you want.

Need help to scroll images

I need to display some images which can be scrolled horizontally. Only one image should be visible on the screen. It should be like iphone screen, which has multiple 4 or more screen and display the items per screen and shows how many screens left as small circles at the bottom. Like that I have show the small circles as many as the images. I tried GestureListener, but it scroll only a single image. Any suggestions pls..
You might want to take a look at android.widget.AdapterView and android.widget.Gallery: These are standard Android widgets that provide scrolling through images. However, this will not look like the UI you describe (iOS look&feel) but like an Android app...
See this example code:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/Gallery1.html

Categories

Resources