So I wrote a program for my school regarding our schedule. I have a iOS build and an Android build on each of the appropriate markets. An issue I have noticed is that the widgets on the android version are displaying weird (this does not happen on iOS version) and that they are not the same size as the text that is associated with the widget. Does anyone know how to fix this?
Take a screen shot and show us what weird is.
Sorry, I thought I attached both the photos. See here on the same app that I have on android and iOS that for the widgets, on iOS there is nothing behind the text save, clear and back (which are all widgets) and on the android version there is a whitish button behind them that is not the size of the text as well. I don’t know why they are that size on android or why they are showing up.
Can you post your button creation code?
These are how I define the buttons. Do you want the entire code?
back = widget.newButton
{
left = 0,
top = -15,
width = 60,
height = 20,
id = “back”,
label = “< Back”,
labelColor = {default = {0,0,0}, over = {0,0,0}}
}
save = widget.newButton
{
left = 260,
top = -15,
width = 60,
height = 20,
id = “save”,
label = " Save",
labelColor = {default = {1,1,1}, over = {0,0,0}}
}
reset = widget.newButton
{
left = display.contentWidth/2 - 25,
top = display.contentHeight - 10,
width = 20,
height = 20,
id = “reset”,
label = “Clear”,
labelColor = {default = {1,1,1}, over = {0,0,0}}
}
Are you setting a theme?
What does “setting a theme” mean? I may be, I am not sure what that is.
Using widget.setTheme()
See: https://docs.coronalabs.com/api/library/widget/setTheme.html
If you are not, try it. Also try other options too.
I never declared a theme in my code prior to this but it appears to have worked. Thank you.
Take a screen shot and show us what weird is.
Sorry, I thought I attached both the photos. See here on the same app that I have on android and iOS that for the widgets, on iOS there is nothing behind the text save, clear and back (which are all widgets) and on the android version there is a whitish button behind them that is not the size of the text as well. I don’t know why they are that size on android or why they are showing up.
Can you post your button creation code?
These are how I define the buttons. Do you want the entire code?
back = widget.newButton
{
left = 0,
top = -15,
width = 60,
height = 20,
id = “back”,
label = “< Back”,
labelColor = {default = {0,0,0}, over = {0,0,0}}
}
save = widget.newButton
{
left = 260,
top = -15,
width = 60,
height = 20,
id = “save”,
label = " Save",
labelColor = {default = {1,1,1}, over = {0,0,0}}
}
reset = widget.newButton
{
left = display.contentWidth/2 - 25,
top = display.contentHeight - 10,
width = 20,
height = 20,
id = “reset”,
label = “Clear”,
labelColor = {default = {1,1,1}, over = {0,0,0}}
}
Are you setting a theme?
What does “setting a theme” mean? I may be, I am not sure what that is.
Using widget.setTheme()
See: https://docs.coronalabs.com/api/library/widget/setTheme.html
If you are not, try it. Also try other options too.
I never declared a theme in my code prior to this but it appears to have worked. Thank you.