Android Tutorial Android Views (controls) and dialogs

Discussion in 'Tutorials & Examples' started by Erel, Jan 13, 2011.

  1. Erel

    Erel Administrator Staff Member Licensed User

    Many users who start to develop Android applications may be frustrated by the fact that they don't find the control they are looking for. Its even worse, for some mysterious reason there are no "Controls" at all. Instead there are "Views".

    This page shows screenshots of all the available views and dialogs:

    Views


    Button:

    [​IMG]

    Checkbox:

    [​IMG]

    EditText (TextBox):
    Can also be multiline.

    [​IMG]


    ImageView:

    [​IMG]

    Label:

    [​IMG]

    ListView (ListBox):

    [​IMG]

    Panel:
    Can hold other views (and load layout files).

    [​IMG]


    ProgressBar:

    [​IMG]

    RadioButton:

    [​IMG]

    ScrollView:

    [​IMG]

    SeekBar (TrackBar):

    [​IMG]

    Spinner (ComboBox):

    [​IMG]

    TabHost (TabControl):

    [​IMG]

    ToggleButton:

    [​IMG]

    WebView:

    [​IMG]

    Dialogs

    Basic4android dialogs are blocking modal dialogs. Which means that the code execution stops while the dialog is shown.

    Some of the dialogs are shown by calling a keyword (like Msgbox). Other dialogs are included in Andrew's excellent dialogs library.

    Internal dialogs


    InputList:

    [​IMG]

    InputMultiList:

    [​IMG]

    Msgbox (or Msgbox2):

    [​IMG]

    Dialogs library

    ColorDialog:

    [​IMG]

    ColorPickerDialog:

    [​IMG]

    DateDialog:

    [​IMG]

    InputDialog:

    [​IMG]

    NumberDialog:

    [​IMG]

    TimeDialog:

    [​IMG]

    FileDialog:

    [​IMG]
     
    aidymp, luke2012, GudEvil and 7 others like this.
  2. walterf25

    walterf25 Well-Known Member Licensed User

    Where to download dialogs library

    Where can i download this libraries from, i can't seem to find a link or a place to download them from!
     
  3. klaus

    klaus Expert Licensed User

  4. bodycode

    bodycode Member Licensed User

    Numberdialog doesn't seem to output decimal point in output.

    The "get number" button on your numberdialog box doesn't seem to output a decimal point, it's not visible at all, not even a space between any numbers. Only an integer appears to be outputtting.

    Any way to fix this? I also notice a + and minus at the beginning of the numeric input GUI but doesn't seem to have any effect. What's that for? There's also a colon output? And a minus sign at the beginning of the number? What's that about? I simply want to use a decimal number in some calculations with some variables being assigned the values (I know how to do that in a simple way).

    Thanks in advance. A bit confused, I'm probably using this wrong? Thanks in advance.


    Regards,
    bodycode
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
     
  6. JonPM

    JonPM Well-Known Member Licensed User

    In Msgbox2 is there a way to place the cancel button on the right side? Seems weird to have it in the middle, I prefer Yes, No, Cancel (just like in all the other dialogs). I'd like to keep the code clean by keeping Dialog.Response = Cancel with the actual Cancel button (instead of swapping it with the Negative).
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    This is the default Android order. As you wrote you can put any string you like and interpret the value accordingly.
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
     
  9. RandomCoder

    RandomCoder Well-Known Member Licensed User

    How is it that I've only just found this thread. What a great resource for beginners and old-timers like me :D
    Thanks @Erel.
     
  10. sorex

    sorex Expert Licensed User

    I seem to mis something.

    inputlist is marked as "internal" which means it's part of a core lib?

    it's not recognizing it as a valid keyword with all core libs selected and the dialog lib added to the additional libs folder?
     
  11. barx

    barx Well-Known Member Licensed User

    Seems to work ok here sorex and I have successfully used it in the past. You don't declare an inputlist like a view, you call it like a magbox. Maybe that is where you are going wrong?

    Code:
    response = InputList(ItemsList, "Select an Item", -1)
     
    sorex likes this.
  12. sorex

    sorex Expert Licensed User

    Ooooooooh! :)

    that works indeed.

    I checked the beginners & advanced(?) guide but it wasn't mentioned there either (or I missed it) so I didn't know how to access/use it.

    thanks, Barx.
     
  13. barx

    barx Well-Known Member Licensed User

    You have to be 733t to use the input list
     
  14. sorex

    sorex Expert Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice