Lets do something challanging. I have seen this animation for navigation Drawer :
and I would like to implement this as it is a great effect. I tried to get the effect by creating a custom view and on touch i am getting at least 50% similar effect. i would like to implement my ondraw() and ontouch() methods from my custom view to navigation view. How is that done? Any one have any clue? Can anyone give any link which has simlar stuff.
I have tried this :
public class CustomNavigation extends DrawerLayout {
public CustomNavigation(Context context) {
super(context);
}
public CustomNavigation(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CustomNavigation(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
// invalidate();
}
public void start()
{
this.invalidate();
Log.d("Parth", "start");
}
@Override
public void onDraw(Canvas c) {
Log.d("Parth", "ondraw");
// super.onDraw(c);
}
}
The on draw method isn't called. why is that so?
from the main activity i make an object of the class above and call the start method like this :
CustomNavigation drawer = (CustomNavigation) findViewById(R.id.drawer_layout);
drawer.start();
and this is just the initial stuff, i also want to implement these :