B4A Library [Library] B4aGridView v3.80

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi guys B4AGridView has been updated to v3.80. What's new:

fixed:

Initialize2 - to set your own cache

TextBackGroundColor - the value as object example:

TextBackGroundColor = Colors.ARGB(100,20,20,20) - Colors.RGB(20,20,20)
or
TextBackGroundColor = "#AA335577"
in any case you forget to add the character ( # ) in the string will be added automatically

TextColor like above

InitializeFromLayout(EventName,cacheDir,Layout,LayoutID) instead of InitializeFromLayout(EventName,Container,Layout,LayoutID)


removed:

TextBackGroundColor2
TextColor2

added:

AnimationCacheEnabled - to get better scroll you should set it to false

ScrollingCacheEnabled - to get better scroll you should set it to false

_ScrollChanged(FirstVisibleItem As Int, VisibleItemCount As Int, TotalItemCount As Int, view As Object)


Fixed:

ShowActionBarToShare

if you wish to use the fixed ShowActionBarToShare you should extend AppCompatActivity code below

#Extends: android.support.v7.app.AppCompatActivity

and this below to the manifest or in res/values

B4X:
CreateResource(values, styles.xml,
<resources>

   <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
   <!-- Color used for toolbar background -->
     <item name="colorPrimary">#2196f3</item>  
     <item name="colorPrimaryDark">#0d47a1</item>
     <item name="colorAccent">#bbdefb</item>
   </style>

</resources>
)
 

Attachments

  • fixed_action_bar.jpg
    231.3 KB · Views: 260
Last edited:

lonleystar

Well-Known Member
Licensed User
Longtime User
Give me some time to check it
 

Marco Nissen

Active Member
Licensed User
Longtime User
Give me some time to check it

I checked your java code (with JAD) and it said that mGridData was undefined
Give me some time to check it
Thanks.

I guess the easiest would be, if you update your example app, that you include a setText call.
If that works, and some label is displayed, it should also work in my environment ....
or if not, clearly it would be an issue on my side

alternatively, you can call the method to reset the memory cache, which also currently creates an error
from JAD (disassembles classes), I guess that mGridData is probably uninitialized
 

lonleystar

Well-Known Member
Licensed User
Longtime User


fixed the problem just download B4AGridView_Lib_v380.zip and let me know about.
 

Marco Nissen

Active Member
Licensed User
Longtime User
fixed the problem just download B4AGridView_Lib_v380.zip and let me know about.

Can't compile the 3.70 example:

B4X:
B4A version: 6.50
Parsing code.    (0.00s)
Compiling code.    (0.10s)
Compiling layouts code.    (0.03s)
Organizing libraries.    (3.11s)
Generating R file.    Error
\\Mac\Home\Downloads\B4AGridView v3.70 2\Objects\bin\extra\res1\res\values-v23\values-v23.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
\\Mac\Home\Downloads\B4AGridView v3.70 2\Objects\bin\extra\res1\res\values-v23\values-v23.xml:34: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi, just now i tried and wor fine have a look to the thumbnail.
 

Attachments

  • pic.jpg
    145.1 KB · Views: 218
  • pic.jpg
    145.1 KB · Views: 213

Marco Nissen

Active Member
Licensed User
Longtime User
Hi, just now i tried and wor fine have a look to the thumbnail.

ok, but if I take another project that compiles fine, and just add the 3.80 library, then I get this error

B4X:
B4A version: 6.50
Parsing code.    (0.03s)
Compiling code.    (0.18s)
Compiling layouts code.    (0.03s)
Organizing libraries.    (5.14s)
Generating R file.    Error
\\Mac\Home\Documents\refuchat\Android\Objects\bin\extra\res1\res\values-v23\values-v23.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
\\Mac\Home\Documents\refuchat\Android\Objects\bin\extra\res1\res\values-v23\values-v23.xml:34: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
\\Mac\Home\Documents\refuchat\Android\Objects\bin\extra\res1\res\values-v24\values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
\\Mac\Home\Documents\refuchat\Android\Objects\bin\extra\res1\res\values-v24\values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

If I use the 3.70 library, then I have no compilation errors whatsoever

I also updated all files using the SDK manager, to make sure there's nothing old.

Therefore it looks like you changed something in the 3.80 library that prevents compiling.
Can you tell what needs to be changed on my end ?
 

lonleystar

Well-Known Member
Licensed User
Longtime User


Hi, can u send your code or a demo to check it because i tried many configurations and work fine i dont get anyerror when i compile
 

Attachments

  • a.jpg
    275.5 KB · Views: 217
  • b.jpg
    279.9 KB · Views: 215

Marco Nissen

Active Member
Licensed User
Longtime User
I can use any piece of code. As soon as I add B4AGridView 3.80, it will produce the above issue.
I think it might be linked to something related to the SDK version.
But since 3.7 and 3.8 differ, there should be an issue with that.
 

Mahares

Expert
Licensed User
Longtime User
i tried many configurations and work fine
But since 3.7 and 3.8 differ, there should be an issue with that.
I tried the new lib 3.80 with the old example that @lonleystar created and everything works fine. B4A 6.50, C:\Android\platforms\android-25\android.jar:
Question for @lonleystar:
1. When clicking a picture, how can you zoom in or out that picture?
2, To know which effect is shown, I added this Activity.Title="Standard Effect" for example:
B4X:
Sub a16_Click
    GridView.TransitionEffect = GridView.TransitionEffect.STANDARD
    Activity.Title="Standard Effect"    'Mahares Added this line
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
I tried the new lib 3.80 with the old example that @lonleystar created and everything works fine. B4A 6.50, C:\Android\platforms\android-25\android.jar:
The same here. I did not used th lib before. The Example for 3.7 together wiith the lib 3.8 works just fine on my Android 6 device.
At first start i got a asked to give permission but then it works good.

@lonleystar Good work
 

MarcoRome

Expert
Licensed User
Longtime User

Do you change this:

 

Marco Nissen

Active Member
Licensed User
Longtime User
please ensure that we can use it also with API 19 ..
or at least API 21
 
Last edited:

Marco Nissen

Active Member
Licensed User
Longtime User
Hi, guys the library is fixed please download B4AGridView_Lib_v3.80_Fix.zip if You wish to use to all api and have a look to the thumbnail.
ok, I can compile it with API 24, but if I want to support API 21,22,23 phones, you are not supporting it ?
 

lonleystar

Well-Known Member
Licensed User
Longtime User
ok, I can compile it with API 24, but if I want to support API 21,22,23 phones, you are not supporting it ?

Hi, I compiled the demo to my old tab api 10 with the configuration you see in the thumbnails.
Anyway did you see the thumbnails? It also supports Gingerbread. (API 10)

Friction and ShowActionBarToShare doesn't work in Gingerbread.
 

Marco Nissen

Active Member
Licensed User
Longtime User
Hi, I compiled the demo to my old tab api 10 with the configuration you see in the thumbnails.
Anyway did you see the thumbnails? It also supports Gingerbread. (API 10)

Friction and ShowActionBarToShare doesn't work in Gingerbread.

So did you compile the library for target API25 as indicated in the screenshots?
If I select 21 or 23, then I get these error messages. If I select 24, it compiles.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
So did you compile the library for target API25 as indicated in the screenshots?
If I select 21 or 23, then I get these error messages. If I select 24, it compiles.
Hi, can you tell me wich problem you find if you compile with api 25?

As I shown in the thumbnails I compiled the demo with api 25 to the tab 7 2.3.3 and work fine.

Let me know

Best Regard
 

Marco Nissen

Active Member
Licensed User
Longtime User
my understanding was that if I want the app to run on 5.x devices, I can't use API25
is that wrong?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…