Wheel Picker Dialog
Stanislav Osipov edited this page Nov 4, 2020
·
4 revisions
The AN_WheelPickerDialog
is a simple dialog containing native NumberPicker
for Android. This component allows your app user to pick any data from wheel picker that you want.
using SA.Android.App;
First al all you need to set data for our picker and then create a new instance of it:
var values = new List{"Test 1", "Test 2", "Test 3"};
AN_WheelPickerDialog picker = new AN_WheelPickerDialog(m_Values);
Then just call Show()
to show your picker:
picker.Show(result =>
{
if (result.HasError)
{
Debug.Log($"Error: {result.Error.FullMessage}");
}
else
{
switch (result.State)
{
case AN_WheelPickerState.InProgress:
Debug.Log($"User in progress, current picked value: {result.Value}");
break;
case AN_WheelPickerState.Done:
UM_DialogsUtility.ShowNotification($"User picked item: {result.Value}");
break;
case AN_WheelPickerState.Canceled:
UM_DialogsUtility.ShowNotification($"User canceled picker dialog.");
break;
default:
throw new ArgumentOutOfRangeException();
}
}
});
It will be looking like this:
Also, don't forget to check if you using Android platform as current build.
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Build Info
- Dark Mode
- Package Info
- Runtime Permissions
- Run External App
- Immersive Mode
- PackageManager
- Popups & Preloaders
- Rate Us Dialog
- Activity
- Intent
- Settings Page
- Media Player
- Date Picker Dialog
- Time Picker Dialog
- Locale
- Wheel Picker Dialog
- Developer Console Setup
- Connecting to The Service
- Purchase Flow
- Transactions Validation
- Subscriptions
- Licensing
- Getting Started
- Games Sing-in
- Server-side API Access
- Leaderboards
- Achievements
- Saved Games
- Image Manager
- Settings Intent