Jun 20, 2015 Replies: 6 This library wraps this project. The code is self explanatory and quite simple. Attached the B4A project. The library files (JAR & XML) are in the /files folder of the attached project. Copy them to your additional libraries folder. You can set the radius of each of the 4 corners of the bitmap individually (dip - pass a float) You can set the color of the border You can set the width of the border (dip - pass a float) You can pass a Boolean (=True) for the bitmap to appear oval shaped It uses resource /Objects/res/values/attrs.xml - include it in your project. Thanks @DonManfred! SelectableRoundedImageView Version: 1 SelectableRoundedImage Fields: ba As BA Methods: BringToFront DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map) 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) setCornerRadiiDP (leftTop As Float, rightTop As Float, leftBottom As Float, rightBottom As Float) Properties: Background As Drawable BorderColor As Int [write only] BorderWidthDP As Float [write only] Color As Int [write only] Enabled As Boolean Height As Int ImageBitmap As Bitmap [write only] Left As Int Oval As Boolean [write only] Tag As Object Top As Int Visible As Boolean Width As Int Attachments SelectableRoundedImageView.zip SelectableRoundedImageView.zip 98.2 KB · Views: 858 Last edited: Jul 4, 2015 Click to expand...
This library wraps this project. The code is self explanatory and quite simple. Attached the B4A project. The library files (JAR & XML) are in the /files folder of the attached project. Copy them to your additional libraries folder. You can set the radius of each of the 4 corners of the bitmap individually (dip - pass a float) You can set the color of the border You can set the width of the border (dip - pass a float) You can pass a Boolean (=True) for the bitmap to appear oval shaped It uses resource /Objects/res/values/attrs.xml - include it in your project. Thanks @DonManfred! SelectableRoundedImageView Version: 1 SelectableRoundedImage Fields: ba As BA Methods: BringToFront DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map) 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) setCornerRadiiDP (leftTop As Float, rightTop As Float, leftBottom As Float, rightBottom As Float) Properties: Background As Drawable BorderColor As Int [write only] BorderWidthDP As Float [write only] Color As Int [write only] Enabled As Boolean Height As Int ImageBitmap As Bitmap [write only] Left As Int Oval As Boolean [write only] Tag As Object Top As Int Visible As Boolean Width As Int
F FrankBerra Active Member Licensed User Longtime User Jan 1, 2016 #2 How to set the Gravity propriety of the images? With your example i can see only a small picture of the dogs inside the boxes...
How to set the Gravity propriety of the images? With your example i can see only a small picture of the dogs inside the boxes...
Johan Schoeman Expert Licensed User Longtime User Jan 3, 2016 #3 FrankBerra said: How to set the Gravity propriety of the images? With your example i can see only a small picture of the dogs inside the boxes... Click to expand... Can you post a screenshot please.
FrankBerra said: How to set the Gravity propriety of the images? With your example i can see only a small picture of the dogs inside the boxes... Click to expand... Can you post a screenshot please.
F FrankBerra Active Member Licensed User Longtime User Jan 3, 2016 #4 Yes, sure. Take a look Attachments Screenshot_20160103-120708.png 168.5 KB · Views: 748
Johan Schoeman Expert Licensed User Longtime User Jan 3, 2016 #5 FrankBerra said: Yes, sure. Take a look Click to expand... Please try it with the attached new library files (I am shooting in the dark here as I don't see what you see on any of my devices).... Attachments SelectableRoundedImageView.zip SelectableRoundedImageView.zip 12.1 KB · Views: 743
FrankBerra said: Yes, sure. Take a look Click to expand... Please try it with the attached new library files (I am shooting in the dark here as I don't see what you see on any of my devices)....
F FrankBerra Active Member Licensed User Longtime User Jan 3, 2016 #6 Yeah! Now it is working! Thank you for the quick fix