Custom button can't show on android emulator
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 4
- Joined: Wed Mar 10, 2021 7:02 am
Custom button can't show on android emulator
Hi Everyone, I met a problem, I just follow the lesson(how-to-create-a-rollover-button-with-icon-images) to make a custom button, it can't show in the android Emulator when i test it, and also can't show on the real mobile phone when I save as a standalone application .Is anybody knows the reason or met the similar problem?
BTW, why I can't insert a lessons link by BBCode?
Best Regards
Steven Meng
BTW, why I can't insert a lessons link by BBCode?
Best Regards
Steven Meng
Re: Custom button can't show on android emulator
Hi Steven,
welcome to the forum!
Due to high spamming here, you need to have at least seven posting before you can post links BBCode etc.
You mean this lessons: https://lessons.livecode.com/m/4071/l/6 ... con-images?
Did you import your images? Menu: File: Import as control: Image file...
Missing images are mostly a path problem if they are only referenced.
Best
Klaus
welcome to the forum!
Due to high spamming here, you need to have at least seven posting before you can post links BBCode etc.
You mean this lessons: https://lessons.livecode.com/m/4071/l/6 ... con-images?
Did you import your images? Menu: File: Import as control: Image file...
Missing images are mostly a path problem if they are only referenced.
Best
Klaus
-
- Posts: 4
- Joined: Wed Mar 10, 2021 7:02 am
Re: Custom button can't show on android emulator
Hi Klaus
Thanks for your quickly reply. The link of your lessons is correct. The problem is solved.
The reason is : I used the icons from “Standard Icons ” Image library,then I can't see the button at all. When used the icons from "This Stack" Image library, then the button shows OK.
But I still don't know why?
Best Regards
Steven
Thanks for your quickly reply. The link of your lessons is correct. The problem is solved.
The reason is : I used the icons from “Standard Icons ” Image library,then I can't see the button at all. When used the icons from "This Stack" Image library, then the button shows OK.
But I still don't know why?
Best Regards
Steven
Re: Custom button can't show on android emulator
Hi Steven,
to show an image in a BUTTON, you need to set the buttons ICON to the ID of your image.
But the icons in the Standard Icons” Image library do have VERY HIGH IDs and in the runtime/standlaone
these images belonging to these IDs are not found inside of your stack(s), so the image cannot be displayed
inside of your buton.
Best
Klaus
to show an image in a BUTTON, you need to set the buttons ICON to the ID of your image.
But the icons in the Standard Icons” Image library do have VERY HIGH IDs and in the runtime/standlaone
these images belonging to these IDs are not found inside of your stack(s), so the image cannot be displayed
inside of your buton.
Best
Klaus
-
- Posts: 4
- Joined: Wed Mar 10, 2021 7:02 am
Re: Custom button can't show on android emulator
Hi Klaus,
Thanks for your detailed explanation ! I already knew how to use the Standard Icons in the stack. Firstly, go to the menu Development->Image Library, select which I want to used icons from "Standard Images", then click the "Place Image" button to place the Image to This stack, then icons will have a lower ID and can be used in the stack.
Best Regards
Steven
Thanks for your detailed explanation ! I already knew how to use the Standard Icons in the stack. Firstly, go to the menu Development->Image Library, select which I want to used icons from "Standard Images", then click the "Place Image" button to place the Image to This stack, then icons will have a lower ID and can be used in the stack.
Best Regards
Steven
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Custom button can't show on android emulator
I have got myself "in a fluster" many times with what happens to buttons when they end up on different platforms, so,
in 2003 I gave up buttons almost completely . . .
I generally set up buttons the way I like them, and then import them as snapshots (i.e. images) to use
as buttons, or as icons for buttons, or as backGroundPatterns for graphic objects.
-
- Posts: 4
- Joined: Wed Mar 10, 2021 7:02 am
Re: Custom button can't show on android emulator
Hi richmond62
It's a good solution, I will try it later.
Thanks for your sharing!
Best Regards
Steven
It's a good solution, I will try it later.
Thanks for your sharing!
Best Regards
Steven
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Custom button can't show on android emulator
I avoid using images as buttons whenever possible, because if you need to change anything (a label, an icon, colors, whatever) then you have to make new images all over again. Buttons with icons are far more flexible and convenient. Also, if you plan to resize the stack for different size screens, images may not scale correctly and can pixellate.
I suspect Richmond uses images in order to display labels in a font the user may not have installed. That's one of the few times I might do that, though including the font in the stack is a better solution.
I suspect Richmond uses images in order to display labels in a font the user may not have installed. That's one of the few times I might do that, though including the font in the stack is a better solution.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Custom button can't show on android emulator
- -I suspect Richmond uses images in order to display labels in a font the user may not have installed.
That is part of the reason.
But the other part is that I really like 100% congruency of Look-and-Feel cross-platform.