Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
c2ddc809
Commit
c2ddc809
authored
Nov 27, 2023
by
Evan W. Patton
Committed by
Jeffrey Schiller
Nov 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade formally to DeviceDefault theme as default
Change-Id: Iaa638a74b3e992caf05ef7376de5ff7aab57ab6f
parent
953886cd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
5 deletions
+35
-5
appinventor/appengine/src/com/google/appinventor/client/youngandroid/YoungAndroidFormUpgrader.java
...nventor/client/youngandroid/YoungAndroidFormUpgrader.java
+13
-0
appinventor/blocklyeditor/src/versioning.js
appinventor/blocklyeditor/src/versioning.js
+5
-1
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
...c/com/google/appinventor/components/common/YaVersion.java
+6
-2
appinventor/components/src/com/google/appinventor/components/runtime/Form.java
...s/src/com/google/appinventor/components/runtime/Form.java
+1
-2
appinventor/components/src/com/google/appinventor/components/runtime/ReplForm.java
...c/com/google/appinventor/components/runtime/ReplForm.java
+10
-0
No files found.
appinventor/appengine/src/com/google/appinventor/client/youngandroid/YoungAndroidFormUpgrader.java
View file @
c2ddc809
...
...
@@ -1183,6 +1183,19 @@ public final class YoungAndroidFormUpgrader {
// The DefaultFileScope property was added.
srcCompVersion
=
30
;
}
if
(
srcCompVersion
<
31
)
{
// The default theme was switched to DeviceDefault
if
(
componentProperties
.
containsKey
(
"Theme"
))
{
String
value
=
((
ClientJsonString
)
componentProperties
.
get
(
"Theme"
)).
getString
();
if
(
value
.
equals
(
"AppTheme.Light.DarkActionBar"
))
{
// AppTheme.Light.DarkActionBar is now the default theme, so we can remove it
componentProperties
.
remove
(
"Theme"
);
}
}
else
{
// Previously, projects were Classic by default, so we need to reflect this.
componentProperties
.
put
(
"Theme"
,
new
ClientJsonString
(
"Classic"
));
}
}
return
srcCompVersion
;
}
...
...
appinventor/blocklyeditor/src/versioning.js
View file @
c2ddc809
...
...
@@ -3013,7 +3013,11 @@ Blockly.Versioning.AllUpgradeMaps =
// For FORM_COMPONENT_VERSION 30:
// - DefaultFileScope designer property was added
30
:
"
noUpgrade
"
30
:
"
noUpgrade
"
,
// For FORM_COMPONENT_VERSION 31:
// - The default theme was changed in the designer. No block changes required.
31
:
"
noUpgrade
"
},
// End Screen
...
...
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
View file @
c2ddc809
...
...
@@ -586,7 +586,9 @@ public class YaVersion {
// For YOUNG_ANDROID_VERSION 225:
// - LISTVIEW_COMPONENT_VERSION was incremented to 7
// - WEB_COMPONENT_VERSION was incremented to 9
public
static
final
int
YOUNG_ANDROID_VERSION
=
225
;
// For YOUNG_ANDROID_VERSION 226:
// - FORM_COMPONENT_VERSION was incremented to 31
public
static
final
int
YOUNG_ANDROID_VERSION
=
226
;
// ............................... Blocks Language Version Number ...............................
...
...
@@ -1018,7 +1020,9 @@ public class YaVersion {
// - Adds Permission dropdown block.
// For FORM_COMPONENT_VERSION 30:
// - Add DefaultFileScope designer property.
public
static
final
int
FORM_COMPONENT_VERSION
=
30
;
// For FORM_COMPONENT_VERSION 31:
// - The default theme was changed to Device Default.
public
static
final
int
FORM_COMPONENT_VERSION
=
31
;
// For FUSIONTABLESCONTROL_COMPONENT_VERSION 2:
// - The Fusiontables API was migrated from SQL to V1
...
...
appinventor/components/src/com/google/appinventor/components/runtime/Form.java
View file @
c2ddc809
...
...
@@ -415,7 +415,7 @@ public class Form extends AppInventorCompatActivity
}
}
pr
ivate
void
defaultPropertyValues
()
{
pr
otected
void
defaultPropertyValues
()
{
if
(
isRepl
())
{
ActionBar
(
actionBarEnabled
);
}
else
{
...
...
@@ -437,7 +437,6 @@ public class Form extends AppInventorCompatActivity
AccentColor
(
DEFAULT_ACCENT_COLOR
);
PrimaryColor
(
DEFAULT_PRIMARY_COLOR
);
PrimaryColorDark
(
DEFAULT_PRIMARY_COLOR_DARK
);
Theme
(
ComponentConstants
.
DEFAULT_THEME
);
BackgroundColor
(
Component
.
COLOR_DEFAULT
);
OpenScreenAnimationAbstract
(
ScreenAnimation
.
Default
);
CloseScreenAnimationAbstract
(
ScreenAnimation
.
Default
);
...
...
appinventor/components/src/com/google/appinventor/components/runtime/ReplForm.java
View file @
c2ddc809
...
...
@@ -166,6 +166,16 @@ public class ReplForm extends Form {
}
}
@Override
protected
void
defaultPropertyValues
()
{
super
.
defaultPropertyValues
();
// Previously this was set in the {@link Form#defaultPropertyValues()}. However, in compiled
// apps we do not want to reset the theme since it is provided in the AndroidManifest.xml.
// In the companion though we do want to reset the theme in case we are switching from a project
// with a different theme than the default one to one that uses the default.
Theme
(
ComponentConstants
.
DEFAULT_THEME
);
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment