Right Drawer with Animation in sketchware pro tutorial 108

Published: 27 February 2022
on channel: Pixelhub Technical
991
39

Hello everyone, In this tutorial you will learn how to make right drawer in sketchware pro in simplest method. We will use original drawer and will just change the position from left to right by modifying Navigation Drawer in AppCompat Injection. Then we will change GravityCompat.START to GravityCompat.END by using command block in onCreate.
When we change the drawer position then original ActionBarDrawerToggle do not work and make crashes so we now we will define NavigationOnClickListener with our own function.
The last one, As a guy requested to add animation just like tutorial number 000 So we will same code but will change the slideX value in minus.
We have all done. watch the video for implementation. Thank you.

Helping Material:

onCreate:

ActionBarDrawerToggle Listener:

_toolbar.setNavigationOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {

//define drawer option/close condition

}});

Drawer Sliding Animation:

_drawer.setScrimColor(Color.TRANSPARENT);
ActionBarDrawerToggle _toggle = new ActionBarDrawerToggle(this, _drawer, R.string.app_name, R.string.app_name) {

@Override
public void onDrawerSlide(View drawerView, float slideOffset) {

super.onDrawerSlide(drawerView, slideOffset);
float slideX = drawerView.getWidth() * slideOffset;
_coordinator.setTranslationX(slideX);
}
};
_drawer.addDrawerListener(_toggle);

Thanks for watching the video
Like, share and Subscribe to support my work.

Visit : https://projectware.blogspot.com


Watch video Right Drawer with Animation in sketchware pro tutorial 108 online without registration, duration hours minute second in high quality. This video was added by user Pixelhub Technical 27 February 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 991 once and liked it 39 people.