0

So I've thought of an idea to update my app, but I have no idea how to implement this feature in codes.

It's not a new one actually. You can see it in Evernote and Dolphin Browser. When the user slides the view, the current view will be covered partially, and a new view of options will be the active one. Here's a video: http://www.youtube.com/watch?v=Ag_IGEgAa9M It's at the very start.

You don't need to give me the specific codes, just the general ideas and which classes to use are fine. Thanks in advance!

minmax19
  • 38
  • 4
  • search for Sandroid slidingdrawer example and see this [link](http://stackoverflow.com/questions/11863343/making-a-slidable-view-from-top-to-down-similar-to-the-one-in-android) – MAC Aug 21 '12 at 11:54

2 Answers2

0

Here is a similar question. Also Cyril Mottier's blog on the fly-in menu gives an elaborate idea of the implementation.

Community
  • 1
  • 1
Ragunath Jawahar
  • 19,513
  • 22
  • 110
  • 155
0

check his code i think this will help you a little bit atleast

Boolean bol=false;// to check wether the view is vissible or not //set the view you want to animate here i hav set it to vv

initiate it on mouse movment according to yor wish

if (bol) {

                         vv.setAnimation(inFromLeftAnimation());
                          vv.setVisibility(vv.VISIBLE);
                    } else {
                        vv.setAnimation(outToLeftAnimation());


                        vv.setVisibility(vv.GONE);
                    }
                bol = !bol;

                }

this is the animating portion

 public static Animation inFromLeftAnimation() {
     Animation inFromLeft = new TranslateAnimation(
     Animation.RELATIVE_TO_PARENT,  -1.0f, Animation.RELATIVE_TO_PARENT,  0.0f,
     Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
     );
     inFromLeft.setDuration(350);
     inFromLeft.setInterpolator(new AccelerateInterpolator());
     return inFromLeft;
     }
public static Animation outToLeftAnimation() {
    Animation outtoLeft = new TranslateAnimation(
     Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,  -1.0f,
     Animation.RELATIVE_TO_PARENT,  0.0f, Animation.RELATIVE_TO_PARENT,   0.0f
    );
    outtoLeft.setDuration(350);
    outtoLeft.setInterpolator(new AccelerateInterpolator());
    return outtoLeft;
    }

this is not the best method or you can try editing the sliding drawer

Athul Harikumar
  • 2,501
  • 18
  • 16