Layout Swiping in Android with fixed button, How to? -
i having great trouble implement layout swiping ui. here show how each layout works. first layout
my second layout
my third layout
how works: user can move 1 page touching screen , indicator move layout or page move. sign in , sign button fixed in there position. how can implement type of ui.
this can done using viewflipper there trick using whole layout.
use framelayout
having buttons settled down gravity set bottom
note framelayout works stack lifo things(widgets/layouts) placed @ last superimpose ones place above them in xml
like example
//so here view shows s2 , below s1.....
so in layout s2 buttons gravity bottom s1 -should viewflipper ...
swipping
swipping can acheived using ontouch event
- swipe left
when touch down gives position(x1,y1) , ontouchup (x2,y2) check if(x2>x1) use viewflipper.setinanimation(animation) viewflipper.setoutanimation(animation)--for ui gone
swipe right if (x2<x1)
viewflipper.setinanimation(animation) viewflipper.setoutanimation(animation)
Comments
Post a Comment