Commit fe670603 authored by Evaldas Latoškinas's avatar Evaldas Latoškinas Committed by Evan W. Patton

Change Responsive Sizing to default


Change-Id: I5c60984f502f361f0080f9310800fcb5c95cb84c
parent e04dc3e6
......@@ -1116,5 +1116,5 @@
</block>
</value>
</block>
<yacodeblocks ya-version="184" language-version="26"></yacodeblocks>
<yacodeblocks ya-version="189" language-version="27"></yacodeblocks>
</xml>
\ No newline at end of file
......@@ -27,8 +27,9 @@ $Source $Yail
(set-and-coerce-property! 'Screen1 'PrimaryColor #xFFA5CF47 'number)
(set-and-coerce-property! 'Screen1 'PrimaryColorDark #xFF516623 'number)
(set-and-coerce-property! 'Screen1 'Scrollable #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "MIT App Inventor 2" 'text)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Theme "AppTheme.Light.DarkActionBar" 'text)
(set-and-coerce-property! 'Screen1 'Title "MIT App Inventor 2" 'text)
)
(define-event Screen1 Initialize()(set-this-form)
......@@ -395,4 +396,4 @@ $Source $Yail
(add-component Screen1 com.google.appinventor.components.runtime.TinyDB TinyDB1
)
(init-runtime)
\ No newline at end of file
(init-runtime)
......@@ -18,6 +18,8 @@ versionname=2.55
useslocation=False
androidminsdk=7
actionbar=true
sizing=Responsive
showlistsasjson=False
theme=AppTheme.Light.DarkActionBar
color.primary=&HFFA5CF47
color.primary.dark=&HFF516623
......
......@@ -976,6 +976,19 @@ public final class YoungAndroidFormUpgrader {
srcCompVersion = 24;
}
if (srcCompVersion < 25) {
// Sizing default value changed from Fixed to Responsive
if (componentProperties.containsKey("Sizing")) {
String value = ((ClientJsonString)componentProperties.get("Sizing")).getString();
if (value.equals("Responsive")) {
componentProperties.remove("Sizing");
}
} else {
componentProperties.put("Sizing", new ClientJsonString("Fixed"));
}
srcCompVersion = 25;
}
return srcCompVersion;
}
......
......@@ -2270,7 +2270,11 @@ Blockly.Versioning.AllUpgradeMaps =
// For FORM_COMPONENT_VERSION 24:
// - The AskForPermissions method, PermissionDenied event, and PermissionGranted event were added. No blocks need to be changed.
24: "noUpgrade"
24: "noUpgrade",
// For FORM_COMPONENT_VERSION 25:
// - Sizing default value changed from Fixed to Responsive
25: "noUpgrade"
}, // End Screen
......
......@@ -5,6 +5,7 @@ $Source $Yail
(define-form fakepackagename Screen1)
(require <com.google.youngandroid.runtime>)
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
(init-runtime)
......@@ -8,6 +8,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "CamcorderTest" 'text)
)
......
......@@ -6,6 +6,7 @@ $Source $Yail
(require <com.google.youngandroid.runtime>)
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "ClockTest" 'text)
)
;;; HorizontalArrangement1
......
......@@ -8,6 +8,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "CopyCat" 'text)
)
......
......@@ -8,7 +8,8 @@ $Source $Yail
(def (p$factorial $x) (let ( ($acc 1) ) (begin (while (call-yail-primitive yail-not-equal? (*list-for-runtime* (lexical-value $x) 0) '(any any) "=") (begin (set-lexical! $acc (call-yail-primitive * (*list-for-runtime* (lexical-value $acc) (lexical-value $x) ) '(number number ) "*"))(set-lexical! $x (call-yail-primitive - (*list-for-runtime* (lexical-value $x) 1) '(number number) "-")))) (lexical-value $acc)) ))
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
;;; Button1
......
......@@ -5,7 +5,8 @@ $Source $Yail
(define-form fakepackagename Screen1)
(require <com.google.youngandroid.runtime>)
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
;;; Button1
(add-component Screen1 Button Button1 (set-and-coerce-property! 'Button1 'Image "kitty.png" 'text)
......
......@@ -13,6 +13,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'BackgroundColor #xFFCCCCCC 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Make-A-Quiz" 'text)
)
......
......@@ -8,6 +8,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AppName "math" 'text)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
......
......@@ -10,7 +10,8 @@ $Source $Yail
(def (p$UpdateScore ) (set-and-coerce-property! 'ScoreLabel 'Text (call-yail-primitive string-append (*list-for-runtime* "Score:" (get-var g$score) ) '(text text ) "join") 'text))
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
;;; MyCanvas
......
......@@ -7,7 +7,8 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
;;; ThreeButtons
......
......@@ -11,6 +11,7 @@ $Source $Yail
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'BackgroundColor #xFF000000 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "PictureCycle" 'text)
)
......
......@@ -8,6 +8,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Product Lookup" 'text)
)
......
......@@ -6,6 +6,7 @@ $Source $Yail
(require <com.google.youngandroid.runtime>)
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "SensorTest" 'text)
)
;;; Label1
......
......@@ -8,7 +8,8 @@ $Source $Yail
(def (p$procedure ) (call-component-method 'listpicker_one 'Open (*list-for-runtime*) '()))
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
;;; button_one
......
......@@ -467,8 +467,10 @@ public class YaVersion {
// - THERMOMETER_COMPONENT_VERSION was initialized to 1
// For YOUNG_ANDROID_VERSION 188:
// - Label component version incremented to 5
// For YOUNG_ANDROID_VERSION 189:
// - FORM_COMPONENT_VERSION was incremented to 25
public static final int YOUNG_ANDROID_VERSION = 188;
public static final int YOUNG_ANDROID_VERSION = 189;
// ............................... Blocks Language Version Number ...............................
......@@ -812,7 +814,9 @@ public class YaVersion {
// - Added the AskForPermission method
// - Added the PermissionDenied event
// - Added the PermissionGranted event
public static final int FORM_COMPONENT_VERSION = 24;
// For FORM_COMOPONENT_VERSION 25:
// - Sizing default value changed from Fixed to Responsive
public static final int FORM_COMPONENT_VERSION = 25;
// For FUSIONTABLESCONTROL_COMPONENT_VERSION 2:
// - The Fusiontables API was migrated from SQL to V1
......
......@@ -438,7 +438,7 @@ public class Form extends AppInventorCompatActivity
ActionBar(themeHelper.hasActionBar());
}
Scrollable(false); // frameLayout is created in Scrollable()
Sizing("Fixed"); // Note: Only the Screen1 value is used as this is per-project
Sizing("Responsive"); // Note: Only the Screen1 value is used as this is per-project
BackgroundImage("");
AboutScreen("");
BackgroundImage("");
......@@ -1696,7 +1696,7 @@ public class Form extends AppInventorCompatActivity
* @param
*/
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_SIZING,
defaultValue = "Fixed")
defaultValue = "Responsive", alwaysSend = true)
@SimpleProperty(userVisible = false,
// This desc won't apprear as a tooltip, since there's no block, but we'll keep it with the source.
description = "If set to fixed, screen layouts will be created for a single fixed-size screen and autoscaled. " +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment