{"id":1452,"date":"2024-12-13T09:39:32","date_gmt":"2024-12-13T04:39:32","guid":{"rendered":"https:\/\/obsidianeducation.wordpress.com\/?page_id=1452"},"modified":"2025-01-01T07:38:34","modified_gmt":"2025-01-01T07:38:34","slug":"how-to-add-sidebar-in-mit-app-inventor-no-extension-sidebar-navigation-menu-in-mit-app-inventor","status":"publish","type":"page","link":"https:\/\/obsidiansofteducation.com\/index.php\/how-to-add-sidebar-in-mit-app-inventor-no-extension-sidebar-navigation-menu-in-mit-app-inventor\/","title":{"rendered":"How to Add Sidebar in MIT App Inventor (No Extension) | Sidebar Navigation Menu in MIT App Inventor"},"content":{"rendered":"\n<p>Hello friends and welcome to Obsidian Soft,<\/p>\n\n\n\n<p>Today, I will teach you how to make a simple sidebar menu for navigation without extensions. I don\u2019t like relying on them too much, as these extensions might become outdated, and most importantly, you can\u2019t test them on iPhones.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/sidebar-navigation.png\" alt=\"\" class=\"wp-image-1454\" style=\"width:645px;height:auto\"\/><\/figure>\n\n\n\n<p>So, let\u2019s begin:<\/p>\n\n\n\n<p>Start a new project in MIT App Inventor. Name it to Sidebar. Keep the toolkit: default (very important). Press OK.<\/p>\n\n\n\n<p>Turn off the title bar as we will make a title bar ourselves with a button to open up the navigation menu or sidebar.<\/p>\n\n\n\n<p>Now, add a horizontal arrangement from the layouts. Make align horizontal left in its properties. And color: blue. Make its width fill parent and height 10 pixels. Drag and drop a list picker from the user interface inside this horizontal arrangement. I will upload media for the menu button image that I got from Flaticon.&nbsp;<\/p>\n\n\n\n<p><a href=\"https:\/\/www.flaticon.com\/free-icon\/hamburger_5372882?term=menu&amp;related_id=5372882\" target=\"_blank\" rel=\"noopener\">https:\/\/www.flaticon.com\/free-icon\/hamburger_5372882?term=menu&amp;related_id=5372882<\/a><\/p>\n\n\n\n<p>Make sure that you choose 64-pixels version for downloading.<\/p>\n\n\n\n<p>In the list picker\u2019s properties, choose the image that you uploaded. Make height and width 55 pixels for the list picker.<\/p>\n\n\n\n<p>We will be using the concept of virtual screens.&nbsp;<\/p>\n\n\n\n<p>Virtual screens mean more than one full-screen layout on a screen such as screen 1 and we show only one of them at one time. They are faster than separate screens as you will notice that the loading time of separate screens is much slower. Also, it is easier to pass data between two screens as you are technically on the same screen.<\/p>\n\n\n\n<p>So, let\u2019s add 3 virtual screens:<\/p>\n\n\n\n<p>Add a vertical arrangement. Rename it to memberScreen. Make height and width fill parent. And make background-color: white<\/p>\n\n\n\n<p>Add a label: and change the text to \u201cAdd Member Screen\u201d. You can add all the components of your Add Member screen just like this label but make sure that they are inside this vertical arrangement called memberScreen.<\/p>\n\n\n\n<p>Now, select this memberScreen and duplicate by pressing <strong>Ctrl + C and Ctrl + V on the keyboard for Windows OR Command + C and Command + V on the keyboard for MacOS.<\/strong><\/p>\n\n\n\n<p>Rename to bookScreen and change the text to \u201cAdd Book Screen\u201d.<\/p>\n\n\n\n<p>Duplicate one more time. Rename it to searchScreen and change the text to \u201cSearch books\u201d. Now, turn off the visible checkbox for all screens except the memberScreen.<\/p>\n\n\n\n<p>You can add as many screens as you want.<\/p>\n\n\n\n<p>Now, let\u2019s go to the blocks section. Add a global list variable for menu items and another list for our virtual screens. You will understand why I am making a list for our virtual screens later.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/AD_4nXd1SHYjEtC0ZKdKh2Qu9GBidI0cdobZ-dlLB3ARKnRmNLWscfIQfwVo1GmDRYBzDaydQ_6YqfSmoa41WTWrrZYIAUSGI9WFr2XshD3DsyJM55rpES-H6sOcd3x0jWozir6UYsOTcD41FEpbhZGlRl4Hpm9AkeytIZr1K0IiCL_i6qlEXjUsA.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/AD_4nXel9BVZqoMaPPuzuAzlHsoMQQaFdWiCn2CRR3S-iSNlYN9BQkT3Hnu71vTQZvTlr-RMPtsr-Dq57ctHSjnZPz0f6KZKIg5aWzsoU2hyoRDMDnbN3hNFWxgUZi0v_WChFqriPyHg9Xlp6zY_J4Vqtu5J8NLVkeytIZr1K0IiCL_i6qlEXjUsA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>In screen1\u2019s initialize event, add three text blocks to the menu items with appropriate text for your menu and then, set this list to the listpicker.Elements.<\/p>\n\n\n\n<p>Also, add all your virtual screens to your screens list.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/AD_4nXdEWOVqyqrnlDP0cpFHI1lnWlCDU2jb3MXrlvv2vyp7VoN5B2R3v-mqF3aUr5fPylGKEPC6nJ2qxpPCVE8oFbURgl7buvoPttB1UU-hxmaIe14pztf0VZ2gSHLpeb5uWk9JgEQowmRr4OX6yKhTu3HBJgUkeytIZr1K0IiCL_i6qlEXjUsA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now, whenever the user clicks on the list picker, our menu will open up with our 3 items. When the user selects any of these items, the list picker\u2019s after-picking event will be triggered. In this event, first make all your screens invisible by using a for loop and any component block. This is the reason why I made a list of our virtual screens i.e. vertical arrangements.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" height=\"170\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/AD_4nXeaH9k2FcmpOnVXe9pEUuOzurdsWubbw8y0BEHAwGWhOKnHQSOEIt7Ra3kcB9fYuJTQO66h8RdbeuTG72zWABhzJodrMCTYoTMKsLy4Ylu65fJaOsIDGPvetuAtMFkyiPv_ZEkA-d8uLeBGTkBg7IVbyHeVkeytIZr1K0IiCL_i6qlEXjUsA.png\" width=\"464\"><br>Next, just use a control <strong>if then else if then else <\/strong>block after the for loop block to see what the list picker\u2019s selection is equal to and make the correct layout visible. Now, you don\u2019t have to worry about other screens and making them invisible.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/AD_4nXfuINNFVv9ThmuDriyFnRIWUnOkGFa6r1_4yka1RJr-oGEzwMrrUIZTuO-zw-niKvU0RY-DsssT5Bq32Juc06x7lYx7NTaXvRKXsrkz9V42ouAvECP_sCCeZmeqry8hmaIt8Qkpfz1XJ4ycIwna7Y1LutV6keytIZr1K0IiCL_i6qlEXjUsA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>This simple but elegant solution for navigation is complete. I hope you like my easy version of side bar without using extensions that you can even use on iPhones.<\/p>\n\n\n\n<p><strong>Happy Coding!<\/strong><\/p>\n\n\n\n<p>You can also have a look at the video tutorial for this app:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<p class=\"responsive-video-wrap clr\"><iframe loading=\"lazy\" title=\"How to Add Sidebar in MIT App Inventor  (No Extension) | Sidebar Navigation Menu in MIT App Inventor\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/p0qTCSjLdAo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<\/div><\/figure>\n\n\n\n<p>Please like my videos and share them with your friends and family. Also, subscribe to my channel and press the bell icon so you don&#8217;t miss any of the great projects I have planned for you.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.youtube.com\/c\/obsidiansofteducation\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/c\/obsidiansofteducation<\/a><\/p>\n\n\n\n<p>Please like my social media pages for more educational resources and tips.<\/p>\n\n\n\n<p>Facebook:<a href=\"https:\/\/www.blogger.com\/blog\/page\/edit\/4947000819484484884\/7140650632339107612#\" target=\"_blank\" rel=\"noopener\">&nbsp;https:\/\/www.facebook.com\/ObsidianSoft\/<\/a><\/p>\n\n\n\n<p>Instagram:<a href=\"https:\/\/www.blogger.com\/blog\/page\/edit\/4947000819484484884\/7140650632339107612#\" target=\"_blank\" rel=\"noopener\">&nbsp;https:\/\/www.instagram.com\/obsidiansoftapps\/<\/a><\/p>\n\n\n\n<p>Pinterest:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-pinterest wp-block-embed-pinterest\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oceanwp-oembed-wrap clr\"><iframe loading=\"lazy\" title=\"Obsidian Soft\" src=\"https:\/\/assets.pinterest.com\/ext\/embed.html?grid=obsidiansoft&#038;src=oembed\" height=\"900\" width=\"450\" frameborder=\"0\" scrolling=\"no\" ><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<p>For links to free educational apps, have a look at the<a href=\"https:\/\/obsidiansofteducation.com\/index.php\/mobile-apps\/\">\u00a0educational apps page<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello friends and welcome to Obsidian Soft, Today, I will teach you how to make a simple sidebar menu for navigation without extensions. I don\u2019t like relying on them too much, as these extensions might become outdated, and most importantly, you can\u2019t test them on iPhones. So, let\u2019s begin: Start a new project in MIT [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1452","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/1452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/comments?post=1452"}],"version-history":[{"count":1,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/1452\/revisions"}],"predecessor-version":[{"id":5706,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/1452\/revisions\/5706"}],"wp:attachment":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/media?parent=1452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}