Android Question Quick Clarification -- Spinner and Combo Box

brianwiz12

Active Member
Licensed User
Longtime User
Hello,

Been searching the forums and believe i can implement this design. Want to double check before i dive to far into it

Top of my page will be a drop down IE A, B, C, D, E, F, G ect

Once a letter is chosen

The combo/checkbox will fill with the choices under it IE (A is chosen -- Abby populates --- Click Abby go to that module for the trivia in the program)

No code tried yet. Just want to ensure Spinner/Combox, checklist or radio buttons can handle it
 

brianwiz12

Active Member
Licensed User
Longtime User
Thank you for the quick response. Will play around with that and come back if needed.

More to come later on the question if needed.
 
Upvote 0

brianwiz12

Active Member
Licensed User
Longtime User
Hello, Sorry for the lack of response. Been working multiple aspects of the redo.

Here is what i have right now

B4X:
#Region  Activity Attributes
    #FullScreen: True
    #IncludeTitle: False
    
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    
    Dim spa As Spinner
    Dim spB As Spinner
    Dim spF As Spinner
    Dim spJ As Spinner
    Dim spN As Spinner
    Dim spT As Spinner
    Dim spS As Spinner
    Dim spV As Spinner

    
    
    
    

    
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Activity.LoadLayout("triviabyletter")
    Activity.Color = Colors.Blue
    
    spa.add("A")
    spa.add("Abbys")
    spa.DropdownTextColor = Colors.White
    spa.DropdownBackgroundColor = Colors.Gray
    
    spB.add("B")
    spB.add("Blood and Oil")
    spB.DropdownTextColor = Colors.White
    spB.DropdownBackgroundColor = Colors.Gray
    
    spF.add("F")
    spF.add("Fuller House S1")
    spF.add("Fuller House S2")
    spF.add("Fuller House S3")
    spF.add("Fuller House S4")
    spF.DropdownTextColor = Colors.White
    spF.DropdownBackgroundColor = Colors.Gray
    
    spJ.add("J")
    spJ.add("Jericho S1")
    spJ.add("Jericho S2")
    spJ.DropdownTextColor = Colors.White
    spJ.DropdownBackgroundColor = Colors.Gray
    
    spN.add("N")
    spN.add("Notorious")
    spN.add("Newsroom S1")
    spN.add("Newsroom S2")
    spN.add("Newsroom S3")
    spN.DropdownTextColor = Colors.White
    spN.DropdownBackgroundColor = Colors.Gray
    
    spT.add("T")
    spT.add("The Player")
    spT.add("The Pitch")
    spT.DropdownTextColor = Colors.White
    spT.DropdownBackgroundColor = Colors.Gray
    
    spS.add("S")
    spS.add("Sports Night S1")
    spS.add("Sports Night S2")
    spS.DropdownTextColor = Colors.White
    spS.DropdownBackgroundColor = Colors.Gray
    
    spV.add("V")
    spV.add("Veep S1")
    spV.DropdownTextColor = Colors.White
    spV.DropdownBackgroundColor = Colors.Gray
    
    
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Spa_ItemClick (Position As Int, Value As Object)
    Select Value
        Case "Abbys"
            StartActivity("abbys")
            Activity.finish
    End Select
End Sub

Sub SpB_ItemClick (Position As Int, Value As Object)
    Select Value
        Case "Blood and Oil"
            StartActivity("BloodOil")
            Activity.finish
    End Select
End Sub

---------------------------------
This stinks for growth of the app. So what i want to do is the following

One Spinner/Dropdown for A-Z

Then someone selects A
It will load in a checkbox/button/radiobutton ect everything under A.

Someone Selects B
It will load under that everything in B category

They would then select the show to play the trivia.


I know im long winded sorry. I have been looking at customview examples and so forth and cannot wrap my head around how to customize it.
 
Upvote 0

brianwiz12

Active Member
Licensed User
Longtime User
Updating with code i have so far (Now i have down drop downs for trivia/database related) for some reason im stuck.

B4X:
#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    
    Dim panel1 As Panel
    Dim panel2 As Panel
    Dim button1 As Button
    Dim button2 As Button
    
    Dim spinner1 As Spinner
    
    
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Activity.LoadLayout("trivia2")
    
    spinner1.add("A-Z")
    spinner1.add("Panel1")
    spinner1.add("Panel2")
    spinner1.DropdownTextColor = Colors.White
    spinner1.DropdownBackgroundColor = Colors.Gray
    
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub spinner1_ItemClick (Position As Int, Value As Object)
    Select Value
        Case "Panel1"
        panel2.visible = True
        panel1.Visible = False
End Select
End Sub

Sub button1_click
    StartActivity("abbys")
    Activity.finish
End Sub
Sub button2_click
    StartActivity("Newsroom")
    Activity.finish
End Sub

Im missing something big i feel
 
Upvote 0
Top