B4A Library AMTileView 1

Ola

Library & Example Download

Latest Version: 113 - 13/04/2017

The AMTileView Library is a WebView based library using HTML5 Components, JavaScript and CSS

The following components are included

  • AMPage
  • AMRadialMenu
  • AMRadialSlider
  • AMSlider
  • AMGroupButton
  • AMRotator
  • AMTile
  • AMTileView
  • AMDialog
  • AMTab (partial)

This library uses the WebViewExtras library to trap javascript events and pass them to your b4a application. I have written an article here about how this was wrapped up.

I had initially thought of separate items, but due to these components being related, I consolidated everything into one library, the library including the necessary and required js and css files and are maintaining everything in this post.

The library files are now suffixed by the version code, thus on the dropbox folder, download ...113.jar with its linked xml file if that is the latest version etc etc.

Version 113 Additions (AMDialog and AMTab Video)

Some events have been changed for consistency. These are still fired from the page class.

B4X:
#Event: TileClicked (value As String)
#Event: TabButtonClicked (value As String)
#Event: RadialMenuClicked (value As String, childIndex as string)
#Event: GroupButtonClicked (value As String)
#Event: RadialSliderChanged (element as String, Value as string)
#Event: RangeSliderChanged (element as String, Value as string)
#Event: RatingChanged (element as string, value as string)
#Event: DialogClosed (element as string, Value as string)
#Event: DialogOpened (Value as string)
#Event: Loaded ()
#Event: RangeSliderRead(value1 as string, value2 as string)

The AMTab button click events are trappable, just need to add images. A partial listview has also been added but will be beefed up for more functionality. The AMDialog events and returned values are also trappable, see source code. Also the AMMenu has been changed to AMRadialMenuItem.

My initial Post

Well, I'm kinda of excited right now. It's been a hectic two days, but finally here is it. I;m working on a book app that will contain a couple of books which will have text to speech. I wanted something better in terms of a dashboard, so I decided to explore some javascript components and came up with this.

NB: The examples in the attached files are the latest on the use and functionality. Some changes were made for consistency..


First, thanks for the WebViewExtras library that enables one to trap javascript commands and pass them to B4A.

Known Issues:
The tile with badge uses a 48px image.

Small Tiles: These can now have a background and are clickable.

small tiles.png



Default Tiles

defaulttiles.png


Live Times: these can be times each running at each own's interval

livetiles.png


Tile with Badge

badge.png


You can indicate the background color of each page[/CODE]
 

Attachments

  • template.png
    template.png
    17.9 KB · Views: 339
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Error at compiling try in the new B4A 6.80, at
pg.Render


B4X:
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (frmsmalltiles) Create, isFirst = true **
java.lang.NoSuchMethodError: anywheresoftware.b4a.keywords.Common.ProgressDialogShow2
    at com.Mashy.AMTileView105.ampage._render(ampage.java:843)
    at com.Mashy.TileView.frmsmalltiles._activity_create(frmsmalltiles.java:431)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
    at com.Mashy.TileView.frmsmalltiles.afterFirstLayout(frmsmalltiles.java:102)
    at com.Mashy.TileView.frmsmalltiles.access$000(frmsmalltiles.java:17)
    at com.Mashy.TileView.frmsmalltiles$WaitForLayout.run(frmsmalltiles.java:80)
    at android.os.Handler.handleCallback(Handler.java:725)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:5041)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
    at dalvik.system.NativeStart.main(Native Method)
** Activity (frmsmalltiles) Resume **
** Activity (frmsmalltiles) Pause, UserClosed = true **
 
Top