I have created an app that uses a barcode scanner to get the ISBN number of a book. After the book is scanned, the ISBN number displays in a "results" label. The user can then select the "Search" button to call an ActivityStarter which pulls up a web browser and searches for that ISBN number.
My problem is that I do not want the Search function to work if the "results" label is empty (that is, if no ISBN number has been captured). I've tried to accomplish this with several different varieties of if/then blocks, but have not had any luck. These are what my blocks look like currently:
I've tried a couple of different things and either 1) the "Search" button is just permanently disabled, even if there is an ISBN number in the results label, or 2) the "Search" button is enabled and continues to pull up a blank search page in the web browser, even though there is nothing in the results label.
Any suggestions?
--
like this, you never will be able to touch the button again, because you set it to enable = false
like this, you never will be able to touch the button again, because you set it to enable = false
what about just displaying a notifier "Please first select an ISBN number"
--
댓글 없음:
댓글 쓰기