Oct 10, 2015 Replies: 30 This is a wrapper for this Github-Project. MaterialFavoriteButton Version: 1 MaterialFavoriteButton Fields: ba As BA Methods: AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int) BringToFront DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map) Initialize (EventName As String) 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) SetFavorite (favorite As Boolean) Changes the favorite state of this button. favorite: true to favorite the button, false to uncheck it 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) isFavorite As Boolean Returns favorite state. Return type: @return:true if button is in favorite state, false if not Properties: AnimateFavorite As Boolean [write only] AnimateUnfavorite As Boolean [write only] Background As Drawable BounceDuration As Int [write only] Color As Int [write only] Enabled As Boolean FavoriteResource As String [write only] Height As Int Left As Int NotFavoriteResource As String [write only] Padding As Int [write only] RotationAngle As Int [write only] RotationDuration As Int [write only] Tag As Object Top As Int Type As Int [write only] Visible As Boolean Width As Int There are four "build-in" favorites: Heart and Star. Each in White and Black They can be set using the "Color" and the "Type" of the FavoriteButton Color = 0 (Black) or 1 (White) Type = 0 (Star) or 1 () But you can set your own Favorite Buttons using Code: Copy fav3.FavoriteResource = "ic_event_available_black_24dp" fav3.NotFavoriteResource = "ic_event_busy_black_24dp" If you want to donate for my work building the wrapper you can do it here: Attachments MaterialFavoriteButtonEx.zip MaterialFavoriteButtonEx.zip 44.2 KB · Views: 1,001 libFavoriteButtonV1.0.0.zip libFavoriteButtonV1.0.0.zip 15.1 KB · Views: 985 Last edited: Oct 13, 2015 Click to expand...
This is a wrapper for this Github-Project. MaterialFavoriteButton Version: 1 MaterialFavoriteButton Fields: ba As BA Methods: AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int) BringToFront DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map) Initialize (EventName As String) 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) SetFavorite (favorite As Boolean) Changes the favorite state of this button. favorite: true to favorite the button, false to uncheck it 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) isFavorite As Boolean Returns favorite state. Return type: @return:true if button is in favorite state, false if not Properties: AnimateFavorite As Boolean [write only] AnimateUnfavorite As Boolean [write only] Background As Drawable BounceDuration As Int [write only] Color As Int [write only] Enabled As Boolean FavoriteResource As String [write only] Height As Int Left As Int NotFavoriteResource As String [write only] Padding As Int [write only] RotationAngle As Int [write only] RotationDuration As Int [write only] Tag As Object Top As Int Type As Int [write only] Visible As Boolean Width As Int There are four "build-in" favorites: Heart and Star. Each in White and Black They can be set using the "Color" and the "Type" of the FavoriteButton Color = 0 (Black) or 1 (White) Type = 0 (Star) or 1 () But you can set your own Favorite Buttons using Code: Copy fav3.FavoriteResource = "ic_event_available_black_24dp" fav3.NotFavoriteResource = "ic_event_busy_black_24dp" If you want to donate for my work building the wrapper you can do it here:
A Alisson Active Member Licensed User Jan 5, 2016 #21 I fix de path to android.jar. But the compiler answer with message: No resource identifier found for attribute 'installLocation' in package 'android' I search the message error in b4x.com/forum, google and others, but not solve my problem. Attachments upload_2016-1-5_18-24-58.png 118.1 KB · Views: 499
I fix de path to android.jar. But the compiler answer with message: No resource identifier found for attribute 'installLocation' in package 'android' I search the message error in b4x.com/forum, google and others, but not solve my problem.
Erel B4X founder Staff member Licensed User Longtime User Jan 6, 2016 #22 You should update android.jar to API 20+.
A Alisson Active Member Licensed User Jan 8, 2016 #23 I change path to android.jar. Now have the error: B4A version: 5.50 Parsing code. (0.00s) Compiling code. (0.06s) ObfuscatorMap.txt file created in Objects folder. Compiling layouts code. (0.00s) Generating R file. Error AndroidManifest.xml:14: error: Error: No resource found that matches the given name (at 'theme' with value '@android:style/Theme.Holo').
I change path to android.jar. Now have the error: B4A version: 5.50 Parsing code. (0.00s) Compiling code. (0.06s) ObfuscatorMap.txt file created in Objects folder. Compiling layouts code. (0.00s) Generating R file. Error AndroidManifest.xml:14: error: Error: No resource found that matches the given name (at 'theme' with value '@android:style/Theme.Holo').
DonManfred Expert Licensed User Longtime User Jan 8, 2016 #24 Which path did you set exactly for the android.jar in Tools->Configure paths?
A Alisson Active Member Licensed User Jan 8, 2016 #25 Javac.exe C:\Program Files\Java\jdk1.8.0_45\bin\javac.exe android.jar D:\download\android\android.jar Additional Libraries C:\Users\Modal\Desktop\Android\Librarys I test one simple app and not run.
Javac.exe C:\Program Files\Java\jdk1.8.0_45\bin\javac.exe android.jar D:\download\android\android.jar Additional Libraries C:\Users\Modal\Desktop\Android\Librarys I test one simple app and not run.
DonManfred Expert Licensed User Longtime User Jan 8, 2016 #26 Alisson said: android.jar D:\download\android\android.jar Click to expand... This is not a path from the Android SDK!? Did yo downloaded some android.jar and just referenced this one??? Usually there should be a Path like Code: Copy E:\Android\android-sdk\platforms\android-21\android.jar
Alisson said: android.jar D:\download\android\android.jar Click to expand... This is not a path from the Android SDK!? Did yo downloaded some android.jar and just referenced this one??? Usually there should be a Path like Code: Copy E:\Android\android-sdk\platforms\android-21\android.jar
A Alisson Active Member Licensed User Jan 8, 2016 #27 Erel and DonManfred, thanks very much! I unistall and install to code run. I very like of the code. DonManfred, congratulations.
Erel and DonManfred, thanks very much! I unistall and install to code run. I very like of the code. DonManfred, congratulations.
M MAGAREY Member Licensed User Longtime User Feb 4, 2017 #28 there is a way to catch the click or change event?
PABLO2013 Well-Known Member Licensed User Longtime User Feb 14, 2017 #29 tks don, there is a way to catch the click or change event?
DonManfred Expert Licensed User Longtime User Feb 14, 2017 #30 No. The lib does not implement listeners