A bottom phone number prefix, flag emoji, country code picker.
You need:
I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal or with a coffee.
Datasource from:
AS_BottomPhoneNumberFlagPicker
Author: Alexander Stolte
Version: 1.00
You need:
I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal or with a coffee.
Datasource from:
Dark Example:
BottomPhoneNumberFlagPicker.Initialize(Me,"BottomPhoneNumberFlagPicker",Root)
BottomPhoneNumberFlagPicker.Color = xui.Color_ARGB(255,32, 33, 37)
BottomPhoneNumberFlagPicker.TextColor = xui.Color_White
'Selects an item with the dial code
BottomPhoneNumberFlagPicker.SelectItem2("+49") 'Example: "+49" to select Germany
BottomPhoneNumberFlagPicker.ShowPicker
Light Example:
BottomPhoneNumberFlagPicker.Initialize(Me,"BottomPhoneNumberFlagPicker",Root)
BottomPhoneNumberFlagPicker.Color = xui.Color_White
BottomPhoneNumberFlagPicker.TextColor = xui.Color_Black
'Selects an item with the country code
BottomPhoneNumberFlagPicker.SelectItem(GetCountry) 'Example: "de" to select Germany
BottomPhoneNumberFlagPicker.ShowPicker
Get Country Code Function B4A and B4I:
#If B4I
Private Sub GetCountry As String
Dim no As NativeObject
Dim s As String = no.Initialize("NSLocale") _
.RunMethod("currentLocale", Null).RunMethod("objectForKey:", Array("kCFLocaleCountryCodeKey")).AsString
Return s
End Sub
#Else If B4A
Private Sub GetCountry As String
Dim r As Reflector
r.Target = r.RunStaticMethod("java.util.Locale", "getDefault", Null, Null)
Return r.RunMethod("getCountry")
End Sub
#End If
Author: Alexander Stolte
Version: 1.00
- AS_BottomPhoneNumberFlagPicker
- Events:
- ConfirmButtonClicked (Item As AS_BottomPhoneNumberFlagPicker_Item)
- Fields:
- Tag As Object
- Functions:
- Class_Globals As String
- CreateAS_BottomPhoneNumberFlagPicker (FlagEmoji As String, CountryCode As String, DialCode As String, Name As String) As AS_BottomPhoneNumberFlagPicker_Item
- getColor As Int
- getTextColor As Int
- Initialize (Callback As Object, EventName As String, Parent As B4XView) As String
Initializes the object. You can add parameters to this method if needed. - IsInitialized As Boolean
Tests whether the object has been initialized. - SelectItem (CountryCode As String) As String
Selects an item with the country code
Example: "de" to select Germany - SelectItem2 (DialCode As String) As String
Selects an item with the dial code
Example: "+49" to select Germany - setColor (Color As Int) As String
- setTextColor (Color As Int) As String
- ShowPicker
- Properties:
- Color As Int
- TextColor As Int
- Events:
- AS_BottomPhoneNumberFlagPicker_Item
- Fields:
- CountryCode As String
- DialCode As String
- FlagEmoji As String
- IsInitialized As Boolean
Tests whether the object has been initialized. - Name As String
- Functions:
- Initialize
Initializes the fields to their default value.
- Initialize
- Fields:
- 1.00
- Release
- 1.01
- Add GetItem - Gets an item with the country code
- Add GetItem2 - Gets an item with the dial code
Attachments
Last edited: