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
8a687c24
Commit
8a687c24
authored
Jan 10, 2018
by
Evan W. Patton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tie ActionBar to Theme setting
Fixes #1121 Change-Id: I64c464a96614ee9f0d4f5b9f55ab350ddeeb12f5
parent
fe79635e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
5 deletions
+36
-5
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockForm.java
...appinventor/client/editor/simple/components/MockForm.java
+13
-2
appinventor/appengine/src/com/google/appinventor/client/youngandroid/YoungAndroidFormUpgrader.java
...nventor/client/youngandroid/YoungAndroidFormUpgrader.java
+11
-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/AppInventorCompatActivity.java
...nventor/components/runtime/AppInventorCompatActivity.java
+1
-0
No files found.
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockForm.java
View file @
8a687c24
...
...
@@ -475,7 +475,7 @@ public final class MockForm extends MockContainer {
}
if
(
propertyName
.
equals
(
PROPERTY_NAME_ACTIONBAR
))
{
return
editor
.
isScreen1
()
;
return
false
;
}
if
(
propertyName
.
equals
(
PROPERTY_NAME_PRIMARY_COLOR
))
{
...
...
@@ -958,9 +958,20 @@ public final class MockForm extends MockContainer {
}
else
if
(
propertyName
.
equals
(
PROPERTY_NAME_TUTORIAL_URL
))
{
setTutorialURLProperty
(
newValue
);
}
else
if
(
propertyName
.
equals
(
PROPERTY_NAME_ACTIONBAR
))
{
setActionBarProperty
(
newValue
);
// ActionBar is now tied to the Theme. This can be removed once Companion 2.47 is the minimum version supported.
String
theme
=
getProperties
().
hasProperty
(
PROPERTY_NAME_THEME
)
?
getPropertyValue
(
PROPERTY_NAME_THEME
)
:
null
;
if
(
theme
==
null
||
theme
.
isEmpty
()
||
theme
.
equals
(
"Classic"
))
{
setActionBarProperty
(
"False"
);
}
else
{
setActionBarProperty
(
"True"
);
}
}
else
if
(
propertyName
.
equals
(
PROPERTY_NAME_THEME
))
{
setTheme
(
newValue
);
if
(
"Classic"
.
equals
(
newValue
))
{
getProperties
().
getExistingProperty
(
PROPERTY_NAME_ACTIONBAR
).
setValue
(
"False"
);
}
else
{
getProperties
().
getExistingProperty
(
PROPERTY_NAME_ACTIONBAR
).
setValue
(
"True"
);
}
}
else
if
(
propertyName
.
equals
(
PROPERTY_NAME_PRIMARY_COLOR
))
{
setPrimaryColor
(
newValue
);
}
else
if
(
propertyName
.
equals
(
PROPERTY_NAME_PRIMARY_COLOR_DARK
))
{
...
...
appinventor/appengine/src/com/google/appinventor/client/youngandroid/YoungAndroidFormUpgrader.java
View file @
8a687c24
...
...
@@ -945,6 +945,17 @@ public final class YoungAndroidFormUpgrader {
srcCompVersion
=
22
;
}
if
(
srcCompVersion
<
23
)
{
// The ActionBar property was deprecated. It should always be true in new themes, and false
// in classic themes.
if
(
componentProperties
.
containsKey
(
"Theme"
)
&&
!
"Classic"
.
equals
(
componentProperties
.
get
(
"Theme"
).
asString
().
toString
()))
{
componentProperties
.
put
(
"ActionBar"
,
new
ClientJsonString
(
"True"
));
}
else
if
(
componentProperties
.
containsKey
(
"ActionBar"
))
{
// Theme is Classic
componentProperties
.
remove
(
"ActionBar"
);
// Resets ActionBar to default (False)
}
srcCompVersion
=
23
;
}
return
srcCompVersion
;
}
...
...
appinventor/blocklyeditor/src/versioning.js
View file @
8a687c24
...
...
@@ -2213,7 +2213,11 @@ Blockly.Versioning.AllUpgradeMaps =
// For FORM_COMPONENT_VERSION 22:
// - The Classic option was added to the Theme property. No blocks need to be changed
22
:
"
noUpgrade
"
22
:
"
noUpgrade
"
,
// For FORM_COMPONENT_VERSION 23:
// - The ActionBar designer property was hidden and tied to the Theme property. No blocks need to be changed.
23
:
"
noUpgrade
"
},
// End Screen
...
...
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
View file @
8a687c24
...
...
@@ -419,8 +419,10 @@ public class YaVersion {
// For YOUNG_ANDROID_VERSION 166:
// - MAP_COMPONENT_VERSION was incremented to 3
// - FEATURE_COLLECTION_COMPONENT_VERSION was incremented to 2
// For YOUNG_ANDROID_VERSION 167:
// - FORM_COMPONENT_VERSION was incremented to 23
public
static
final
int
YOUNG_ANDROID_VERSION
=
16
6
;
public
static
final
int
YOUNG_ANDROID_VERSION
=
16
7
;
// ............................... Blocks Language Version Number ...............................
...
...
@@ -734,7 +736,9 @@ public class YaVersion {
// - The Screen.Theme property was added
// For FORM_COMPONENT_VERSION 22:
// - The Classic option for themes was added
public
static
final
int
FORM_COMPONENT_VERSION
=
22
;
// For FORM_COMPONENT_VERSION 23:
// - The ActionBar property was deprecated
public
static
final
int
FORM_COMPONENT_VERSION
=
23
;
// For FUSIONTABLESCONTROL_COMPONENT_VERSION 2:
// - The Fusiontables API was migrated from SQL to V1
...
...
appinventor/components/src/com/google/appinventor/components/runtime/AppInventorCompatActivity.java
View file @
8a687c24
...
...
@@ -266,6 +266,7 @@ public class AppInventorCompatActivity extends Activity implements AppCompatCall
@SuppressWarnings
(
"WeakerAccess"
)
protected
void
setAppInventorTheme
(
Theme
theme
)
{
if
(!
Form
.
getActiveForm
().
isRepl
())
return
;
// Theme changing only allowed in REPL
if
(
theme
==
currentTheme
)
{
return
;
}
...
...
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