Android Question Unusual type of buttons (or radio buttons)

red30

Well-Known Member
Licensed User
Longtime User
How is it possible to make this type of buttons (radio buttons) as in the video? With a choice of one or several items?
 

Peter Simpson

Expert
Licensed User
Longtime User
There are literally lots of ways to achieve what you are looking for, here.

Enjoy...
 

Attachments

  • Screenshot_1610574844.png
    Screenshot_1610574844.png
    12.3 KB · Views: 168
  • LblBtnExample.zip
    9.9 KB · Views: 158
Last edited:
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
a similar solution for just one line, but with scrolling is this:
ezgif.com-resize (2).gif
 
Upvote 0

red30

Well-Known Member
Licensed User
Longtime User
There are literally lots of ways to achieve what you are looking for, here.

Enjoy...
I cannot run your example. I get an error:
B4X:
B4A Version: 10.50
Parsing code.    (0.02s)
    Java Version: 11
Building folders structure.    (0.01s)
Running custom action.    Error
-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------
  Ќ з «®: Fri Jan 15 14:17:47 2021
    €бв®зЁЄ : C:\Users\LAB2-R~1\Desktop\Shared Files\
  Ќ § 票Ґ : C:\Users\LAB2-R~1\Desktop\B4A\Files\
     ” ©«л: *.*
     
Џ а ¬Ґвал: *.* /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
2021/01/15 14:17:47 Ћ€ЃЉЂ 2 (0x00000002) „®бвгЇ Є Ёб室®© Ї ЇЄҐ C:\Users\LAB2-R~1\Desktop\Shared Files\
ЌҐ г¤ Ґвбп  ©вЁ гЄ § л© д ©«.

a similar solution for just one line, but with scrolling is this:
View attachment 106189
This is a great example, but it uses scrolling. I need to fill in one line, and then move the buttons to the next line ...


I don't understand how I can make a matrix out of buttons. That is, I know in advance how many buttons there will be and at the same time I need to equalize them, so first we fill in the first line (the size of the button is determined by the length of the text of this button), and then if the buttons do not fit, then we transfer them to the next line, etc.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I cannot run your example. I get an error:

Comment this line. It will work for you:
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
Here it is again
Peter, you did not have to recreate your project as a conventional project. Your original B4XPages works fine if he comments the above line
 
Upvote 0
Top