A simple navigation drawer in Sketchware

In the latest version of Sketchware (v3.0.0), appcompat-v7 and design have been added, and we can now add a navigation drawer to our project. This navigation drawer uses a CustomView drawer_main.xml.

In order to create a Navigation drawer, follow the steps given below.

1. In your Sketchware android project, go to Library manager and switch on AppCompat and Design.
2. In View manager, go to MainActivity.java and select Navigation Drawer Activity.

3. Now go to the CustomView drawer_main and add a LinearV linear1. Set it's width as MATCH_PARENT.

4. Add items in the linear1 of drawer_main and customize it to change it's look.


5. Create a new Intent component i.

6. Now in the EVENT area, under section drawer, add the events you want to execute (like textview2 onClick, textview3 onClick, etc.).

7. Add codes to be executed in each of these events.

8. Save and run the project.


Comments

  1. Wow... this is big big big big help

    ReplyDelete
  2. why in my sketchware, it did not work, and instead came out words like this > android.support cannot be resolve to a type

    is there something wrong?

    ReplyDelete
    Replies
    1. It works only in Firebase apps

      Delete
    2. Sorry, I forgot,
      But when I made it in firebase app, when I run the app, nothing happened.
      can you make a video tutorial?

      Delete
  3. Android.support is not supported

    ReplyDelete
    Replies
    1. Add the Component Firebase DB or Firebase Auth. This adds the necessary plugin

      Delete
  4. How open new screen using this post

    ReplyDelete
  5. How open new screen using this post

    ReplyDelete
  6. For those who have errors on android.support... , I also have the same error before, try to change the location of navigation drawer to Main.xml, I don't know other way but I hope it can solve the problem :)

    ReplyDelete
  7. Hello, This code is my Crash App. When I add only the code, it works normally. but when I add a webview widget it crashes and I can not use it anymore, can you fix it? I need the webview to run in the background of the app and I also need the menu

    ReplyDelete
    Replies
    1. Try putting this code in the beginning of onCreate, before webview loadUrl. Also try this for using CustomView in drawer: http://www.sketchwarehelp.com/2018/02/navigation-drawer-using-customview-in.html?m=1

      Delete
    2. This comment has been removed by the author.

      Delete
    3. In this url, there are no content

      Delete
  8. is there no way of doing a navigation tab without firebase

    ReplyDelete
  9. Thanks. But i am finding custom view for the listview

    ReplyDelete
  10. How to change the background color for the list items and fire the navigation drawer.

    ReplyDelete
  11. Wie griege ich es hin das der Drawer per Knopfdruck geƶffnet wird???

    ReplyDelete
  12. How can i do transparent collar statusbar in navigation drawer on sketchware???

    ReplyDelete
  13. How to add images in drawer page and how to change it with
    ImageView..........set Image from url?
    And also textview....... settext

    ReplyDelete
  14. Very nice broo
    Thanx for solving my problem!

    ReplyDelete
  15. It doesn't work on Samsung s9 plus. I created 2 buttons one on main and one in drawer. In main working ok I drawer nothing happens. The button doesn't send to other activity.

    ReplyDelete
  16. I need to create an application with 5 pages and in each page I need a Drawer to navigate to the other pages. But every fricking time that I try to add 3 or more pages with a drawer when I try to run the app the Sketchware returns me an error message and show me a compile log only with "[]" inside... HELP PLEASE!

    ReplyDelete
    Replies
    1. Just use the intent "ACTION_VIEW" and select the page you want and start activity

      Delete
  17. How can I load information onto a drawer from oncreate

    ReplyDelete
  18. Bro i have done everything but when i run my file it doesn't install.
    It says>
    Ereor: resourse directory'/storage/emulated/0/.sketchware/libs/android.support.compat/support-design/27.0.2/res'does not exist....

    Please tell me bro what does it mean and how to solve it

    ReplyDelete
  19. Dear,

    Please guide how to prevent drawer from clicking background (main) activity?

    ReplyDelete
  20. Is there a way to hide An linear
    In drawer and change text of text view

    ReplyDelete
  21. This comment has been removed by the author.

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. Thanks! One question tho. I want to use the same drawer for multiple different pages but I don't know how. I was looking for a solution, but couldn't find one. Could you help me?

    ReplyDelete

Post a Comment

Popular posts from this blog

Create Music Player app in Sketchware

A Flash Light App in Sketchware

Admob rewarded video Ads in Sketchware

Simple car racing android game in Sketchware

Firebase auth in Sketchware for Login Activity