Hi guys I am proud to share with you all a new library B4AMediaBucket v1.20 explanations below:
This library is used with B4AGridview, B4AGallery, B4ACoverflow and B4APhotoPager. right now is used only with B4AGridview till at the end of the next week I'll try to fix all library to work properly with B4AMediaBucket.
I have uploaded a zip file, the zip includes:
1 - library
3 - demos with photopager and gridview
1 - resource
B4AMediaBucket v1.0_From_Designer - open te Designer and check it out
B4AMediaBucket v1.0_From_Layout - can be used with LinearLayout, FrameLayot, RelativeLayout - open te Manifest and check it out.
You can use Eclipse or AndroidStudio to build your own layout
B4AMediaBucket v1.0_Programmatically
below all features:
This library is used with B4AGridview, B4AGallery, B4ACoverflow and B4APhotoPager. right now is used only with B4AGridview till at the end of the next week I'll try to fix all library to work properly with B4AMediaBucket.
I have uploaded a zip file, the zip includes:
1 - library
3 - demos with photopager and gridview
1 - resource
B4AMediaBucket v1.0_From_Designer - open te Designer and check it out
B4AMediaBucket v1.0_From_Layout - can be used with LinearLayout, FrameLayot, RelativeLayout - open te Manifest and check it out.
You can use Eclipse or AndroidStudio to build your own layout
B4AMediaBucket v1.0_Programmatically
below all features:
- B4AMediaBucket
Author: Giuseppe Salvi
Version: 1.2
Fields:- Bottom_Inside As BucketGravity
Text Bottom InSide - Bottom_OutSide As BucketGravity
Text Bottom OutSide - Center_Inside As BucketGravity
Text Center InSide - Text_Center As BucketGravity
Text center - Text_Left As BucketGravity
Text left - Text_Right As BucketGravity
Text right - Top_Inside As BucketGravity
Text Top InSide - Top_OutSide As BucketGravity
Text Top OutSide
- Bottom_Inside As BucketGravity
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.
- AUTO_FIT As Int
Fields:- SCREEN_ORIENTATION_BEHIND As Int
- SCREEN_ORIENTATION_FULL_SENSOR As Int
- SCREEN_ORIENTATION_LANDSCAPE As Int
- SCREEN_ORIENTATION_NOSENSOR As Int
- SCREEN_ORIENTATION_PORTRAIT As Int
- SCREEN_ORIENTATION_REVERSE_LANDSCAPE As Int
- SCREEN_ORIENTATION_REVERSE_PORTRAIT As Int
- SCREEN_ORIENTATION_SENSOR As Int
- SCREEN_ORIENTATION_SENSOR_LANDSCAPE As Int
- SCREEN_ORIENTATION_SENSOR_PORTRAIT As Int
- SCREEN_ORIENTATION_UNSPECIFIED As Int
- SCREEN_ORIENTATION_USER As Int
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.
- Center As ScaleType
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.
- 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.
- Default As Typeface
- MediaBucketGallery
Events:- ItemClick (Position As Int, Value As Object)
- ItemLongClick (Position As Int, Value As Object)
- Ready
- AddThisView
Adds view to this activity 100%x,100%y. - BringToFront
- ClearDiskCache
Clears disk cache. - ClearMemoryCache
Clears memory cache - DesignerCreateView (base As PanelWrapper, label As LabelWrapper, props As Map)
This method is only for the B4A Designer. Don't call it directly. - Initialize (EventName As String)
Initialize the object.
EventName: - Initialize2 (EventName As String, cacheDir As String)
Initialize the object and set own cache dir.
EventName:
cacheDir: - InitializeFromLayout (EventName As String, cacheDir As String, Layout As String, LayoutID As String)
Initialize the object from layout.
EventName:
cacheDir:
Layout:
LayoutID: - Invalidate
- Invalidate2 (arg0 As Rect)
- Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- IsInitialized As Boolean
- RemoveView
- RequestFocus As Boolean
- SendToBack
- SetBackgroundImage (arg0 As Bitmap)
- SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
- SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
- SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
- ShowMediaFromBucket
Show media from bucket.
- android.permission.INTERNET
- android.permission.MEDIA_CONTENT_CONTROL
- android.permission.READ_EXTERNAL_STORAGE
- android.permission.WRITE_EXTERNAL_STORAGE
- Background As Drawable
- 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. - Color As Int [write only]
- Enabled As Boolean
- Gravity As Int [write only]
Specifies the gravity within each cell. - Height As Int
- Icon As String [write only]
Sets own folder icon. - IconVisible As Boolean
Get or Sets the visibility of the icon displayed right to the text - by default is false. - ImageOnFail As String [write only]
Sets own error icon. - ImageOnLoading As String [write only]
Sets own on loading icon. - ItemHeight As Int
Get or Set ItemHeight - ItemWidth As Int
Get or Sets ItemWidth - Left As Int
- 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. - Padding()() As Int
- Parent As Object [read only]
- ReflectionAlpha As Int [write only]
Sets alpha by default is 125 - ReflectionGap As Int [write only]
Sets gap by default is 4 - ScaleType As BucketScaleType
Controls how the image should be resized or moved to match the size of this ImageView.
by default ScaleType.CENTER_CROP - ShowReflection As Boolean [write only]
Set to true if reflection must be shown by default is false - Spacing As Int [write only]
Sets the spacing between items in a Gallery - Tag As Object
Get or Sets this view's tag. - TextBackGroundColor As String
Get or Sets the background color for this view.
Example:
TextBackGroundColor = "#88666666"
or
TextBackGroundColor = Colors.ARGB(100,20,20,20) - TextColor As String
Get or Sets Text Color - by default White. - TextGravity As BucketGravity [write only]
Set the position alignment of the text that will be used.
<b>param Text_Left</b>
<b>param Text_Center</b>
<b>param Text_Right</b> - TextPosition As BucketTextPosition
Get or Sets the position alignment of the TextView that will be used.
<b>param Top_Outside</b>
<b>param Top_Inside</b>
<b>param Center_Inside</b>
<b>param Bottom_Inside</b>
<b>param Bottom_Outside</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 BucketTypefaceUtils
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 false. - Top As Int
- Version As String [read only]
Version of the library - Visible As Boolean
- Width As Int
- MediaBucketGrid
Events:- ItemClick (Position As Int, Value As Object)
- ItemLongClick (Position As Int, Value As Object)
- Ready
- AddThisView
Adds view to this activity 100%x,100%y. - BringToFront
- ClearDiskCache
Clears disk cache. - ClearMemoryCache
Clears memory cache - DesignerCreateView (base As PanelWrapper, label As LabelWrapper, props As Map)
This method is only for the B4A Designer. Don't call it directly. - Initialize (EventName As String)
Initialize the object.
EventName: - Initialize2 (EventName As String, cacheDir As String)
Initialize the object and set own cache dir.
EventName:
cacheDir: - InitializeFromLayout (EventName As String, cacheDir As String, Layout As String, LayoutID As String)
Initialize the object from layout.
EventName:
cacheDir:
Layout:
LayoutID: - Invalidate
- Invalidate2 (arg0 As Rect)
- Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- IsInitialized As Boolean
- RemoveView
- RequestFocus As Boolean
- SendToBack
- SetBackgroundImage (arg0 As Bitmap)
- SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
- SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
- SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
- ShowMediaFromBucket
Show media from bucket.
- android.permission.INTERNET
- android.permission.MEDIA_CONTENT_CONTROL
- android.permission.READ_EXTERNAL_STORAGE
- android.permission.WRITE_EXTERNAL_STORAGE
- Background As Drawable
- 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. - Color As Int [write only]
- ColumnWidth As Int
Get or Sets Specifies the fixed width for each column. - Enabled As Boolean
- Gravity As Int [write only]
Specifies the gravity within each cell. - Height As Int
- HorizontalSpacing As Int [write only]
Defines the default horizontal spacing between columns. - Icon As String [write only]
Sets own folder icon. - IconVisible As Boolean
Get or Sets the visibility of the icon displayed right to the text - by default is false. - ImageOnFail As String [write only]
Sets own error icon. - ImageOnLoading As String [write only]
Sets own on loading icon. - ItemHeight As Int
Get or Set ItemHeight - ItemWidth As Int
Get or Sets ItemWidth - Left As Int
- 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. - NumColumns As Int
Get or Sets the number of columns in the grid. - Orientation As ActivityOrientation
Constant corresponding to unspecified, reverseLandscape, portrait in the screen Orientation attribute. - Padding()() As Int
- Parent As Object [read only]
- ScaleType As BucketScaleType
Controls how the image should be resized or moved to match the size of this ImageView.
by default ScaleType.CENTER_CROP - StretchMode As BucketStretchMode
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. - TextBackGroundColor As String
Get or Sets the background color for this view.
Example:
TextBackGroundColor = "#88666666"
or
TextBackGroundColor = Colors.ARGB(100,20,20,20) - TextColor As String
Get or Sets Text Color - by default White. - TextGravity As BucketGravity [write only]
Set the position alignment of the text that will be used.
<b>param Text_Left</b>
<b>param Text_Center</b>
<b>param Text_Right</b> - TextPosition As BucketTextPosition
Get or Sets the position alignment of the TextView that will be used.
<b>param Top_Outside</b>
<b>param Top_Inside</b>
<b>param Center_Inside</b>
<b>param Bottom_Inside</b>
<b>param Bottom_Outside</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 BucketTypefaceUtils
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 false. - Top As Int
- Version As String [read only]
Version of the library - VerticalSpacing As Int [write only]
Defines the default vertical spacing between rows. - Visible As Boolean
- Width As Int
Attachments
Last edited: