B4A Library [Library] B4aGridView v3.80



Hi guys, B4AGridView is updated to v3.70.


1: GridView Demo
1: Library
1: PDF Explanations



A big thanks goes to ( Sergey Tarasevich - author of Universal Image Loader )

A thanks is always appreciated.


B4AGridView
Author:
Giuseppe Salvi
Version: 3.7

  • Fields:
    • Default As Typeface
      The default NORMAL typeface object.
    • Default_Bold As Typeface
      The default BOLD typeface object.
    • Monospace As Typeface
      The NORMAL style of the default monospace typeface.
    • Sans_Serif As Typeface
      The NORMAL style of the default sans serif typeface.
    • Serif As Typeface
      The NORMAL style of the default serif typeface.
    • Style_Bold As Int
      The default BOLD style int.
    • Style_Bold_Italic As Int
      The default BOLD ITALIC style int.
    • Style_Italic As Int
      The default ITALIC style int.
    • Style_Normal As Int
      The default NORMAL style int.
    Methods:
    • LoadFontFromAssets (file As String) As Typeface
      Create a new typeface from the specified font data from assets.
    • LoadFontFromFile (file As String) As Typeface
      Create a new typeface from the specified font data from sdcard.

  • Fields:
    • Center As ScaleType
      Center the image in the view, but perform no scaling.
    • Center_Crop As ScaleType
      Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image
      will be equal to or larger than the corresponding dimension of the view (minus padding).
    • Center_Inside As ScaleType
      Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image
      will be equal to or less than the corresponding dimension of the view (minus padding).
    • Fit_Center As ScaleType
      Scale the image using CENTER.
    • Fit_End As ScaleType
      Scale the image using END.
    • Fit_Start As ScaleType
      Scale the image using START.
    • Fit_XY As ScaleType
      Scale the image using FILL.
    • Matrix As ScaleType
      Scale using the image matrix when drawing.

  • Fields:
    • CARDS As Int
      CARDS Effect = 2
    • CURL As Int
      CURL Effect = 3
    • FADE As Int
      FADE Effect = 12
    • FAN As Int
      FAN Effect = 9
    • FLIP As Int
      FLIP Effect = 5
    • FLY As Int
      FLY Effect = 6
    • GROW As Int
      GROW Effect = 1
    • HELIX As Int
      HELIX Effect = 8
    • PUZZLE As Int
      PUZZLE Effect = 16
    • REVERSE_FLY As Int
      REVERSE_FLY Effect = 7
    • REVERSE_TWIRL As Int
      REVERSE_TWIRL Effect = 15
    • SLIDE_IN As Int
      SLIDE_IN Effect = 14
    • STANDARD As Int
      Standard Effect = 0
    • TILT As Int
      TILT Effect = 10
    • TWIRL As Int
      TWIRL Effect = 13
    • WAVE As Int
      WAVE Effect = 4
    • ZIPPER As Int
      ZIPPER Effect = 11

  • Fields:
    • Text_Bottom_Inside As GravityEnum
      Text Bottom InSide
    • Text_Bottom_OutSide As GravityEnum
      Text Bottom OutSide
    • Text_Center_Inside As GravityEnum
      Text Center InSide
    • Text_Top_Inside As GravityEnum
      Text Top InSide
    • Text_Top_OutSide As GravityEnum
      Text Top OutSide

  • Fields:
    • AUTO_FIT As Int
      Creates as many columns as can fit on screen.
    • NO_STRETCH As Int
      Disables stretching.
    • STRETCH_COLUMN_WIDTH As Int
      Stretches the spacing between columns.
    • STRETCH_SPACING As Int
      Stretches columns.
    • STRETCH_SPACING_UNIFORM As Int
      Stretches the spacing between columns.

  • Fields:
    • Compress_Format_JPG As CompressFormat
      Compression Format JPG
    • Compress_Format_PNG As CompressFormat
      Compression Format PNG

  • PhotoGridView
    Events:
    • ItemClick (Position As Int, Value As Object)
    • ItemLongClick (Position As Int, Value As Object)
    • Ready ( As )
    • ShareItemClick (Value As Object)
    Methods:
    • AddImage (dir As String, file As String)
      Add an image from sdcard or AssetsDir at the end of the GridView
    • AddImageAt (index As Int, dir As String, file As String)
      Add an image from sdcard or AssetsDir to the desired position in the GridView
    • AddImageFromWeb (address As String)
      Add an image from web at the end of the GridView
    • AddImageFromWebAt (index As Int, address As String)
      Add an image from Web to the desired position in the GridView
    • AddThisView
      Adds view to this activity 100%x,100%y
    • ClearDiskCache
      Clears disk cache.
    • ClearMemoryCache
      Clears memory cache
    • DestroyEngine
      Stops ImageLoader and clears current configuration. Use this option on exit app.
    • GetArrayList As List
      Gets array.
    • GetCacheDir As String
      Returns application cache directory. Cache directory will be created on SD card
      <i>("/Android/data/[app_package_name]/cache")</i> if card is mounted and app has appropriate permission. Else -
      Android defines cache directory on device's file system.
      Return type: @return:Cache {@link File directory}.<br />
      <b>NOTE:</b> Can be null in some unpredictable cases (if SD card is unmounted)
    • GetImageListFromAssets (path As String, sort As Boolean) As List
      Get entire list of images stored in assets or sub-folder
      Examples:
      <code>
      Dim lv as ListView
      Dim l as list
      l.Initialize
      lv.Initialize("lv")
      Sub Menu_Click
      Activity.AddView(lv,0,0,100%x,100%y)
      l = GridView.GetImageListFromAssets("Here the Images folder stored in Assets")
      or
      l = GridView.GetImageListFromAssets(File.DirAssets)
      or
      l = GridView.GetImageListFromAssets("")
      For n = 0 To l.Size-1
      lv.AddSingleLine(l.Get(n))
      next
      End Sub
      </code>
    • GetIndividualCacheDir As String
      Returns individual application cache directory (for only image caching from ImageLoader). Cache directory will be
      created on SD card <i>("/Android/data/[app_package_name]/cache/b4AGridview-Images")</i> if card is mounted and app has
      appropriate permission. Else - Android defines cache directory on device's file system.
    • GetItem (position As Int) As String
      Returns Item
      Example:
      i.Bitmap=LoadBitmap("",g.GetItem(Position))
    • GetRealImagePath (filename As String) As String
      Returns the real path of the image
    • GoToWebsite (url As String)
      Go to web site by given an address
      Example:
      GoToWebsite("www.example.com")
      url:
    • Initialize (EventName As String)
      Initialize the object
    • Initialize2 (EventName As String, withCacheName As String)
      Initialize the object and set own cache directory
    • InitializeFromLayout (EventName As String, container As ViewGroup, Layout As String, LayoutID As String)
      Initialize the object from layout
    • PauseEngine
      Pause ImageLoader. All new load and display tasks won't be executed until ImageLoader is resumed.
      Already running tasks are not paused.
    • ResumeEngine
      Resumes waiting load and display tasks
    • SetArrayList (array As ArrayList)
      Sets array.
    • SetText (text As String)
      Sets the string value of the TextView.
    • SetText2 (index As Int, text As String)
      Sets the string value of the TextView.
    • ShareItemsTo (appName As String, item As String, subJect As String, message As String, shareTo As String)
      Share any items to ?
      app: name
      item:
      subJect:
      message:
      shareTo:
    • ShareTextUrlTo (subject As String, text As String, message As String, shareTo As String)
      Share any text to ?
      subject:
      text:
      message:
      shareTo:
    • ShowActionBarToShare (icons() As String)
      Sets the icons on action bar
      Example:
      Dim icons() As String = Array As String("gmail.png","email.png","gmx.png","dropbox.png","facebook.png","twitter.png","telegram.png","line.png")
      icons: as array
    • ShowFromAssets (path As String, sort As Boolean)
      Populate GridView from assets or assets/sub-folder
    • ShowFromBucket (path As String, sort As Boolean)
      Populate GridView from sdcard
    • ShowFromMediaStore (sort As Boolean)
      Populate GridView from media store images
    • ShowFromSdCard (dir As String, path As String, sort As Boolean)
      Populate GridView from sdcard
    • ShowFromWeb (webStrings() As String, sort As Boolean)
      Populate GridView from web
    • StopEngine
      Cancels all running and scheduled display image tasks.
      <b>NOTE:</b> This method doesn't shutdown if you set them.

      ImageLoader still can be used after calling this method.
    • TextBackGroundColor (red As Int, green As Int, blue As Int)
      Sets the background color for this view.
      <b>by default red = 0</b>
      <b>by default green = 0</b>
      <b>by default blue = 0</b>
    • TextColor2 (alpha As Int, red As Int, green As Int, blue As Int)
      Get or Sets Text Color - by default White
    • isPauseOnFling As Boolean
      Whether pause ImageLoader during fling
    • isPauseOnScroll As Boolean
      Whether pause ImageLoader during touch scrolling
    Permissions:
    • android.permission.INTERNET
    • android.permission.READ_EXTERNAL_STORAGE
    • android.permission.WRITE_EXTERNAL_STORAGE
    Properties:
    • CacheInMemory As Boolean [write only]
      Sets whether loaded image will be cached in memory.
    • CacheOnDisk As Boolean [write only]
      Sets whether loaded image will be cached on disk.
    • ColumnWidth As Int
      Get or Sets Specifies the fixed width for each column.
    • CompressFormat As BitmaCompression
      Get or Sets the known formats a bitmap can be compressed into [ JPG or PNG ]Sets the quality of a bitmap, that can be compressed. [ 0 = low -> 100 = high ]
      by default PNG
    • CompressQuality As Int
      Get or Sets the quality of a bitmap, that can be compressed. [ 0 = low -> 100 = high ]
      by default 100
    • DelayBeforeLoading As Int [write only]
      Sets delay time before starting loading task. Default - no delay.
    • FadeInTime As Int [write only]
      Duration of "fade-in" animation (in milliseconds)
      Whether animation should be played if image is loaded from network
      Whether animation should be played if image is loaded from disk cache
      Whether animation should be played if image is loaded from memory cache
    • Friction As Boolean
      Get or Sets the amount of friction applied to flings.
    • Gravity As Int [write only]
      Specifies the gravity within each cell.
    • HorizontalSpacing As Int [write only]
      Defines the default horizontal spacing between columns..
    • ItemHeight As Int
      Get or Sets the the size of the images will be displayed in thumbnail by default size is 480x320
    • ItemWidth As Int
      Get or Sets the the size of the images will be displayed in thumbnail by default size is 480x320
    • Length As Int [read only]
      Returns length
    • LoadFontFromAssets As String [write only]
      Loads a new Typeface from the specified font data.
    • LoadFontFromFile As String [write only]
      Loads a new Typeface from the specified font data.
    • MaxAnimationVelocity As Int
      Get or Sets max animation velocity.
    • NumColumns As Int
      Get or Sets the number of columns in the grid.
    • PauseOnFling As Boolean [write only]
      Whether pause ImageLoader during fling
    • PauseOnScroll As Boolean [write only]
      Whether pause ImageLoader during touch scrolling
    • ProgressBarIndeterminate As Boolean [write only]
      Change the indeterminate mode for this progress bar.
    • ProgressBarVisible As Boolean [write only]
      Set the enabled state of this view. - by default is trueChange the indeterminate mode for this progress bar.
    • RemoveAt As Int [write only]
      Removes the item at the specified location from this list.
    • ResetViewBeforeLoading As Boolean [write only]
      Sets whether image view will be reset before image loading start
    • RoundedBitmap As Boolean [write only]
      Can display bitmap with rounded corners. - by default is false
    • ScaleType As PhotoScaleTypes
      Controls how the image should be resized or moved to match the size of this ImageView.
      by default ScaleTypeFIT_XY
    • ScaleTypeForRounded As ScaleType [write only]
      Controls how the RoundedBitmap should be resized or moved to match the size of this ImageView.
      by default ScaleType.FIT_CENTER
    • Selection As Int
      Get or Sets the currently selected item.
    • SetBorderColor As Int [write only]
      Set the border Color - by default is transparent
    • SetBorderWidth As Int [write only]
      Set the border Width - by default is 0
    • SetCornerRadius As Int [write only]
      Set the corner Radius - by default is 0
    • SetImageOnFail As String [write only]
      Sets own icon on fail
    • SetImageOnLoading As String [write only]
      Sets own icon on loading
    • SetNoEffect As Boolean [write only]
      Can display bitmap with rounded corners.
      Show thumbnails with corner radius or oval. - by default is true
    • ShouldOnlyAnimateFling As Boolean
      Get or Sets should only animate fling.
    • ShouldOnlyAnimateNewItems As Boolean
      Get or Sets should only animate new item.
    • ShowMessageError As Boolean [write only]
      Set to true if you want to display an error message.
    • SimulateGridWithList As Boolean
      Get or Sets simulate grid with list.
    • SmoothScrollbarEnabled As Boolean [write only]
      When smooth scrollbar is enabled, the position and size of the scrollbar thumb is computed based on the number of visible pixels in the visible items.
    • StretchMode As StretchModeEnum
      Defines how columns should stretch to fill the available empty space, if any.
      Examples:
      GridView.StretchMode = GridView.StretchMode.STRETCH_SPACING
    • Tag As Object
      Get or Sets this view's tag.
    • TextBackGroundAlpha As Int
      Get or Sets alpha property of the view, as a value between 0 (completely transparent) and 255 (completely opaque).
      <b>by default alpha = 0</b>
    • TextBackGroundColor2 As String [write only]
      Sets the background color for this view.
      Example:
      TextBackGroundColor2("#88666666")
    • TextColor As Int
      Get or Sets Text Color - by default White
    • TextGravity As Int
      Get or Sets the horizontal alignment of the text that will be used.
    • TextLines As Int
      Get or Sets the TextView exactly this many lines tall.
    • TextPosition As TextPositionEnum
      Get or Sets the position alignment of the text that will be used.
      <b>param Text_Top_OutSide</b>
      <b>param Text_Top_Inside</b>
      <b>param Text_Center_Inside</b>
      <b>param Text_Bottom_Inside</b>
    • TextSize As Int
      Get or Sets Text Size - by default 14
    • TextStyle As Int [write only]
      Sets the style in which the text should be displayed.
    • TextTypeFace As TypefaceUtils
      Get or Sets the typeface and style in which the text should be displayed.
      Note that not all Typeface families actually have bold and italic variants,
      so you may need to use TextStyle(style) to get the appearance that you actually want.
    • TextVisible As Boolean
      Get or Sets the visibility of the text - by default is hide
    • TransitionDuration As Int
      Get or Sets transition duration.
    • TransitionEffect As TransitionEffect
      Get or Sets the desired transition effect.
    • Version As String [read only]
      Version of the library
    • VerticalSpacing As Int [write only]
      Defines the default vertical spacing between rows.
 

Attachments

  • GridView.jpg
    GridView.jpg
    92.4 KB · Views: 4,267
  • gridview.jpg
    gridview.jpg
    80.3 KB · Views: 3,835
  • B4AGridView_v3.70_Demo.zip
    337.7 KB · Views: 1,186
  • B4AGridView_v3.70_Lib.zip
    461.2 KB · Views: 771
  • B4AGridView_v3.70.pdf
    102.2 KB · Views: 883
  • B4AGridView_Lib_v3.80.zip
    408.7 KB · Views: 850
  • B4AGridView_Lib_v3.80_Fix.zip
    409.4 KB · Views: 1,241
Last edited:

Shahid Saeed

Active Member
Licensed User
Longtime User
Hi,

Just like your photogallery solution this thing throws a Stackoverflow when used in an app. with multiple activities. I have added the gallery as a seperate activity but when running it and adding image from either web or mediastore it throws a stackoverflow and kills the gallery. Below the log:

Initialize ImageLoader with configuration
threadid=1: stack overflow on call to Ljava/util/Collections;.emptyList:L
method requires 4+20+0=24 bytes, fp is 0x41a25314 (20 left)
expanding stack end (0x41a25300 to 0x41a25000)
Shrank stack (to 0x41a25300, curFrame is 0x41a25380)
Exception thrown (Ljava/lang/StackOverflowError;) while throwing internal exception (Ljava/io/FileNotFoundException;)
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x41b8ed40)
java.lang.StackOverflowError
at java.lang.Throwable.<init>(Throwable.java:67)
at java.lang.Exception.<init>(Exception.java:47)
at java.io.IOException.<init>(IOException.java:44)
at java.io.FileNotFoundException.<init>(FileNotFoundException.java:42)
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)


at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:246)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(Ph
Message longer than Log limit (4000). Message was truncated.
FATAL EXCEPTION: main
Process: com.thingstank.apps.myapp, PID: 10193
java.lang.StackOverflowError
at java.lang.Throwable.<init>(Throwable.java:67)
at java.lang.Exception.<init>(Exception.java:47)
at java.io.IOException.<init>(IOException.java:44)
at java.io.FileNotFoundException.<init>(FileNotFoundException.java:42)
at android.content.res.AssetManager.openAsset(Native Method)


at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:246)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.s
Force finishing activity com.thingstank.apps.myapp/.actgrid
Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1244

Copy the images from library example's assets folder to your projects files folder.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Hi shahid, i'm not using asset images etc. I just download images from the web. As said, in my simple B4A projects it works but when I have stuff like actionbars and other graphical elements if gives me a stackoverflow all the time.
 

Shahid Saeed

Active Member
Licensed User
Longtime User
Hi shahid, i'm not using asset images etc. I just download images from the web. As said, in my simple B4A projects it works but when I have stuff like actionbars and other graphical elements if gives me a stackoverflow all the time.
I understand what you are doing, but the library need the following images in the Files folder:-

empty_photo.png
ic_error.png
icon.png

You can copy these files from library's example folder or create your own. Initially I had same issue and after placing the files the error gone.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Hi Shahid,

That did the trick :) Now let's hope the library developer will make it possible to change these images by code, not a big fan of the style of these.
 

Constantin Cosoiu

New Member
Licensed User
Longtime User
Hi,

Thank you for your library. I would like to use it and to donate for it, as it is closest to what I want to achieve. My purpose is to pass as much processing as possible to the display library, rather than handling in my code, because my code has a huge amount of other calculations to make and I need to focus on them, not on the image display part.

There are 2 important things:

1. Titles or other texts/views for each item
If the titles are so needed (I need some pieces of texts on the image, too), let's do it more general.

Please take a look at Expedia's screenshot attached. There are some texts needed for each view, including a semitransparent Panel.

What about passing for each item, not only the image source, but a list of Maps containing the definitions of the Views to be created for that item?

For instance:
viewType - just few primitive types, like Panel, Label, Image, Checkbox
viewColor
viewPosition
viewText - where applicable (for instance, for an Image like a "star" to mark Favorite/Unfavorite, this is not needed)
viewTextFace
viewTextColor
viewTextSize
viewImageSource
viewTag
viewClickable

These views can be created for each item and, if clicked, they can trigger an event "_Click", that I can handle, having passed either item position or viewTag.

If you want, give me the function to display one item and I can implement the above code and send you back to verify it and to incorporate it in the Gallery, Gridview....

2. Items with different heights.

Given that you already handled different CENTER and SCALE types so well (I especially like the "CENTER_INSIDE" and "CENTER_FIT"), please think of a method of accepting items with different heights, when column number = 1. So that, we could we GridView like a vertical scrollview, but with all the above benefits.

That would mean another parameter viewPositionRelativeTo at the above 1., to reposition the views of each item AFTER its height is known. Some texts need to be displayed at the bottom.

Please contact me if you think I can help.
Thank you,
Constantin
 

Attachments

  • Expedia_Panels.jpg
    Expedia_Panels.jpg
    131.2 KB · Views: 218

stanks

Active Member
Licensed User
Longtime User
would be nice to have title label under every thumb....and some other views such as checkbox (e.g. Favorite checkbox)
 

Mrjoey

Active Member
Licensed User
Longtime User
hi mr Lonleystar , first of all , thank u very much for ur awsome libraries , u deserve a big donation , im using this library and B4aGallery , first i have 2 questions :
1 : for this library , i noticed that GridView_ItemClick takes time to be called , why? is that possible to solve this problem?
2 : for B4aGallery , im using 2 in my app , if i call GalleryB.ClearCache on 1 of the 2 i get an error : "arraylist cannot be empty" (im using GalleryB.SetArrayList(lst)) even though i ve created different cache name for both using GalleryB.CreateCache , so what is going here? and how to solve it?
thank u :) best regards.
 

Douglas Farias

Expert
Licensed User
Longtime User
why this error on debug?
libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
its normal ?


and how can use only square on grid? i dont want use circle *-*
 
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User
thx man

man why i have this
LogCat connected to: B4A-Bridge: motorola XT1033-359321054369100
Installing file.
--------- beginning of /dev/log/main
Streams_terminated
sending message to waiting queue (CallSubDelayed - UpdateStatus)
running waiting messages (1)
** Activity (main) Resume **
Connected to B4A-Bridge (Wifi)
Installing file.
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:click.fight.vallow
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sending message to waiting queue of uninitialized activity (submitjob)
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{42652858: android.os.BinderProxy@426527f8}}
ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{426542c8: android.os.BinderProxy@426527f8}}
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{42662b30: android.os.BinderProxy@426527f8}}
** Activity (main) Pause, UserClosed = false **
** Activity (telaprincipal) Create, isFirst = true **
Message longer than Log limit (4000). Message was truncated.
java.lang.StackOverflowError
at java.lang.Throwable.<init>(Throwable.java:67)
at java.lang.Exception.<init>(Exception.java:47)
at java.io.IOException.<init>(IOException.java:44)
at java.io.FileNotFoundException.<init>(FileNotFoundException.java:42)
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:246)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(Ph
Message longer than Log limit (4000). Message was truncated.
** Activity (main) Resume **
Installing file.
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:click.fight.vallow
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sending message to waiting queue of uninitialized activity (submitjob)
** Activity (main) Pause, UserClosed = false **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{4264b690: android.os.BinderProxy@4264b630}}
sending message to waiting queue (CallSubDelayed - JobDone)
** Activity (main) Resume **
Installing file.
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:click.fight.vallow
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sending message to waiting queue of uninitialized activity (submitjob)
** Service (httputils2service) Create **
** Service (httputils2service) Start **
ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{42647048: android.os.BinderProxy@42646fe8}}
** Activity (main) Pause, UserClosed = false **
** Activity (telaprincipal) Create, isFirst = true **
Message longer than Log limit (4000). Message was truncated.
java.lang.StackOverflowError
at java.lang.Throwable.<init>(Throwable.java:67)
at java.lang.Exception.<init>(Exception.java:47)
at java.io.IOException.<init>(IOException.java:44)
at java.io.FileNotFoundException.<init>(FileNotFoundException.java:42)
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:246)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(Ph
Message longer than Log limit (4000). Message was truncated.
** Activity (main) Resume **
Installing file.
** Activity (main) Pause, UserClosed = false **
Installing file.
PackageAdded: package:click.fight.vallow
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sending message to waiting queue of uninitialized activity (submitjob)
** Service (httputils2service) Create **
** Service (httputils2service) Start **
ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{42645de8: android.os.BinderProxy@42645d70}}
** Activity (main) Pause, UserClosed = false **
** Activity (telaprincipal) Create, isFirst = true **
Message longer than Log limit (4000). Message was truncated.
java.lang.StackOverflowError
at java.lang.Throwable.<init>(Throwable.java:67)
at java.lang.Exception.<init>(Exception.java:47)
at java.io.IOException.<init>(IOException.java:44)
at java.io.FileNotFoundException.<init>(FileNotFoundException.java:42)
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:246)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(PhotoGridBaseAdapter.java:248)
at it.giuseppe.salvi.library.photo.grid.view.adapter.PhotoGridBaseAdapter.getBitmapFromAssets(Ph
Message longer than Log limit (4000). Message was truncated.
** Activity (main) Resume **



my main
B4X:
Sub Globals
    Dim GridView As PhotoGridView
    Dim fromWeb() As String
    Dim posSelected As Int
End Sub




Sub Activity_Create(FirstTime As Boolean)

    fp = File.Combine(File.DirDefaultExternal,"click")
    kv.Initialize(fp, "data")
  
    Activity.LoadLayout("telaprincipal")

    sm.Initialize(Activity, Me, "SlideMenu", menu.Height, 80%x  )
    sm.AddItem("Meu Perfil", LoadBitmap(File.DirAssets, "icon_menu_001.png"), 1)
    sm.AddItem("Votar em Batalhas", LoadBitmap(File.DirAssets, "icon_menu_002.png"), 2)
    sm.AddItem("Ver Ranking", LoadBitmap(File.DirAssets, "icon_menu_003.png"), 3 )
    sm.AddItem("Eventos", LoadBitmap(File.DirAssets, "icon_menu_006.png"), 4)
    sm.AddItem("Sair", LoadBitmap(File.DirAssets, "icon_menu_005.png"), 5)
  
    MyFont = Typeface.LoadFromAssets("HavingWritBold.ttf")
    lb1.Typeface = MyFont
    lb2.Typeface = MyFont
    lb3.Typeface = MyFont
  
  
    'GRID
    GridView.Initialize("GridView")
    '*************************************
    Activity.AddView(GridView,0%X,55%Y,100%x,70%y)
    '*************************************
    GridView.ItemWidth= 16%y
    GridView.ItemHeight=GridView.ItemWidth
    GridView.HorizontalSpacing = 4dip
    GridView.VerticalSpacing = 4dip
    GridView.NumColumns = 4
    '*************************************
    GridView.ScaleType = GridView.ScaleType.Center
    '*************************************
    GridView.SetNoEffect = False
    GridView.FadeInTime = 300
    GridView.RoundedBitmap = False
    GridView.SetBorderColor = Colors.White
    GridView.SetCornerRadius = 20
    GridView.SetBorderWidth = 2
    '*************************************
    GridView.ProgressBarIndeterminate = False
    GridView.ProgressBarVisible = True
    '*************************************
    fromWeb = Array As String( _
    "https://lh4.googleusercontent.com/-Z4zGiC5nWdc/URqvBdEwivI/AAAAAAAAAbs/ZRZR1VJ84QA/s1024/Sin%252520Lights.jpg", _
            "https://lh4.googleusercontent.com/-_0cYiWW8ccY/URqvBz3iM4I/AAAAAAAAAbs/9N_Wq8MhLTY/s1024/Starry%252520Lake.jpg", _
            "https://lh3.googleusercontent.com/-A9LMoRyuQUA/URqvCYx_JoI/AAAAAAAAAbs/s7sde1Bz9cI/s1024/Starry%252520Night.jpg", _
            "https://lh3.googleusercontent.com/-KtLJ3k858eY/URqvC_2h_bI/AAAAAAAAAbs/zzEBImwDA_g/s1024/Stream.jpg")
  
  
End Sub

Sub Activity_Resume
    GridView.ResumeEngine
  
        GridView.ShowFromWeb(fromWeb,False)
    If posSelected > GridView.Length Then
        posSelected = GridView.Length-1
    End If
    GridView.Selection = posSelected
  
End Sub


i need to add webimages
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hey guys, take a look at the thumbnails below.

I've this little issue to [ Text_Top_OutSide ]
 

Attachments

  • Text_Top_Outside.jpg
    Text_Top_Outside.jpg
    173.8 KB · Views: 208
  • Text_Top_Inside.jpg
    Text_Top_Inside.jpg
    194.1 KB · Views: 195
  • Text_Center_Inside.jpg
    Text_Center_Inside.jpg
    190.2 KB · Views: 201
  • Text_Bottom_Inside.jpg
    Text_Bottom_Inside.jpg
    186.1 KB · Views: 188
Top