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
Смотрите видео Right Drawer with Animation in sketchware pro tutorial 108 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Pixelhub Technical 27 Февраль 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 991 раз и оно понравилось 39 людям.