How to make certain Widget appear over the other

Hi, I can’t seem to get a widget to appear over the other. It’s like one is covering the other. I have attached an image. The image shows a Spinner which is half covered by the TabBar since the Tabbar’s dimensions actually overlap that of the spinner, so the spinner appears to be just half a circle. Aside from moving the Tabbar down a bit, is there anyway I can make the Spinner to appear over the Tabbar without changing the XY coordinates? Thank you very much :slight_smile:

Are you creating the spinner first and then the tabbar in your code? If so can you reverse this order?

Hello Sir, thank you very much for your reply. Currently I have my spinner first then tabbar, I already tried reversing the order but it still does not work. The first thing that popped out my mind when I encountered this was to reverse the order. I think I’ve read somewhere a week ago that reversing the order might solve it, so you’re right about this, but it still does not solve the problem :frowning: or am I doing something wrong? 

This is my code…

local spinner = widget.newSpinner({ width = 32, height = 32, }) spinner.x = display.contentCenterX spinner.y = (display.contentHeight/10)+50 local tabButtons = { { label = "Facebook Community", onPress = function() end, selected = true }, { label = "World", onPress = function() end, } } -- Create tabBar at bottom of the screen local tabBar = widget.newTabBar{ top = (display.contentHeight/10)+50, width = display.contentWidth+ox+ox, buttons = tabButtons }

Thank you very much.

Add the following at the end of your code and see if that helps. All the best. 

tabBar:toBack() spinner:start()

Hello Sir, I tried toBack() and it still does not solve the issue :frowning: Any other options Sir? Thank you very much.

Are you using Storyboard or Composer to manage the scene? Are the widgets inserted into one common group? Take a look at the Widgets Demo source code from Corona Labs. Look at tab4.lua where there is a spinner. Move the spinner down to overlap with the tabBar and you will see it disappears behind the tabBar. Then use the :toBack  on tabBar and you will see the spinner in its complete circle. Try to adapt your code to follow the Widgets Demo sample approach and it should work well. 

Hi Sir, I am using the Composer to manage the scene. I also did insertion under the group. Okay I will check the sample code and report back to you. Thank you very much for the help Sir.

Are you creating the spinner first and then the tabbar in your code? If so can you reverse this order?

Hello Sir, thank you very much for your reply. Currently I have my spinner first then tabbar, I already tried reversing the order but it still does not work. The first thing that popped out my mind when I encountered this was to reverse the order. I think I’ve read somewhere a week ago that reversing the order might solve it, so you’re right about this, but it still does not solve the problem :frowning: or am I doing something wrong? 

This is my code…

local spinner = widget.newSpinner({ width = 32, height = 32, }) spinner.x = display.contentCenterX spinner.y = (display.contentHeight/10)+50 local tabButtons = { { label = "Facebook Community", onPress = function() end, selected = true }, { label = "World", onPress = function() end, } } -- Create tabBar at bottom of the screen local tabBar = widget.newTabBar{ top = (display.contentHeight/10)+50, width = display.contentWidth+ox+ox, buttons = tabButtons }

Thank you very much.

Add the following at the end of your code and see if that helps. All the best. 

tabBar:toBack() spinner:start()

Hello Sir, I tried toBack() and it still does not solve the issue :frowning: Any other options Sir? Thank you very much.

Are you using Storyboard or Composer to manage the scene? Are the widgets inserted into one common group? Take a look at the Widgets Demo source code from Corona Labs. Look at tab4.lua where there is a spinner. Move the spinner down to overlap with the tabBar and you will see it disappears behind the tabBar. Then use the :toBack  on tabBar and you will see the spinner in its complete circle. Try to adapt your code to follow the Widgets Demo sample approach and it should work well. 

Hi Sir, I am using the Composer to manage the scene. I also did insertion under the group. Okay I will check the sample code and report back to you. Thank you very much for the help Sir.