Android Question Spinner UI Elements/Properties

mfstuart

Active Member
Licensed User
Longtime User
Hi all,
I'm now working with the B4A spinner view and struggling with its UI elements.
That is, I'd like to set the look of the spinner to have:
- a border around the spinner
- where is the triangle that should appear on the right of the spinner? I have the spinner directly on the Activity. The Activity color is white and so is the spinner color white.
- Spinner TextColor = Black
- I've got the dropdown background color and dropdown text color working fine

I have labels on the Activity as well, and with the spinner as it is, you can't tell the difference between these views, which one is a spinner and which one is a label. Hence wanting to show the specific look of the spinner.

Is there any JavaObject RunMethod that can be applied?

If anyone can help on this, I'd appreciate it.

Thanx,
Mark S.

ps: I'd rather not use a 3rd party view, but stick with the B4A view.
 

Johan Schoeman

Expert
Licensed User
Longtime User
Hi all,
I'm now working with the B4A spinner view and struggling with its UI elements.
That is, I'd like to set the look of the spinner to have:
- a border around the spinner
- where is the triangle that should appear on the right of the spinner? I have the spinner directly on the Activity. The Activity color is white and so is the spinner color white.
- Spinner TextColor = Black
- I've got the dropdown background color and dropdown text color working fine

I have labels on the Activity as well, and with the spinner as it is, you can't tell the difference between these views, which one is a spinner and which one is a label. Hence wanting to show the specific look of the spinner.

Is there any JavaObject RunMethod that can be applied?

If anyone can help on this, I'd appreciate it.

Thanx,
Mark S.

ps: I'd rather not use a 3rd party view, but stick with the B4A view.
Hi Mark, I see what you say about not wanting to use a 3rd party spinner but if you do consider doing so then you can find a very "Nice Spinner" here

https://www.b4x.com/android/forum/threads/nice-spinner.58770/
 
Upvote 0

mfstuart

Active Member
Licensed User
Longtime User
Hi Johan,
I did search the forum for an alternative spinner at first and saw your "Nice Spinner" before posting about this.
My concern with 3rd party add-ons is I've been burnt by them not working with upgrades to new versions of in this example, B4A.

There has to be a Java method that can be applied with code that will set the appropriate properties?

Regards,
Mark S.
 
Upvote 0

mfstuart

Active Member
Licensed User
Longtime User
Thanx for your reply Erel.
I'll try the panel way.

But still, I'm not seeing the dropdown triangle that should be displayed at the right for a Spinner.
Especially with:
Activity.Color = Colors.White
Spinner1.TextColor = Colors.Black
Spinner1.DropdownBackgroundColor = Colors.White
Spinner1.DropdownTextColor = Colors.Black

Is there anything that can be done for that?

For now I'm having to leave the Activity.Color as default color to see the triangle as white.

Thanx,
Mark Stuart
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
But still, I'm not seeing the dropdown triangle that should be displayed at the right for a Spinner.
The Triangle is Android 2.x(?) Theme.

The Layout has changed in Android.
 
Upvote 0

mfstuart

Active Member
Licensed User
Longtime User
When I think about this again, what distinguishes a label and a spinner from one another?
That's what the right positioned triangle does for a dropdown, a user understands that from desktop applications.
Some spinners even have a gradient background to them.

Looking up Google for the standards of the spinner UI, I see this in the API Guides > User Interface > Input Controls...
https://developer.android.com/guide/topics/ui/controls/spinner.html
A S.E. pointing triangle.
This would look to me like it's the current UI standard for a spinner control.

So how do we get this UI with a B4A spinner input control?

Thanx,
Mark Stuart
 
Upvote 0
Top