2017년 4월 4일 화요일

About the amount of BUTTONs


I have many BUTTONs in one screen ( mostly hidden )
for now I got 43 BUTTONs ... and It's already hard to click the bar to choose one
and it still growing...

Is there any solution plz ?

--
Yes, use less buttons...  You should NEVER need that many buttons... You need to either consolidate your stuff, or determine a better way to do it.

What could you possibly need 43 hidden buttons on one screen for?

--
Instead of buttons, use a ListPicker to select.  One button, a list of options and yes you can have 43 buttons; do you need 100?  No problem... use a ListPicker.

or   use just a few buttons and use code to change their functions...possible but complicated.

--
Are these buttons arranged geometrically in rows and columns?
A canvas with a drawn grid might be simpler, using math to decide which cell was touched.

--
an easy app used for showing the important of a book ^^"

--
Could you give an example of that, Abraham? I have a lot of buttons myself (all hidden in rows, accessed via listpicker), and I am interested to know if your suggestion would be useful for me.

--
Here is a link to the doc I made for my implementation of the game Hidato.
https://docs.google.com/document/d/19QpYv2S8ptmSIBJ7ar--aFj3wUNc08RymHlyo-UbWng/edit?usp=sharing
Instead of a 12 by 12 array of buttons, I used a canvas for the board and sensed each touch's location to decide which cell is in play.
--
Use Abraham's suggestion.  TONS of buttons are very consumptive, and there's no reason to use 100 buttons when one control, a canvas, can do it all.

--
Is 36 buttons enough?      Here are 36 on a canvas.  At the moment, only the first 12 are "connected."   This method is a little awkward and not sure the increase in blocks offsets the savings in 'button' but here is one implementation.  Be the first to flesh-it-out by adding the rest of the button implementation (follow the pattern).    Or provide a more efficient algorithm.   I was nice to ya'll, there is an aia.

The secret is a 300 x 300 pixel canvas  and a grid image that is 300 x 300 pixels.


There is a PRIZE.    Winners get to post their implementation here and we all congratulate you.    The time is starting NOW!     Be the first.


--
Here's my solution :)
Snap to grid...
--
Interesting...
I have a question about something like this, but I'll move it to my own thread!

--
Impressive Scott.   This solution is incredibly creative...and done in less than an hour after contest start.  :)
The solution certainly reduces the required number of components and Blocks.    The number of warnings at first prevented loading the aia..eventually 
the aia loaded and I destroyed my now useless code.

This opens lots of doors.    A practical date picker?      A telephone keyboard?    A checker board?    I must have missed something by not  ever coding games.

Thank you Scott.    I would make the award, but  I hope there are more entrees.   There has got to be some more creative ways to do this.

So far, well done.

--
It might be possible to use just one button for each row and change the text of the buttons and images on click.  Consolidate and simplify with logic.  If button1 text = button1 then do this else if button1.text = button2 then do this.

--
The next question would be how to execute blocks depending on the 'button' pressed as you don't have 36 button Click blocks to handle each button.
A very long if then else-if...else?
A lookup table of some sort?
It would be nice if some common blocks could be used along with the index of the button.

--

댓글 없음:

댓글 쓰기