How to Make Dynamic FAB Whatsapp Button In Sketchware Pro

Hello guys. In this previous video I created project, it's tab layout project. it's the second video, I would like to continue the project by adding dynamic fab button with different icon when i seleted different tab in sketchware. I hope it's useful for you.

Making FAB Whatsapp Button in Sketchware

Getting Started

Before, We are going to continue building the project. Let's breakdown the concept of requirements. I divided become 3 parts below :
  1. Adding 3 Different Icons (Chat, Status, & Call)
  2. Setup Floating Action Button in Main Activity
  3. Adding onTabSeleted Event
Follow this tutorial step by step for getting better understanding.

Prepare Our Icons

In this case, we are going to make dynamic Floating Action Button (FAB) in Sketchware. We need to add 3 icons. Let's import the icons from sketchware image collection. You can see in the image below :

Adding Floating Action Button in Sketchware

As you can see from image above, Click More Button in the top side of the corner (Step 1). And then select Image Manager (Step 2). After that add 3 icons that it's required. Look at the image below :


I found 3 images of the requirements. Next step to setup our floating button.

Setup Floating Action Button

This is the most important step to setup our Floating Button. Let's go to View Manager, Select main.xml and checklist for FAB button. 

View Manager XML

After Floating Button appeared, set default image for chat tab. Because we have the first tab is Chat Tab. Look at the image below.

Floating Button In Sketchware

Adding onTabSelected Event

This is the last step, we will add some logic onTabSeleted Event. Go to Event Menu, and select View, Click on red floating button, 

View Manager In Sketchware

We look for onTabSelected Event. Finally add some logic there. Look at the image below.

onTabSelected Event In Sketchware

Add Some Logic

After you added the Event Of onTabSelected add some logic inside. If the position equal to 0, it wil return position of the First Tab. It's mean our tab position start from 0, 1, and 2. Not start from 1, 2, and 3. Ok add some block looks like image below :

Logic FAB in sketchware

Getting Better Understanding, I created video below and give you detail explaination.


Thank you very much guys for visit my blog see you. In the next tutorials, I'll start to share my project and give you lesson how to integrate with database.