B4A Library Material Date Picker

mcqueccu

Well-Known Member
Licensed User
Longtime User
NEW EXAMPLES(Activity and B4XPages). Compatible with B4A 13.10+

Depends on: AppCompat Library

1. Add this to the Main Module

B4X:
#Extends : android.support.v4.app.FragmentActivity
#AdditionalJar: androidx.customview:customview-poolingcontainer

2. Update your manifest

Manifest:
AddManifestText(
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme) 'Needed for Date Picker

'End of default text.


'Important for the Timepicker
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
 <item name="colorAccent">#040925</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="android:navigationBarColor">#FF000000</item>    </style>

</resources>

)
 

Attachments

  • B4XPages_Datepicker_Example.zip
    69.4 KB · Views: 124
  • Activity_Example.zip
    63.8 KB · Views: 130

Theera

Expert
Licensed User
Longtime User
Your UI is good.I'm like it. Let me do in Thai Edition. Thank you advance.
 

antonomase

Active Member
Licensed User
Longtime User
Note to @intellvold: perhaps it would be a good idea to include all the information about adding an AdditionalJar and modifying the Manifest in the first post.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…