Skip to content

Commit 22ee755

Browse files
committed
Version 3.5
1 parent 9b3ba01 commit 22ee755

31 files changed

+2455
-416
lines changed

AndroidDesignExtensions.xojo_project

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Type=Mobile
2-
RBProjectVersion=2024.03
2+
RBProjectVersion=2024.04
33
MinIDEVersion=20190200
44
OrigIDEVersion=20230200
55
Class=App;App.xojo_code;&h000000001ED647FF;&h0000000000000000;false
@@ -50,6 +50,7 @@ Module=ExtensionsXC;AndroidDesignExtensions/ExtensionsXC.xojo_code;&h00000000678
5050
Module=HTMLViewerXC;AndroidDesignExtensions/HTMLViewerXC.xojo_code;&h00000000594D07FF;&h000000004BEA7FFF;false
5151
Module=ImageViewerXC;AndroidDesignExtensions/ImageViewerXC.xojo_code;&h000000002435A7FF;&h000000004BEA7FFF;false
5252
Module=LabelXC;AndroidDesignExtensions/LabelXC.xojo_code;&h000000007692BFFF;&h000000004BEA7FFF;false
53+
Module=MessageBoxXC;AndroidDesignExtensions/MessageBoxXC.xojo_code;&h00000000789937FF;&h000000004BEA7FFF;false
5354
Module=MoviePlayerXC;AndroidDesignExtensions/MoviePlayerXC.xojo_code;&h0000000078D1C7FF;&h000000004BEA7FFF;false
5455
Module=PictureXC;AndroidDesignExtensions/PictureXC.xojo_code;&h000000003150C7FF;&h000000004BEA7FFF;false
5556
Module=PopupMenuXC;AndroidDesignExtensions/PopupMenuXC.xojo_code;&h000000001E123FFF;&h000000004BEA7FFF;false

AndroidDesignExtensions/ApplicationXC.xojo_code

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,17 @@ Protected Module ApplicationXC
138138

139139
#If TargetAndroid
140140

141-
Declare Function isVirtualPreload Lib kApplicationInfoLib (obj As Ptr) As Boolean
142-
Return isVirtualPreload(ApplicationInfo)
141+
' Working for API 27+ (Android 8.1+)
142+
If System.Version.MajorVersion >= 8 And System.Version.MinorVersion >= 1 Then
143+
144+
Declare Function isVirtualPreload Lib kApplicationInfoLib (obj As Ptr) As Boolean
145+
Return isVirtualPreload(ApplicationInfo)
146+
147+
Else
148+
149+
Raise New AndroidException(kAndroidVersionNotSupported)
150+
151+
End If
143152

144153
#EndIf
145154
End Function
@@ -311,8 +320,17 @@ Protected Module ApplicationXC
311320
Get
312321
#If TargetAndroid
313322

314-
Declare Function isNightModeActive Lib kConfigurationLib (obj As Ptr) As Boolean
315-
Return isNightModeActive(Configuration)
323+
' Working for API 30+ (Android 11+)
324+
If System.Version.MajorVersion >= 11 Then
325+
326+
Declare Function isNightModeActive Lib kConfigurationLib (obj As Ptr) As Boolean
327+
Return isNightModeActive(Configuration)
328+
329+
Else
330+
331+
Raise New AndroidException(kAndroidVersionNotSupported)
332+
333+
End If
316334

317335
#EndIf
318336
End Get

AndroidDesignExtensions/ButtonXC.xojo_code

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Protected Module ButtonXC
77

88
#If TargetAndroid
99

10-
Declare Function getCornerRadius Lib kLibMobileButton As Int32
10+
Declare Function getCornerRadius Lib kLibMobileButton As Int32
1111
Return getCornerRadius
1212

1313
#EndIf
@@ -33,7 +33,7 @@ Protected Module ButtonXC
3333

3434
#If TargetAndroid
3535

36-
Declare Function getIconGravity Lib kLibMobileButton As Integer
36+
Declare Function getIconGravity Lib kLibMobileButton As Integer
3737
Return IconGravityXC(getIconGravity)
3838

3939
#EndIf
@@ -59,7 +59,7 @@ Protected Module ButtonXC
5959

6060
#If TargetAndroid
6161

62-
Declare Function getIconPadding Lib kLibMobileButton As Int32
62+
Declare Function getIconPadding Lib kLibMobileButton As Int32
6363
Return getIconPadding
6464

6565
#EndIf
@@ -85,7 +85,7 @@ Protected Module ButtonXC
8585

8686
#If TargetAndroid
8787

88-
Declare Function getIconSize Lib kLibMobileButton As Int32
88+
Declare Function getIconSize Lib kLibMobileButton As Int32
8989
Return getIconSize
9090

9191
#EndIf
@@ -111,7 +111,7 @@ Protected Module ButtonXC
111111

112112
#If TargetAndroid
113113

114-
Declare Function getInsetBottom Lib kLibMobileButton As Int32
114+
Declare Function getInsetBottom Lib kLibMobileButton As Int32
115115
Return getInsetBottom
116116

117117
#EndIf
@@ -137,7 +137,7 @@ Protected Module ButtonXC
137137

138138
#If TargetAndroid
139139

140-
Declare Function getInsetTop Lib kLibMobileButton As Int32
140+
Declare Function getInsetTop Lib kLibMobileButton As Int32
141141
Return getInsetTop
142142

143143
#EndIf
@@ -163,7 +163,7 @@ Protected Module ButtonXC
163163

164164
#If TargetAndroid
165165

166-
Declare Function getStrokeWidth Lib kLibMobileButton As Int32
166+
Declare Function getStrokeWidth Lib kLibMobileButton As Int32
167167
Return getStrokeWidth
168168

169169
#EndIf

0 commit comments

Comments
 (0)