Posts

Showing posts with the label Navigation drawer in Sketchware

Add ListView to Navigation drawer

Image
In the latest version of Sketchware (v2.2.2), appcompat-v7 and design have been added, and we can now add a navigation drawer to our project. This navigation drawer uses a CustomView. But the CustomView in Sketchware doesn't have option to add a ListView. In order to add a ListView to the drawer, we have to create the ListView programmatically and then add it to the drawer. To know how it can be done 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. Create a new String list mylist . 5. Create a new Intent component i . 6. Now suppose you have five other activities SettingsActivity.java , NotesActivity.java , FeedbackActivity.java , PrivacyActivity.java , and AboutActivity.java . Add a w...

A simple navigation drawer in Sketchware

Image
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.