Skip to content

Commit

Permalink
Version 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
XojoGermany committed Mar 26, 2024
1 parent 56aacaa commit 76287bd
Show file tree
Hide file tree
Showing 27 changed files with 1,697 additions and 41 deletions.
4 changes: 3 additions & 1 deletion AndroidDesignExtensions.xojo_project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Type=Mobile
RBProjectVersion=2023.031
RBProjectVersion=2024.01
MinIDEVersion=20190200
OrigIDEVersion=20230200
Class=App;App.xojo_code;&h000000001ED647FF;&h0000000000000000;false
Expand Down Expand Up @@ -52,6 +52,7 @@ Module=TableXC;AndroidDesignExtensions/TableXC.xojo_code;&h000000000C4DF7FF;&h00
Module=TabPanelXC;AndroidDesignExtensions/TabPanelXC.xojo_code;&h000000002EC2DFFF;&h000000004BEA7FFF;false
Module=TextAreaXC;AndroidDesignExtensions/TextAreaXC.xojo_code;&h000000002DDA47FF;&h000000004BEA7FFF;false
Module=TextFieldXC;AndroidDesignExtensions/TextFieldXC.xojo_code;&h0000000075D887FF;&h000000004BEA7FFF;false
Module=XojoExtensionsXC;AndroidDesignExtensions/XojoExtensionsXC.xojo_code;&h00000000254A27FF;&h000000004BEA7FFF;false
MobileContainer=NavigationBarContainer;Containers/NavigationBarContainer.xojo_code;&h000000006F7087FF;&h000000003BC167FF;false
Class=TemplateScreen;Screens/TemplateScreen.xojo_code;&h00000000051417FF;&h000000005B965FFF;false
MobileContainer=Panel1Container;Containers/Panel1Container.xojo_code;&h000000004E11E7FF;&h000000003BC167FF;false
Expand Down Expand Up @@ -94,6 +95,7 @@ MobileThemePrimaryColor=&h00419CFF
MobileThemeStatusBarColor=&h00F2F2F7
MobileThemeAccentColor=&h000A84FF
ManifestPermissions=
ProjectDependencies=
BuildForPlayStore=False
KeyStoreFile=
MacBuildArchitecture=1
Expand Down
332 changes: 332 additions & 0 deletions AndroidDesignExtensions/ButtonXC.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,84 @@ Protected Module ButtonXC
End Function
#tag EndMethod

#tag Method, Flags = &h0, Description = 47657473207468652069636F6E206772617669747920666F72207468697320627574746F6E2E
Function GetIconGravityXC(Extends ctrl As MobileButton) As IconGravity
#Pragma Unused ctrl

#If TargetAndroid

Declare Function getIconGravity Lib "Object:ctrl:MobileButton" As Integer
Return IconGravity(getIconGravity)

#EndIf
End Function
#tag EndMethod

#tag Method, Flags = &h0, Description = 47657473207468652069636F6E206772617669747920666F72207468697320627574746F6E2E
Function GetIconGravityXC(Extends ctrl As MobileDateTimePicker) As IconGravity
#Pragma Unused ctrl

#If TargetAndroid

Declare Function getIconGravity Lib "Object:ctrl:MobileDateTimePicker" As Integer
Return IconGravity(getIconGravity)

#EndIf
End Function
#tag EndMethod

#tag Method, Flags = &h0, Description = 47657473207468652070616464696E67206265747765656E2074686520627574746F6E2069636F6E20616E642074686520627574746F6E20746578742C2069662069636F6E2069732070726573656E742E
Function GetIconPaddingXC(Extends ctrl As MobileButton) As Integer
#Pragma Unused ctrl

#If TargetAndroid

Declare Function getIconPadding Lib "Object:ctrl:MobileButton" As Integer
Return getIconPadding

#EndIf
End Function
#tag EndMethod

#tag Method, Flags = &h0, Description = 47657473207468652070616464696E67206265747765656E2074686520627574746F6E2069636F6E20616E642074686520627574746F6E20746578742C2069662069636F6E2069732070726573656E742E
Function GetIconPaddingXC(Extends ctrl As MobileDateTimePicker) As Integer
#Pragma Unused ctrl

#If TargetAndroid

Declare Function getIconPadding Lib "Object:ctrl:MobileDateTimePicker" As Integer
Return getIconPadding

#EndIf
End Function
#tag EndMethod

#tag Method, Flags = &h0, Description = 52657475726E73207468652073697A65206F66207468652069636F6E20696620697420776173207365742E
Function GetIconSizeXC(Extends ctrl As MobileButton) As Integer
#Pragma Unused ctrl

#If TargetAndroid

Declare Function getIconSize Lib "Object:ctrl:MobileButton" As Integer
Return getIconSize

#EndIf
End Function
#tag EndMethod

#tag Method, Flags = &h0, Description = 52657475726E73207468652073697A65206F66207468652069636F6E20696620697420776173207365742E
Function GetIconSizeXC(Extends ctrl As MobileDateTimePicker) As Integer
#Pragma Unused ctrl

#If TargetAndroid

Declare Function getIconSize Lib "Object:ctrl:MobileDateTimePicker" As Integer
Return getIconSize

#EndIf
End Function
#tag EndMethod

#tag Method, Flags = &h0, Description = 476574732074686520626F74746F6D20696E73657420666F72207468697320627574746F6E2E
Function GetInsetBottomXC(Extends ctrl As MobileButton) As Integer
#Pragma Unused ctrl
Expand Down Expand Up @@ -118,6 +196,40 @@ Protected Module ButtonXC
End Function
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657420746865206261636B67726F756E6420746F206120676976656E207265736F757263652E20546865207265736F757263652073686F756C6420726566657220746F2061204472617761626C65206F626A656374206F72203020746F2072656D6F766520746865206261636B67726F756E642E
Sub SetBackgroundResourceXC(Extends ctrl As MobileButton, resid As Integer)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setBackgroundResource Lib "Object:ctrl:MobileButton" (myResId As Integer)
setBackgroundResource(resid)

#Else

#Pragma Unused resid

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657420746865206261636B67726F756E6420746F206120676976656E207265736F757263652E20546865207265736F757263652073686F756C6420726566657220746F2061204472617761626C65206F626A656374206F72203020746F2072656D6F766520746865206261636B67726F756E642E
Sub SetBackgroundResourceXC(Extends ctrl As MobileDateTimePicker, resid As Integer)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setBackgroundResource Lib "Object:ctrl:MobileDateTimePicker" (myResId As Integer)
setBackgroundResource(resid)

#Else

#Pragma Unused resid

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 536574732074686520636F726E65722072616469757320666F72207468697320627574746F6E2E
Sub SetCornerRadiusXC(Extends ctrl As MobileButton, radius As Integer)
#Pragma Unused ctrl
Expand Down Expand Up @@ -152,6 +264,216 @@ Protected Module ButtonXC
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652069636F6E206772617669747920666F72207468697320627574746F6E2E
Sub SetIconGravityXC(Extends ctrl As MobileButton, gravity As IconGravity)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconGravity Lib "Object:ctrl:MobileButton" (myIconGravity As Integer)
setIconGravity(Integer(gravity))

#Else

#Pragma Unused gravity

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652069636F6E206772617669747920666F72207468697320627574746F6E2E
Sub SetIconGravityXC(Extends ctrl As MobileDateTimePicker, gravity As IconGravity)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconGravity Lib "Object:ctrl:MobileDateTimePicker" (myIconGravity As Integer)
setIconGravity(Integer(gravity))

#Else

#Pragma Unused gravity

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652070616464696E67206265747765656E2074686520627574746F6E2069636F6E20616E642074686520627574746F6E20746578742C2069662069636F6E2069732070726573656E742E
Sub SetIconPaddingXC(Extends ctrl As MobileButton, iconPadding As Integer)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconPadding Lib "Object:ctrl:MobileButton" (myIconPadding As Integer)
setIconPadding(iconPadding)

#Else

#Pragma Unused iconPadding

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652070616464696E67206265747765656E2074686520627574746F6E2069636F6E20616E642074686520627574746F6E20746578742C2069662069636F6E2069732070726573656E742E
Sub SetIconPaddingXC(Extends ctrl As MobileDateTimePicker, iconPadding As Integer)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconPadding Lib "Object:ctrl:MobileDateTimePicker" (myIconPadding As Integer)
setIconPadding(iconPadding)

#Else

#Pragma Unused iconPadding

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 536574732074686520776964746820616E6420686569676874206F66207468652069636F6E2E20557365203020746F2075736520736F75726365204472617761626C652073697A652E
Sub SetIconSizeXC(Extends ctrl As MobileButton, iconSize As Integer)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconSize Lib "Object:ctrl:MobileButton" (myIconSize As Integer)
setIconSize(iconSize)

#Else

#Pragma Unused iconSize

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 536574732074686520776964746820616E6420686569676874206F66207468652069636F6E2E20557365203020746F2075736520736F75726365204472617761626C652073697A652E
Sub SetIconSizeXC(Extends ctrl As MobileDateTimePicker, iconSize As Integer)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconSize Lib "Object:ctrl:MobileDateTimePicker" (myIconSize As Integer)
setIconSize(iconSize)

#Else

#Pragma Unused iconSize

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652074696E74206D6F646520666F72207468652069636F6E2073686F776E20666F72207468697320627574746F6E2E
Sub SetIconTintModeXC(Extends ctrl As MobileButton, mode As PorterDuffModes)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconTintMode Lib "Object:ctrl:MobileButton:Kotlin" Alias "setIconTintMode(android.graphics.PorterDuff.Mode.valueOf(mymode.toString()))" (myMode As CString)
setIconTintMode(mode.ToString)

#Else

#Pragma Unused mode

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652074696E74206D6F646520666F72207468652069636F6E2073686F776E20666F72207468697320627574746F6E2E
Sub SetIconTintModeXC(Extends ctrl As MobileDateTimePicker, mode As PorterDuffModes)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconTintMode Lib "Object:ctrl:MobileDateTimePicker:Kotlin" Alias "setIconTintMode(android.graphics.PorterDuff.Mode.valueOf(mymode.toString()))" (myMode As CString)
setIconTintMode(mode.ToString)

#Else

#Pragma Unused mode

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652074696E74206C69737420666F72207468652069636F6E2073686F776E20666F72207468697320627574746F6E2E
Sub SetIconTintXC(Extends ctrl As MobileButton, c As Color)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconTint Lib "Object:ctrl:MobileButton:Kotlin" Alias _
"setStrokeColor(android.content.res.ColorStateList.valueOf(android.graphics.Color.argb(alpha.toInt(), r.toInt(), g.toInt(), b.toInt())))" _
(alpha As Integer, r As Integer, g As Integer, b As Integer)

setIconTint(255 - c.Alpha, c.Red, c.Green, c.Blue)

#Else

#Pragma Unused c

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652074696E74206C69737420666F72207468652069636F6E2073686F776E20666F72207468697320627574746F6E2E
Sub SetIconTintXC(Extends ctrl As MobileDateTimePicker, c As Color)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIconTint Lib "Object:ctrl:MobileDateTimePicker:Kotlin" Alias _
"setStrokeColor(android.content.res.ColorStateList.valueOf(android.graphics.Color.argb(alpha.toInt(), r.toInt(), g.toInt(), b.toInt())))" _
(alpha As Integer, r As Integer, g As Integer, b As Integer)

setIconTint(255 - c.Alpha, c.Red, c.Green, c.Blue)

#Else

#Pragma Unused c

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652069636F6E20746F2073686F7720666F72207468697320627574746F6E2E2042792064656661756C742C20746869732069636F6E2077696C6C2062652073686F776E206F6E20746865206C6566742073696465206F662074686520627574746F6E2E
Sub SetIconXC(Extends ctrl As MobileButton, file As FolderItem)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIcon Lib "Object:ctrl:MobileButton:Kotlin" Alias "setIcon(android.graphics.drawable.Drawable.createFromPath(myicon.toString()))" (myIcon As CString)
setIcon(file.NativePath)

#Else

#Pragma Unused file

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 53657473207468652069636F6E20746F2073686F7720666F72207468697320627574746F6E2E2042792064656661756C742C20746869732069636F6E2077696C6C2062652073686F776E206F6E20746865206C6566742073696465206F662074686520627574746F6E2E
Sub SetIconXC(Extends ctrl As MobileDateTimePicker, file As FolderItem)
#Pragma Unused ctrl

#If TargetAndroid

Declare Sub setIcon Lib "Object:ctrl:MobileDateTimePicker:Kotlin" Alias "setIcon(android.graphics.drawable.Drawable.createFromPath(myicon.toString()))" (myIcon As CString)
setIcon(file.NativePath)

#Else

#Pragma Unused file

#EndIf
End Sub
#tag EndMethod

#tag Method, Flags = &h0, Description = 536574732074686520627574746F6E20626F74746F6D20696E7365742E
Sub SetInsetBottomXC(Extends ctrl As MobileButton, insetBottom As Integer)
#Pragma Unused ctrl
Expand Down Expand Up @@ -367,6 +689,16 @@ Protected Module ButtonXC
#tag EndMethod


#tag Enum, Name = IconGravity, Type = Integer, Flags = &h0
End_ = 3
Start = 1
TextEnd = 4
TextStart = 2
TextTop = 32
Top = 16
#tag EndEnum


#tag ViewBehavior
#tag ViewProperty
Name="Name"
Expand Down
Loading

0 comments on commit 76287bd

Please sign in to comment.