B4A Library: MorphBottomNavigation

Install (Additional Libraries folder):
  - MorphBottomNavigation.jar
  - morph-bottom-navigation-1.0.1.aar
  - magicshapepath-1.0.0-alpha3.aar
  - MorphBottomNavigation.xml

If you installed an earlier build of this library, delete its old
files first. Leftover jars/aars define the same classes twice and
make the B4A compiler fail while dexing.

Resolved by B4A itself (nothing to copy):
  - androidx.annotation:annotation
  - androidx.appcompat:appcompat
  - androidx.arch.core:core-common
  - androidx.asynclayoutinflater:asynclayoutinflater
  - androidx.cardview:cardview
  - androidx.collection:collection
  - androidx.coordinatorlayout:coordinatorlayout
  - androidx.core:core
  - androidx.core:core-ktx
  - androidx.cursoradapter:cursoradapter
  - androidx.customview:customview
  - androidx.documentfile:documentfile
  - androidx.drawerlayout:drawerlayout
  - androidx.fragment:fragment
  - androidx.interpolator:interpolator
  - androidx.legacy:legacy-support-core-ui
  - androidx.legacy:legacy-support-core-utils
  - androidx.lifecycle:lifecycle-common
  - androidx.lifecycle:lifecycle-livedata-core
  - androidx.lifecycle:lifecycle-runtime
  - androidx.lifecycle:lifecycle-viewmodel
  - androidx.loader:loader
  - androidx.localbroadcastmanager:localbroadcastmanager
  - androidx.print:print
  - androidx.recyclerview:recyclerview
  - androidx.slidingpanelayout:slidingpanelayout
  - androidx.swiperefreshlayout:swiperefreshlayout
  - androidx.transition:transition
  - androidx.vectordrawable:vectordrawable
  - androidx.vectordrawable:vectordrawable-animated
  - androidx.versionedparcelable:versionedparcelable
  - androidx.viewpager:viewpager
  - com.google.android.material:material
  - org.jetbrains.kotlin:kotlin-stdlib
  - org.jetbrains.kotlin:kotlin-stdlib-jdk7
  - org.jetbrains:annotations

1. Copy ALL .jar/.aar and .xml files above into the same B4A additional libraries folder.
2. Libraries tab -> Refresh. Do this even if the library is already
   in the list: B4A keeps the previous .xml in memory, and a stale
   copy makes it skip dependencies without reporting anything.
3. Add the library to your project.

Wrapper compiled: YES

Project resources (res folder)
------------------------------
The library's own resources ship inside the .aar, so nothing has to be
copied for them to work. The res folder next to this file is a readable
copy: use it to look up attribute and style names.

Some native methods take a resource id, which B4A cannot produce. Put
the file in your own res folder, declare it, and look the id up by name:

    #AdditionalRes: ..\res, com.tbuonomo.morphbottomnavigation

    ' res\menu\bottom_nav.xml -> id at runtime
    Dim id As Int = v.ResourceId("menu", "bottom_nav")
    v.inflateMenu(id)

ResourceId returns 0 when the name does not exist, and passing 0 to a
native method raises a Resources.NotFoundException.

Usage
-----
MorphBottomNavigationView is an Android view.

  From code:
    Dim v As MorphBottomNavigationView
    v.Initialize("v")
    Activity.AddView(v, 0, 50%y, 100%x, 50dip)

  From the Designer:
    Add View -> CustomView, then set CustomType to MorphBottomNavigation.MorphBottomNavigationView

    Sub v_NavigationItemSelected(Arg1 As Object) As Boolean
    End Sub
    Sub v_NavigationItemReselected(Arg1 As Object)
    End Sub

Required theme (Manifest Editor)
-------------------------------
This library uses AppCompat/Material views, which crash under B4A's
default theme. Add this to the Manifest Editor:

    SetApplicationAttribute(android:theme, "@style/B4ALibTheme")
    CreateResource(values, theme.xml,
    <resources>
        <style name="B4ALibTheme" parent="Theme.MaterialComponents.Light.NoActionBar"/>
    </resources>
    )

Overloaded methods get a numeric suffix (setImage, setImage2, ...)
because B4A does not support overloading.

Generated by B4Alib (full conversion).