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
b7d0d12e
Commit
b7d0d12e
authored
Jan 06, 2019
by
Jeffrey I. Schiller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ucr'
parents
19dffa0a
fd48a3ab
Changes
79
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
79 changed files
with
1326 additions
and
37 deletions
+1326
-37
appinventor/appengine/src/com/google/appinventor/client/OdeMessages.java
...engine/src/com/google/appinventor/client/OdeMessages.java
+16
-0
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockMap.java
.../appinventor/client/editor/simple/components/MockMap.java
+68
-1
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/utils/PropertiesUtil.java
...client/editor/simple/components/utils/PropertiesUtil.java
+3
-0
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/properties/YoungAndroidMapScaleUnitsPropertyEditor.java
...d/properties/YoungAndroidMapScaleUnitsPropertyEditor.java
+28
-0
appinventor/appengine/src/com/google/appinventor/client/youngandroid/YoungAndroidFormUpgrader.java
...nventor/client/youngandroid/YoungAndroidFormUpgrader.java
+4
-2
appinventor/blocklyeditor/src/blocks/math.js
appinventor/blocklyeditor/src/blocks/math.js
+101
-0
appinventor/blocklyeditor/src/generators/yail/math.js
appinventor/blocklyeditor/src/generators/yail/math.js
+32
-0
appinventor/blocklyeditor/src/msg/en/_messages.js
appinventor/blocklyeditor/src/msg/en/_messages.js
+10
-0
appinventor/blocklyeditor/src/versioning.js
appinventor/blocklyeditor/src/versioning.js
+9
-2
appinventor/components/src/com/google/appinventor/components/common/PropertyTypeConstants.java
.../appinventor/components/common/PropertyTypeConstants.java
+5
-0
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
...c/com/google/appinventor/components/common/YaVersion.java
+14
-3
appinventor/components/src/com/google/appinventor/components/runtime/Form.java
...s/src/com/google/appinventor/components/runtime/Form.java
+3
-1
appinventor/components/src/com/google/appinventor/components/runtime/Map.java
...ts/src/com/google/appinventor/components/runtime/Map.java
+38
-0
appinventor/components/src/com/google/appinventor/components/runtime/util/DummyMapController.java
...pinventor/components/runtime/util/DummyMapController.java
+21
-0
appinventor/components/src/com/google/appinventor/components/runtime/util/ErrorMessages.java
...le/appinventor/components/runtime/util/ErrorMessages.java
+5
-0
appinventor/components/src/com/google/appinventor/components/runtime/util/MapFactory.java
...oogle/appinventor/components/runtime/util/MapFactory.java
+47
-0
appinventor/components/src/com/google/appinventor/components/runtime/util/NativeOpenStreetMapController.java
...omponents/runtime/util/NativeOpenStreetMapController.java
+47
-0
appinventor/components/tests/com/google/appinventor/components/runtime/MapTest.java
...ts/com/google/appinventor/components/runtime/MapTest.java
+54
-1
appinventor/components/tests/res/color/abc_btn_colored_borderless_text_material.xml
...ts/res/color/abc_btn_colored_borderless_text_material.xml
+24
-0
appinventor/components/tests/res/color/abc_btn_colored_text_material.xml
...ponents/tests/res/color/abc_btn_colored_text_material.xml
+24
-0
appinventor/components/tests/res/color/abc_hint_foreground_material_dark.xml
...nts/tests/res/color/abc_hint_foreground_material_dark.xml
+24
-0
appinventor/components/tests/res/color/abc_hint_foreground_material_light.xml
...ts/tests/res/color/abc_hint_foreground_material_light.xml
+24
-0
appinventor/components/tests/res/color/abc_primary_text_disable_only_material_dark.xml
...res/color/abc_primary_text_disable_only_material_dark.xml
+0
-1
appinventor/components/tests/res/color/abc_primary_text_disable_only_material_light.xml
...es/color/abc_primary_text_disable_only_material_light.xml
+0
-1
appinventor/components/tests/res/color/abc_primary_text_material_dark.xml
...onents/tests/res/color/abc_primary_text_material_dark.xml
+0
-1
appinventor/components/tests/res/color/abc_primary_text_material_light.xml
...nents/tests/res/color/abc_primary_text_material_light.xml
+0
-1
appinventor/components/tests/res/color/abc_search_url_text.xml
...ventor/components/tests/res/color/abc_search_url_text.xml
+1
-1
appinventor/components/tests/res/color/abc_secondary_text_material_dark.xml
...ents/tests/res/color/abc_secondary_text_material_dark.xml
+0
-1
appinventor/components/tests/res/color/abc_secondary_text_material_light.xml
...nts/tests/res/color/abc_secondary_text_material_light.xml
+0
-1
appinventor/components/tests/res/color/abc_tint_btn_checkable.xml
...tor/components/tests/res/color/abc_tint_btn_checkable.xml
+22
-0
appinventor/components/tests/res/color/abc_tint_default.xml
appinventor/components/tests/res/color/abc_tint_default.xml
+26
-0
appinventor/components/tests/res/color/abc_tint_edittext.xml
appinventor/components/tests/res/color/abc_tint_edittext.xml
+24
-0
appinventor/components/tests/res/color/abc_tint_seek_thumb.xml
...ventor/components/tests/res/color/abc_tint_seek_thumb.xml
+21
-0
appinventor/components/tests/res/color/abc_tint_spinner.xml
appinventor/components/tests/res/color/abc_tint_spinner.xml
+22
-0
appinventor/components/tests/res/color/abc_tint_switch_track.xml
...ntor/components/tests/res/color/abc_tint_switch_track.xml
+22
-0
appinventor/components/tests/res/color/switch_thumb_material_dark.xml
...components/tests/res/color/switch_thumb_material_dark.xml
+1
-1
appinventor/components/tests/res/color/switch_thumb_material_light.xml
...omponents/tests/res/color/switch_thumb_material_light.xml
+1
-1
appinventor/components/tests/res/drawable/abc_btn_borderless_material.xml
...onents/tests/res/drawable/abc_btn_borderless_material.xml
+0
-1
appinventor/components/tests/res/drawable/abc_btn_check_material.xml
.../components/tests/res/drawable/abc_btn_check_material.xml
+2
-2
appinventor/components/tests/res/drawable/abc_btn_colored_material.xml
...omponents/tests/res/drawable/abc_btn_colored_material.xml
+21
-0
appinventor/components/tests/res/drawable/abc_btn_default_mtrl_shape.xml
...ponents/tests/res/drawable/abc_btn_default_mtrl_shape.xml
+0
-1
appinventor/components/tests/res/drawable/abc_btn_radio_material.xml
.../components/tests/res/drawable/abc_btn_radio_material.xml
+1
-1
appinventor/components/tests/res/drawable/abc_cab_background_internal_bg.xml
...nts/tests/res/drawable/abc_cab_background_internal_bg.xml
+1
-1
appinventor/components/tests/res/drawable/abc_cab_background_top_material.xml
...ts/tests/res/drawable/abc_cab_background_top_material.xml
+0
-1
appinventor/components/tests/res/drawable/abc_dialog_material_background.xml
...nts/tests/res/drawable/abc_dialog_material_background.xml
+26
-0
appinventor/components/tests/res/drawable/abc_edit_text_material.xml
.../components/tests/res/drawable/abc_edit_text_material.xml
+0
-1
appinventor/components/tests/res/drawable/abc_ic_ab_back_material.xml
...components/tests/res/drawable/abc_ic_ab_back_material.xml
+27
-0
appinventor/components/tests/res/drawable/abc_ic_arrow_drop_right_black_24dp.xml
...tests/res/drawable/abc_ic_arrow_drop_right_black_24dp.xml
+33
-0
appinventor/components/tests/res/drawable/abc_ic_clear_material.xml
...r/components/tests/res/drawable/abc_ic_clear_material.xml
+26
-0
appinventor/components/tests/res/drawable/abc_ic_go_search_api_material.xml
...ents/tests/res/drawable/abc_ic_go_search_api_material.xml
+25
-0
appinventor/components/tests/res/drawable/abc_ic_menu_overflow_material.xml
...ents/tests/res/drawable/abc_ic_menu_overflow_material.xml
+26
-0
appinventor/components/tests/res/drawable/abc_ic_search_api_material.xml
...ponents/tests/res/drawable/abc_ic_search_api_material.xml
+26
-0
appinventor/components/tests/res/drawable/abc_ic_voice_search_api_material.xml
...s/tests/res/drawable/abc_ic_voice_search_api_material.xml
+26
-0
appinventor/components/tests/res/drawable/abc_item_background_holo_dark.xml
...ents/tests/res/drawable/abc_item_background_holo_dark.xml
+0
-1
appinventor/components/tests/res/drawable/abc_item_background_holo_light.xml
...nts/tests/res/drawable/abc_item_background_holo_light.xml
+0
-1
appinventor/components/tests/res/drawable/abc_list_selector_background_transition_holo_dark.xml
...ble/abc_list_selector_background_transition_holo_dark.xml
+0
-1
appinventor/components/tests/res/drawable/abc_list_selector_background_transition_holo_light.xml
...le/abc_list_selector_background_transition_holo_light.xml
+0
-1
appinventor/components/tests/res/drawable/abc_list_selector_holo_dark.xml
...onents/tests/res/drawable/abc_list_selector_holo_dark.xml
+0
-1
appinventor/components/tests/res/drawable/abc_list_selector_holo_light.xml
...nents/tests/res/drawable/abc_list_selector_holo_light.xml
+0
-1
appinventor/components/tests/res/drawable/abc_ratingbar_indicator_material.xml
...s/tests/res/drawable/abc_ratingbar_indicator_material.xml
+29
-0
appinventor/components/tests/res/drawable/abc_ratingbar_material.xml
.../components/tests/res/drawable/abc_ratingbar_material.xml
+29
-0
appinventor/components/tests/res/drawable/abc_ratingbar_small_material.xml
...nents/tests/res/drawable/abc_ratingbar_small_material.xml
+27
-0
appinventor/components/tests/res/drawable/abc_seekbar_thumb_material.xml
...ponents/tests/res/drawable/abc_seekbar_thumb_material.xml
+35
-0
appinventor/components/tests/res/drawable/abc_seekbar_tick_mark_material.xml
...nts/tests/res/drawable/abc_seekbar_tick_mark_material.xml
+22
-0
appinventor/components/tests/res/drawable/abc_seekbar_track_material.xml
...ponents/tests/res/drawable/abc_seekbar_track_material.xml
+40
-0
appinventor/components/tests/res/drawable/abc_spinner_textfield_background_material.xml
...es/drawable/abc_spinner_textfield_background_material.xml
+1
-1
appinventor/components/tests/res/drawable/abc_switch_thumb_material.xml
...mponents/tests/res/drawable/abc_switch_thumb_material.xml
+1
-1
appinventor/components/tests/res/drawable/abc_tab_indicator_material.xml
...ponents/tests/res/drawable/abc_tab_indicator_material.xml
+0
-1
appinventor/components/tests/res/drawable/abc_text_cursor_material.xml
...omponents/tests/res/drawable/abc_text_cursor_material.xml
+23
-0
appinventor/components/tests/res/drawable/abc_textfield_search_material.xml
...ents/tests/res/drawable/abc_textfield_search_material.xml
+0
-1
appinventor/components/tests/res/drawable/abc_vector_test.xml
...nventor/components/tests/res/drawable/abc_vector_test.xml
+25
-0
appinventor/components/tests/res/drawable/tooltip_frame_dark.xml
...ntor/components/tests/res/drawable/tooltip_frame_dark.xml
+22
-0
appinventor/components/tests/res/drawable/tooltip_frame_light.xml
...tor/components/tests/res/drawable/tooltip_frame_light.xml
+22
-0
appinventor/docs/reference/blocks/images/math/bitwise_and.png
...nventor/docs/reference/blocks/images/math/bitwise_and.png
+0
-0
appinventor/docs/reference/blocks/images/math/bitwise_ior.png
...nventor/docs/reference/blocks/images/math/bitwise_ior.png
+0
-0
appinventor/docs/reference/blocks/images/math/bitwise_xor.png
...nventor/docs/reference/blocks/images/math/bitwise_xor.png
+0
-0
appinventor/docs/reference/blocks/math.html
appinventor/docs/reference/blocks/math.html
+63
-0
appinventor/docs/reference/components/maps.html
appinventor/docs/reference/components/maps.html
+6
-0
appinventor/lib/android/support/testing-support-R-classes.jar
...nventor/lib/android/support/testing-support-R-classes.jar
+0
-0
No files found.
appinventor/appengine/src/com/google/appinventor/client/OdeMessages.java
View file @
b7d0d12e
...
...
@@ -6651,10 +6651,18 @@ public interface OdeMessages extends Messages {
@Description
(
"The type of map tile to be displayed"
)
String
MapTypeProperties
();
@DefaultMessage
(
"ScaleUnits"
)
@Description
(
"Display name for the property to adjust the map's scale units"
)
String
ScaleUnitsProperties
();
@DefaultMessage
(
"ShowCompass"
)
@Description
(
"Show a compass control on the Map"
)
String
ShowCompassProperties
();
@DefaultMessage
(
"ShowScale"
)
@Description
(
"Show a scale indicator on the Map"
)
String
ShowScaleProperties
();
@DefaultMessage
(
"ShowUser"
)
@Description
(
"Show a marker on the Map for the user's current location"
)
String
ShowUserProperties
();
...
...
@@ -6703,6 +6711,14 @@ public interface OdeMessages extends Messages {
@Description
(
"Terrain map type"
)
String
mapTypeTerrain
();
@DefaultMessage
(
"Metric"
)
@Description
(
"Display name for the metric unit system"
)
String
mapScaleUnitsMetric
();
@DefaultMessage
(
"Imperial"
)
@Description
(
"Display name for the imperial unit system"
)
String
mapScaleUnitsImperial
();
@DefaultMessage
(
"ImageAsset"
)
@Description
(
"ImageAsset"
)
String
ImageAssetProperties
();
...
...
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockMap.java
View file @
b7d0d12e
...
...
@@ -34,6 +34,8 @@ public final class MockMap extends MockContainer {
protected
static
final
String
PROPERTY_NAME_SHOW_ZOOM
=
"ShowZoom"
;
protected
static
final
String
PROPERTY_NAME_SHOW_USER
=
"ShowUser"
;
protected
static
final
String
PROPERTY_NAME_ENABLE_ROTATION
=
"EnableRotation"
;
protected
static
final
String
PROPERTY_NAME_SHOW_SCALE
=
"ShowScale"
;
protected
static
final
String
PROPERTY_NAME_SCALE_UNITS
=
"ScaleUnits"
;
/**
* The Widget wrapping the element where the map tiles will be rendered.
...
...
@@ -68,6 +70,8 @@ public final class MockMap extends MockContainer {
private
boolean
zoomControl
=
false
;
private
boolean
compassEnabled
=
false
;
private
boolean
userLocationEnabled
=
false
;
private
boolean
showScale
=
false
;
private
int
scaleUnits
=
1
;
public
MockMap
(
SimpleEditor
editor
)
{
super
(
editor
,
TYPE
,
images
.
map
(),
new
MockMapLayout
());
...
...
@@ -181,6 +185,10 @@ public final class MockMap extends MockContainer {
setShowUser
(
newValue
);
}
else
if
(
propertyName
.
equals
(
PROPERTY_NAME_SHOW_ZOOM
))
{
setShowZoom
(
newValue
);
}
else
if
(
propertyName
.
equals
(
PROPERTY_NAME_SHOW_SCALE
))
{
setShowScale
(
newValue
);
}
else
if
(
propertyName
.
equals
(
PROPERTY_NAME_SCALE_UNITS
))
{
setScaleUnits
(
newValue
);
}
}
...
...
@@ -246,6 +254,22 @@ public final class MockMap extends MockContainer {
updateMapZoomControl
(
this
.
zoomControl
);
}
private
void
setShowScale
(
String
state
)
{
this
.
showScale
=
Boolean
.
parseBoolean
(
state
);
updateMapShowScale
(
this
.
showScale
);
}
private
void
setScaleUnits
(
String
state
)
{
if
(
state
.
equals
(
"1"
))
{
this
.
scaleUnits
=
1
;
}
else
if
(
state
.
equals
(
"2"
))
{
this
.
scaleUnits
=
2
;
}
else
{
throw
new
IllegalArgumentException
(
"Unexpected value for scale: "
+
state
);
}
updateScaleUnits
(
this
.
scaleUnits
);
}
// event handlers
protected
void
onBoundsChanged
()
{
// TODO(ewpatton): Send incremental update to companion
...
...
@@ -471,7 +495,9 @@ public final class MockMap extends MockContainer {
var latitude = this.@com.google.appinventor.client.editor.simple.components.MockMap::latitude,
longitude = this.@com.google.appinventor.client.editor.simple.components.MockMap::longitude,
zoomControl = this.@com.google.appinventor.client.editor.simple.components.MockMap::zoomControl,
zoom = this.@com.google.appinventor.client.editor.simple.components.MockMap::zoomLevel;
zoom = this.@com.google.appinventor.client.editor.simple.components.MockMap::zoomLevel,
showScale = this.@com.google.appinventor.client.editor.simple.components.MockMap::showScale,
scaleUnits = this.@com.google.appinventor.client.editor.simple.components.MockMap::scaleUnits;
map = L.map(elem, {zoomControl: false, editable: true}).setView([latitude, longitude], zoom);
var messages = @com.google.appinventor.client.Ode::getMessages()();
map.zoomControl = L.control.zoom({
...
...
@@ -482,6 +508,15 @@ public final class MockMap extends MockContainer {
if (zoomControl) {
map.zoomControl.addTo(map);
}
var scaleOptions = {metric: true, imperial: false, position: 'bottomright'};
if (scaleUnits == 2) {
scaleOptions.metric = false;
scaleOptions.imperial = true;
}
map.scaleControl = L.control.scale(scaleOptions);
if (showScale) {
map.scaleControl.addTo(map);
}
map.owner = this;
map.unlocked = true;
map.aiControls = new L.Toolbar.Control({position: 'bottomleft',
...
...
@@ -616,6 +651,38 @@ public final class MockMap extends MockContainer {
}
}-*/
;
private
native
void
updateMapShowScale
(
boolean
enable
)
/*-{
var map = this.@com.google.appinventor.client.editor.simple.components.MockMap::mapInstance;
if (map) {
if (!map.scaleControl) {
map.scaleControl = $wnd.top.L.control.scale({position: 'topleft'});
}
if (enable) {
map.scaleControl.addTo(map);
} else {
map.removeControl(map.scaleControl);
}
}
}-*/
;
private
native
void
updateScaleUnits
(
int
units
)
/*-{
var map = this.@com.google.appinventor.client.editor.simple.components.MockMap::mapInstance,
scaleVisible = this.@com.google.appinventor.client.editor.simple.components.MockMap::showScale;
if (map) {
if (scaleVisible) {
map.removeControl(map.scaleControl);
}
map.scaleControl = $wnd.top.L.control.scale({
metric: units == 1,
imperial: units == 2,
position: 'bottomright'
});
if (scaleVisible) {
map.scaleControl.addTo(map);
}
}
}-*/
;
private
native
boolean
isUnlocked
()
/*-{
var map = this.@com.google.appinventor.client.editor.simple.components.MockMap::mapInstance;
if (map) {
...
...
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/utils/PropertiesUtil.java
View file @
b7d0d12e
...
...
@@ -30,6 +30,7 @@ import com.google.appinventor.client.editor.youngandroid.properties.YoungAndroid
import
com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidLegoEv3SensorPortChoicePropertyEditor
;
import
com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidLegoEv3UltrasonicSensorModeChoicePropertyEditor
;
import
com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidLegoNxtSensorPortChoicePropertyEditor
;
import
com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidMapScaleUnitsPropertyEditor
;
import
com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidMapTypePropertyEditor
;
import
com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidScreenAnimationChoicePropertyEditor
;
import
com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidScreenOrientationChoicePropertyEditor
;
...
...
@@ -220,6 +221,8 @@ public class PropertiesUtil {
return
new
YoungAndroidFloatRangePropertyEditor
(-
180
,
180
);
}
else
if
(
editorType
.
equals
(
PropertyTypeConstants
.
PROPERTY_TYPE_MAP_TYPE
))
{
return
new
YoungAndroidMapTypePropertyEditor
();
}
else
if
(
editorType
.
equals
(
PropertyTypeConstants
.
PROPERTY_TYPE_MAP_UNIT_SYSTEM
))
{
return
new
YoungAndroidMapScaleUnitsPropertyEditor
();
}
else
if
(
editorType
.
equals
(
PropertyTypeConstants
.
PROPERTY_TYPE_MAP_ZOOM
))
{
return
new
YoungAndroidIntegerRangePropertyEditor
(
1
,
18
);
}
else
if
(
editorType
.
equals
(
PropertyTypeConstants
.
PROPERTY_TYPE_NON_NEGATIVE_FLOAT
))
{
...
...
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/properties/YoungAndroidMapScaleUnitsPropertyEditor.java
0 → 100644
View file @
b7d0d12e
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2018 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package
com.google.appinventor.client.editor.youngandroid.properties
;
import
com.google.appinventor.client.widgets.properties.ChoicePropertyEditor
;
import
static
com
.
google
.
appinventor
.
client
.
Ode
.
MESSAGES
;
/**
* Property editor for choosing the scale units for the Map component.
*
* @author ewpatton@mit.edu (Evan Patton)
*/
public
class
YoungAndroidMapScaleUnitsPropertyEditor
extends
ChoicePropertyEditor
{
private
static
final
Choice
[]
mapScaleUnits
=
new
Choice
[]
{
new
Choice
(
MESSAGES
.
mapScaleUnitsMetric
(),
"1"
),
new
Choice
(
MESSAGES
.
mapScaleUnitsImperial
(),
"2"
)
};
public
YoungAndroidMapScaleUnitsPropertyEditor
()
{
super
(
mapScaleUnits
);
}
}
appinventor/appengine/src/com/google/appinventor/client/youngandroid/YoungAndroidFormUpgrader.java
View file @
b7d0d12e
...
...
@@ -1538,14 +1538,16 @@ public final class YoungAndroidFormUpgrader {
private
static
int
upgradeMapProperties
(
Map
<
String
,
JSONValue
>
componentProperties
,
int
srcCompVersion
)
{
if
(
srcCompVersion
<
4
)
{
if
(
srcCompVersion
<
5
)
{
// Version 2
// The Markers property (blocks-only) was renamed to Features
// Version 3
// Block event handlers were renamed
// Version 4
// The Rotation property was added with default 0.0 (due north)
srcCompVersion
=
4
;
// Verison 5
// The ScaleUnits and ShowScale properties were added
srcCompVersion
=
5
;
}
return
srcCompVersion
;
}
...
...
appinventor/blocklyeditor/src/blocks/math.js
View file @
b7d0d12e
...
...
@@ -312,6 +312,107 @@ Blockly.Blocks['math_power'] = {
typeblock
:
[{
translatedName
:
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_POWER
}]
};
Blockly
.
Blocks
[
'
math_bitwise
'
]
=
{
category
:
'
Math
'
,
helpUrl
:
function
()
{
var
mode
=
this
.
getFieldValue
(
'
OP
'
);
return
Blockly
.
Blocks
.
math_bitwise
.
HELPURLS
()[
mode
];
},
init
:
function
()
{
// Assign 'this' to a variable for use in the closures below.
var
thisBlock
=
this
;
this
.
setColour
(
Blockly
.
MATH_CATEGORY_HUE
);
this
.
setOutput
(
true
,
Blockly
.
Blocks
.
Utilities
.
YailTypeToBlocklyType
(
"
number
"
,
Blockly
.
Blocks
.
Utilities
.
OUTPUT
));
this
.
appendValueInput
(
'
NUM0
'
)
.
setCheck
(
Blockly
.
Blocks
.
Utilities
.
YailTypeToBlocklyType
(
"
number
"
,
Blockly
.
Blocks
.
Utilities
.
INPUT
))
.
appendField
(
new
Blockly
.
FieldDropdown
(
this
.
OPERATORS
),
'
OP
'
);
this
.
appendValueInput
(
'
NUM1
'
)
.
setCheck
(
Blockly
.
Blocks
.
Utilities
.
YailTypeToBlocklyType
(
"
number
"
,
Blockly
.
Blocks
.
Utilities
.
INPUT
));
this
.
setInputsInline
(
false
);
this
.
setTooltip
(
function
()
{
var
mode
=
thisBlock
.
getFieldValue
(
'
OP
'
);
return
Blockly
.
Blocks
.
math_bitwise
.
TOOLTIPS
()[
mode
];
});
this
.
setMutator
(
new
Blockly
.
Mutator
([
'
math_mutator_item
'
]));
this
.
itemCount_
=
2
;
this
.
valuesToSave
=
{
'
OP
'
:
null
};
this
.
emptyInputName
=
'
EMPTY
'
;
this
.
repeatingInputName
=
'
NUM
'
;
},
mutationToDom
:
Blockly
.
mutationToDom
,
domToMutation
:
Blockly
.
domToMutation
,
decompose
:
function
(
workspace
)
{
return
Blockly
.
decompose
(
workspace
,
'
math_mutator_item
'
,
this
);
},
compose
:
Blockly
.
compose
,
saveConnections
:
Blockly
.
saveConnections
,
addEmptyInput
:
function
()
{
var
input
=
this
.
appendDummyInput
(
this
.
emptyInputName
);
input
.
appendField
(
new
Blockly
.
FieldDropdown
(
this
.
OPERATORS
),
'
OP
'
);
this
.
setFieldValue
(
this
.
valuesToSave
[
'
OP
'
],
'
OP
'
);
},
addInput
:
function
(
inputNum
)
{
var
input
=
this
.
appendValueInput
(
this
.
repeatingInputName
+
inputNum
)
.
setCheck
(
Blockly
.
Blocks
.
Utilities
.
YailTypeToBlocklyType
(
"
number
"
,
Blockly
.
Blocks
.
Utilities
.
INPUT
));
if
(
inputNum
==
0
)
{
input
.
appendField
(
new
Blockly
.
FieldDropdown
(
this
.
OPERATORS
),
'
OP
'
);
this
.
setFieldValue
(
this
.
valuesToSave
[
'
OP
'
],
'
OP
'
);
}
return
input
;
},
updateContainerBlock
:
function
(
containerBlock
)
{
for
(
var
i
=
0
;
i
<
Blockly
.
Blocks
.
math_bitwise
.
OPERATORS
.
length
;
i
++
)
{
if
(
Blockly
.
Blocks
.
math_bitwise
.
OPERATORS
[
i
][
1
]
==
this
.
getFieldValue
(
"
OP
"
))
{
containerBlock
.
setFieldValue
(
Blockly
.
Blocks
.
math_bitwise
.
OPERATORS
[
i
][
0
],
"
CONTAINER_TEXT
"
);
}
}
},
typeblock
:
[{
translatedName
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_AND
,
dropDown
:
{
titleName
:
'
OP
'
,
value
:
'
BITAND
'
}
},
{
translatedName
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_IOR
,
dropDown
:
{
titleName
:
'
OP
'
,
value
:
'
BITIOR
'
}
},
{
translatedName
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_XOR
,
dropDown
:
{
titleName
:
'
OP
'
,
value
:
'
BITXOR
'
}
}]
};
Blockly
.
Blocks
.
math_bitwise
.
OPERATORS
=
function
()
{
return
[[
Blockly
.
Msg
.
LANG_MATH_BITWISE_AND
,
'
BITAND
'
],
[
Blockly
.
Msg
.
LANG_MATH_BITWISE_IOR
,
'
BITIOR
'
],
[
Blockly
.
Msg
.
LANG_MATH_BITWISE_XOR
,
'
BITXOR
'
]]
};
Blockly
.
Blocks
.
math_bitwise
.
TOOLTIPS
=
function
()
{
return
{
BITAND
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_TOOLTIP_AND
,
BITIOR
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_TOOLTIP_IOR
,
BITXOR
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_TOOLTIP_XOR
}
};
Blockly
.
Blocks
.
math_bitwise
.
HELPURLS
=
function
()
{
return
{
BITAND
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_HELPURL_AND
,
BITIOR
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_HELPURL_IOR
,
BITXOR
:
Blockly
.
Msg
.
LANG_MATH_BITWISE_HELPURL_XOR
}
};
Blockly
.
Blocks
[
'
math_random_int
'
]
=
{
// Random integer between [X] and [Y].
category
:
'
Math
'
,
...
...
appinventor/blocklyeditor/src/generators/yail/math.js
View file @
b7d0d12e
...
...
@@ -126,6 +126,38 @@ Blockly.Yail.math_arithmetic.OPERATORS = {
POWER
:
[
'
expt
'
,
Blockly
.
Yail
.
ORDER_NONE
]
};
Blockly
.
Yail
[
'
math_bitwise
'
]
=
function
()
{
// Bitwise and, inclusive or, and exclusive or. All can take variable number of arguments.
var
mode
=
this
.
getFieldValue
(
'
OP
'
);
var
tuple
=
Blockly
.
Yail
.
math_bitwise
.
OPERATORS
[
mode
];
var
operator
=
tuple
[
0
];
var
order
=
tuple
[
1
];
var
args
=
""
;
var
typeString
=
""
;
for
(
var
i
=
0
;
i
<
this
.
itemCount_
;
i
++
)
{
args
+=
(
Blockly
.
Yail
.
valueToCode
(
this
,
'
NUM
'
+
i
,
order
)
||
0
)
+
Blockly
.
Yail
.
YAIL_SPACER
;
typeString
+=
"
number
"
+
Blockly
.
Yail
.
YAIL_SPACER
;
}
var
code
=
Blockly
.
Yail
.
YAIL_CALL_YAIL_PRIMITIVE
+
operator
+
Blockly
.
Yail
.
YAIL_SPACER
;
code
=
code
+
Blockly
.
Yail
.
YAIL_OPEN_COMBINATION
+
Blockly
.
Yail
.
YAIL_LIST_CONSTRUCTOR
+
Blockly
.
Yail
.
YAIL_SPACER
+
args
+
Blockly
.
Yail
.
YAIL_CLOSE_COMBINATION
;
code
=
code
+
Blockly
.
Yail
.
YAIL_SPACER
+
Blockly
.
Yail
.
YAIL_QUOTE
+
Blockly
.
Yail
.
YAIL_OPEN_COMBINATION
+
typeString
+
Blockly
.
Yail
.
YAIL_CLOSE_COMBINATION
+
Blockly
.
Yail
.
YAIL_SPACER
;
code
=
code
+
Blockly
.
Yail
.
YAIL_DOUBLE_QUOTE
+
operator
+
Blockly
.
Yail
.
YAIL_DOUBLE_QUOTE
+
Blockly
.
Yail
.
YAIL_CLOSE_COMBINATION
;
return
[
code
,
Blockly
.
Yail
.
ORDER_ATOMIC
];
};
Blockly
.
Yail
.
math_bitwise
.
OPERATORS
=
{
BITAND
:
[
'
bitwise-and
'
,
Blockly
.
Yail
.
ORDER_NONE
],
BITIOR
:
[
'
bitwise-ior
'
,
Blockly
.
Yail
.
ORDER_NONE
],
BITXOR
:
[
'
bitwise-xor
'
,
Blockly
.
Yail
.
ORDER_NONE
]
};
Blockly
.
Yail
[
'
math_single
'
]
=
function
()
{
// Basic arithmetic operators.
var
mode
=
this
.
getFieldValue
(
'
OP
'
);
...
...
appinventor/blocklyeditor/src/msg/en/_messages.js
View file @
b7d0d12e
...
...
@@ -388,18 +388,28 @@ Blockly.Msg.en.switch_language_to_english = {
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_HELPURL_MULTIPLY
=
'
/reference/blocks/math.html#multiply
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_HELPURL_DIVIDE
=
'
/reference/blocks/math.html#divide
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_HELPURL_POWER
=
'
/reference/blocks/math.html#exponent
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_HELPURL_AND
=
'
/reference/blocks/math.html#bitwise_and
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_HELPURL_IOR
=
'
/reference/blocks/math.html#bitwise_ior
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_HELPURL_XOR
=
'
/reference/blocks/math.html#bitwise_xor
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_TOOLTIP_ADD
=
'
Return the sum of the two numbers.
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_TOOLTIP_MINUS
=
'
Return the difference of the two numbers.
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_TOOLTIP_MULTIPLY
=
'
Return the product of the two numbers.
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_TOOLTIP_DIVIDE
=
'
Return the quotient of the two numbers.
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_TOOLTIP_POWER
=
'
Return the first number raised to
\n
'
+
'
the power of the second number.
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_TOOLTIP_AND
=
'
Return the bitwise AND of the two numbers.
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_TOOLTIP_IOR
=
'
Return the bitwise inclusive OR of the two numbers.
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_TOOLTIP_XOR
=
'
Return the bitwise exclusive OR of the two numbers.
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_ADD
=
'
+
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_MINUS
=
'
-
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_MULTIPLY
=
'
*
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_DIVIDE
=
'
/
'
;
Blockly
.
Msg
.
LANG_MATH_ARITHMETIC_POWER
=
'
^
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_AND
=
'
bitwise and
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_IOR
=
'
bitwise or
'
;
Blockly
.
Msg
.
LANG_MATH_BITWISE_XOR
=
'
bitwise xor
'
;
/*Blockly.Msg.LANG_MATH_CHANGE_TITLE_CHANGE = 'change';
Blockly.Msg.LANG_MATH_CHANGE_TITLE_ITEM = 'item';
Blockly.Msg.LANG_MATH_CHANGE_INPUT_BY = 'by';
...
...
appinventor/blocklyeditor/src/versioning.js
View file @
b7d0d12e
...
...
@@ -1768,7 +1768,10 @@ Blockly.Versioning.AllUpgradeMaps =
21
:
"
noUpgrade
"
,
// AI2: Added Break Block
22
:
"
noUpgrade
"
22
:
"
noUpgrade
"
,
// AI2: Added Bitwise Blocks
23
:
"
noUpgrade
"
},
// End Language upgraders
...
...
@@ -1859,7 +1862,11 @@ Blockly.Versioning.AllUpgradeMaps =
// AI2:
// - The Rotation property was added to Map
4
:
"
noUpgrade
"
4
:
"
noUpgrade
"
,
// AI2:
// - The ScaleUnits and ShowScale properties were added to Map
5
:
"
noUpgrade
"
},
// End Map upgraders
...
...
appinventor/components/src/com/google/appinventor/components/common/PropertyTypeConstants.java
View file @
b7d0d12e
...
...
@@ -162,6 +162,11 @@ public class PropertyTypeConstants {
*/
public
static
final
String
PROPERTY_TYPE_LONGITUDE
=
"longitude"
;
/**
* Unit system for the map scale bar.
*/
public
static
final
String
PROPERTY_TYPE_MAP_UNIT_SYSTEM
=
"map_unit_system"
;
/**
* Map types supported by the Map component.
* @see
...
...
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
View file @
b7d0d12e
...
...
@@ -433,8 +433,12 @@ public class YaVersion {
// - WEBVIEWER_COMPONENT_VERSION was incremented to 7
// For YOUNG_ANDROID_VERSION 173:
// - FORM_COMPONENT_VERSION was incremented to 24
// For YOUNG_ANDROID_VERSION 174:
// - BLOCKS_LANGUAGE_VERSION was incremented to 23
// For YOUNG_ANDROID_VERSION 175:
// - MAP_COMPONENT_VERSION was incremented 5
public
static
final
int
YOUNG_ANDROID_VERSION
=
17
3
;
public
static
final
int
YOUNG_ANDROID_VERSION
=
17
5
;
// ............................... Blocks Language Version Number ...............................
...
...
@@ -496,8 +500,12 @@ public class YaVersion {
// - Spelling of "Obsfucate" was corrected to Obfuscate in Text Block
// For BLOCKS_LANGUAGE_VERSION 21:
// - The is-text block was added.
// For BLOCKS_LANGUAGE_VERSION 22:
// - Break block was added.
// For BLOCKS_LANGUAGE_VERSION 23:
// - Bitwise and, ior, and xor blocks were added.
public
static
final
int
BLOCKS_LANGUAGE_VERSION
=
2
2
;
public
static
final
int
BLOCKS_LANGUAGE_VERSION
=
2
3
;
// ................................. Component Version Numbers ..................................
...
...
@@ -873,7 +881,10 @@ public class YaVersion {
// - GeoJSONError was renamed to LoadError
// For MAP_COMPONENT_VERSION 4:
// - Added Rotation property
public
static
final
int
MAP_COMPONENT_VERSION
=
4
;
// For MAP_COMPONENT_VERSION 5:
// - Added ShowScale property
// - Added ScaleUnits property
public
static
final
int
MAP_COMPONENT_VERSION
=
5
;
// For MARKER_COMPONENT_VERSION 1:
// - Initial Marker implementation using OpenStreetMap
...
...
appinventor/components/src/com/google/appinventor/components/runtime/Form.java
View file @
b7d0d12e
...
...
@@ -1765,10 +1765,12 @@ public class Form extends AppInventorCompatActivity
@SimpleProperty
(
userVisible
=
false
,
description
=
"Sets the theme used by the application."
)
public
void
Theme
(
String
theme
)
{
if
(
SdkLevel
.
getLevel
()
<
SdkLevel
.
LEVEL_HONEYCOMB
)
{
backgroundColor
=
Component
.
COLOR_WHITE
;
setBackground
(
frameLayout
);
return
;
// Only "Classic" is supported below SDK 11 due to minSDK in AppCompat
}
if
(
usesDefaultBackground
)
{
if
(
theme
.
equalsIgnoreCase
(
"AppTheme"
))
{
if
(
theme
.
equalsIgnoreCase
(
"AppTheme"
)
&&
!
isClassicMode
()
)
{
backgroundColor
=
Component
.
COLOR_BLACK
;
}
else
{
backgroundColor
=
Component
.
COLOR_WHITE
;
...
...
appinventor/components/src/com/google/appinventor/components/runtime/Map.java
View file @
b7d0d12e
...
...
@@ -12,6 +12,7 @@ import com.google.appinventor.components.runtime.util.ErrorMessages;
import
com.google.appinventor.components.runtime.util.GeoJSONUtil
;
import
com.google.appinventor.components.runtime.util.GeometryUtil
;
import
com.google.appinventor.components.runtime.util.MapFactory
;
import
com.google.appinventor.components.runtime.util.MapFactory.MapScaleUnits
;
import
com.google.appinventor.components.runtime.util.YailList
;
import
org.osmdroid.util.BoundingBox
;
...
...
@@ -114,6 +115,7 @@ public class Map extends MapFeatureContainerBase implements MapEventListener {
ShowUser
(
false
);
ShowZoom
(
false
);
EnableRotation
(
false
);
ShowScale
(
false
);
}
@Override
...
...
@@ -449,6 +451,42 @@ public class Map extends MapFeatureContainerBase implements MapEventListener {
return
sensor
;
}
@DesignerProperty
(
editorType
=
PropertyTypeConstants
.
PROPERTY_TYPE_BOOLEAN
,
defaultValue
=
"False"
)
@SimpleProperty
public
void
ShowScale
(
boolean
show
)
{
mapController
.
setScaleVisible
(
show
);
}
@SimpleProperty
(
category
=
PropertyCategory
.
BEHAVIOR
,
description
=
"Shows a scale reference on the map."
)
public
boolean
ShowScale
()
{
return
mapController
.
isScaleVisible
();
}
@DesignerProperty
(
editorType
=
PropertyTypeConstants
.
PROPERTY_TYPE_MAP_UNIT_SYSTEM
,
defaultValue
=
"1"
)
@SimpleProperty
public
void
ScaleUnits
(
int
units
)
{
if
(
1
<=
units
&&
units
<
MapScaleUnits
.
values
().
length
)
{
mapController
.
setScaleUnits
(
MapScaleUnits
.
values
()[
units
]);
}
else
{
$form
().
dispatchErrorOccurredEvent
(
this
,
"ScaleUnits"
,
ErrorMessages
.
ERROR_INVALID_UNIT_SYSTEM
,
units
);
}
}
@SimpleProperty
public
int
ScaleUnits
()
{
switch
(
mapController
.
getScaleUnits
())
{
case
METRIC:
return
1
;
case
IMPERIAL:
return
2
;
default
:
return
0
;
}
}
@SimpleProperty
(
category
=
PropertyCategory
.
BEHAVIOR
,
description
=
"Returns the user's latitude if ShowUser is enabled."
)
public
double
UserLatitude
()
{
...
...
appinventor/components/src/com/google/appinventor/components/runtime/util/DummyMapController.java
View file @
b7d0d12e
...
...
@@ -6,6 +6,7 @@
package
com.google.appinventor.components.runtime.util
;
import
com.google.appinventor.components.runtime.LocationSensor
;
import
com.google.appinventor.components.runtime.util.MapFactory.MapScaleUnits
;
import
org.osmdroid.util.BoundingBox
;
import
com.google.appinventor.components.runtime.util.MapFactory.HasFill
;
...
...
@@ -257,4 +258,24 @@ class DummyMapController implements MapController {
public
int
getOverlayCount
()
{
throw
new
UnsupportedOperationException
();
}
@Override
public
void
setScaleVisible
(
boolean
show
)
{
throw
new
UnsupportedOperationException
();
}
@Override
public
boolean
isScaleVisible
()
{
throw
new
UnsupportedOperationException
();
}
@Override
public
void
setScaleUnits
(
MapScaleUnits
units
)
{
throw
new
UnsupportedOperationException
();
}
@Override
public
MapScaleUnits
getScaleUnits
()
{
throw
new
UnsupportedOperationException
();
}
}
appinventor/components/src/com/google/appinventor/components/runtime/util/ErrorMessages.java
View file @
b7d0d12e
...
...
@@ -240,6 +240,7 @@ public final class ErrorMessages {
public
static
final
int
ERROR_INVALID_LATITUDE_IN_POINT_AT_INDEX
=
3418
;
public
static
final
int
ERROR_INVALID_LONGITUDE_IN_POINT_AT_INDEX
=
3419
;
public
static
final
int
ERROR_EXPECTED_ARRAY_AT_INDEX
=
3420
;
public
static
final
int
ERROR_INVALID_UNIT_SYSTEM
=
3421
;
// Phone Call Errors
public
static
final
int
ERROR_NO_CALL_PERMISSION
=
3501
;
...
...
@@ -607,6 +608,10 @@ public final class ErrorMessages {
"Invalid longitude %2$s in point at index %1$d. Expected a value between [-180, 180]."
);
errorMessages
.
put
(
ERROR_EXPECTED_ARRAY_AT_INDEX
,
"Expected an array of values at index %1$d, but got %2$s."
);
errorMessages
.
put
(
ERROR_INVALID_UNIT_SYSTEM
,
"Invalid unit system %1$d given to ScaleUnits. Expected either 1 or 2."
);
// Phone Call errors
errorMessages
.
put
(
ERROR_NO_CALL_PERMISSION
,
"You do not have permission to make phone calls."
);
}
...
...
appinventor/components/src/com/google/appinventor/components/runtime/util/MapFactory.java
View file @
b7d0d12e
...
...
@@ -524,6 +524,32 @@ public final class MapFactory {
* @return the rotation
*/
float
getRotation
();
/**
* Sets whether or not the scale overlay is visible.
* @param show True if the scale should be shown, otherwise false.
*/
void
setScaleVisible
(
boolean
show
);
/**
* Gets the visibility of the scale on the map. A true value does
* not guarantee that the scale is visible to the user (i.e., if
* the Map is not visible).
* @returns true if the scale is enabled on the map, otherwise false.
*/
boolean
isScaleVisible
();
/**
* Sets the units for the scale. Options are either "metric" or "imperial"
* @param units the new units to show for the scale
*/
void
setScaleUnits
(
MapScaleUnits
units
);
/**
* Gets the units for the scale.
* @return the units used for the scale overlay
*/
MapScaleUnits
getScaleUnits
();
}
/**
...
...
@@ -1480,6 +1506,27 @@ public final class MapFactory {
TERRAIN
}
/**
* MapScaleUnits defines the available unit systems for rendering the map scale overlay.
*/
public
enum
MapScaleUnits
{
/**
* Reserved. Makes the map scale units start from 1 to be consistent with App Inventor design
* principles.
*/
UNKNOWN
,
/**
* Metric units (km, m)
*/
METRIC
,
/**
* Imperial units (mi, ft)
*/
IMPERIAL
}
/**
* Constructs a new map for the given form. On versions of Android that are too old for Maps
* support, a {@link DummyMapController} is returned that throws
...
...
appinventor/components/src/com/google/appinventor/components/runtime/util/NativeOpenStreetMapController.java
View file @
b7d0d12e
...
...
@@ -40,6 +40,7 @@ import com.google.appinventor.components.runtime.util.MapFactory.MapLineString;
import
com.google.appinventor.components.runtime.util.MapFactory.MapMarker
;
import
com.google.appinventor.components.runtime.util.MapFactory.MapPolygon
;
import
com.google.appinventor.components.runtime.util.MapFactory.MapRectangle
;
import
com.google.appinventor.components.runtime.util.MapFactory.MapScaleUnits
;
import
com.google.appinventor.components.runtime.util.MapFactory.MapType
;
import
com.google.appinventor.components.runtime.view.ZoomControlView
;
import
org.osmdroid.api.IGeoPoint
;
...
...
@@ -61,6 +62,8 @@ import org.osmdroid.views.overlay.OverlayWithIW;
import
org.osmdroid.views.overlay.OverlayWithIWVisitor
;
import
org.osmdroid.views.overlay.Polygon
;
import
org.osmdroid.views.overlay.Polyline
;
import
org.osmdroid.views.overlay.ScaleBarOverlay
;
import
org.osmdroid.views.overlay.ScaleBarOverlay.UnitsOfMeasure
;
import
org.osmdroid.views.overlay.compass.CompassOverlay
;
import
org.osmdroid.views.overlay.compass.InternalCompassOrientationProvider
;
import
org.osmdroid.views.overlay.gestures.RotationGestureOverlay
;
...
...
@@ -109,6 +112,7 @@ class NativeOpenStreetMapController implements MapController, MapListener {
private
boolean
ready
=
false
;
private
ZoomControlView
zoomControls
=
null
;
private
float
lastAzimuth
=
Float
.
NaN
;
private
ScaleBarOverlay
scaleBar
;
private
static
class
AppInventorLocationSensorAdapter
implements
IMyLocationProvider
,
LocationSensor
.
LocationSensorListener
{
...
...
@@ -293,6 +297,11 @@ class NativeOpenStreetMapController implements MapController, MapListener {
});
zoomControls
=
new
ZoomControlView
(
view
);
userLocation
=
new
MyLocationNewOverlay
(
locationProvider
,
view
);
scaleBar
=
new
ScaleBarOverlay
(
view
);
scaleBar
.
setAlignBottom
(
true
);
scaleBar
.
setAlignRight
(
true
);
scaleBar
.
disableScaleBar
();
view
.
getOverlayManager
().
add
(
scaleBar
);
containerView
=
new
RelativeLayout
(
form
);
containerView
.
setClipChildren
(
true
);
...
...
@@ -1212,6 +1221,44 @@ class NativeOpenStreetMapController implements MapController, MapListener {
return
view
.
getMapOrientation
();
}
@Override
public
void
setScaleVisible
(
boolean
show
)
{
scaleBar
.
setEnabled
(
show
);
view
.
invalidate
();
}
@Override
public
boolean
isScaleVisible
()
{
return
scaleBar
.
isEnabled
();
}
@Override
public
void
setScaleUnits
(
MapScaleUnits
units
)
{
switch
(
units
)
{
case
METRIC:
scaleBar
.
setUnitsOfMeasure
(
UnitsOfMeasure
.
metric
);
break
;
case
IMPERIAL:
scaleBar
.
setUnitsOfMeasure
(
UnitsOfMeasure
.
imperial
);
break
;
default
:
throw
new
IllegalArgumentException
(
"Unallowable unit system: "
+
units
);
}
view
.
invalidate
();
}
@Override
public
MapScaleUnits
getScaleUnits
()
{
switch
(
scaleBar
.
getUnitsOfMeasure
())
{
case
imperial:
return
MapScaleUnits
.
IMPERIAL
;
case
metric:
return
MapScaleUnits
.
METRIC
;
default
:
throw
new
IllegalStateException
(
"Somehow we have an unallowed unit system"
);
}
}
static
class
MultiPolygon
extends
Polygon
{
private
List
<
Polygon
>
children
=
new
ArrayList
<
Polygon
>();
...
...
appinventor/components/tests/com/google/appinventor/components/runtime/MapTest.java
View file @
b7d0d12e
...
...
@@ -7,7 +7,10 @@ package com.google.appinventor.components.runtime;
import
android.content.Context
;
import
android.hardware.Sensor
;
import
android.view.View
;
import
android.widget.RelativeLayout
;
import
com.google.appinventor.components.runtime.shadows.ShadowAsynchUtil
;
import
com.google.appinventor.components.runtime.shadows.ShadowEventDispatcher
;
import
com.google.appinventor.components.runtime.util.ErrorMessages
;
import
com.google.appinventor.components.runtime.util.GeometryUtil
;
import
com.google.appinventor.components.runtime.util.YailList
;
...
...
@@ -15,6 +18,7 @@ import org.easymock.EasyMock;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.osmdroid.util.GeoPoint
;
import
org.osmdroid.views.MapView
;
import
org.robolectric.RuntimeEnvironment
;
import
org.robolectric.shadow.api.Shadow
;
import
org.robolectric.shadows.ShadowSensorManager
;
...
...
@@ -147,6 +151,44 @@ public class MapTest extends MapTestBase {
assertTrue
(
map
.
ShowUser
());
}
/**
* Test that:
* !) Showing the scale invalidates the view
* 2) if we show the scale, the ShowScale getter will return true.
*/
@Test
public
void
testShowScale
()
{
shadowOf
(
getMapView
()).
clearWasInvalidated
();
map
.
ShowScale
(
true
);
// Make sure that the view was invalidated
assertTrue
(
shadowOf
(
getMapView
()).
wasInvalidated
());
assertTrue
(
map
.
ShowScale
());
}
/**
* Test that:
* 1) Changing the scale invalidates the map view
* 2) If we change the scale, the ScaleUnits getter will return the new value
*/
@Test
public
void
testScaleUnits
()
{
shadowOf
(
getMapView
()).
clearWasInvalidated
();
map
.
ScaleUnits
(
2
);
// Make sure that the view was invalidated
assertTrue
(
shadowOf
(
getMapView
()).
wasInvalidated
());
assertEquals
(
2
,
map
.
ScaleUnits
());
}
/**
* Test that, if we give an invalid unit system identifier, the system will
* dispatch an error through the Form.
*/
@Test
public
void
testScaleUnitsInvalid
()
{
map
.
ScaleUnits
(-
1
);
ShadowEventDispatcher
.
assertErrorOccurred
(
ErrorMessages
.
ERROR_INVALID_UNIT_SYSTEM
);
}
@Test
public
void
testLocationSensor
()
{
LocationSensor
sensor
=
new
LocationSensor
(
getForm
());
...
...
@@ -341,9 +383,20 @@ public class MapTest extends MapTestBase {
*/
@Test
public
void
testResetFeatureList
()
{
int
defaultFeatureListSize
=
map
.
getController
().
getOverlayCount
();
new
Marker
(
map
);
assertEquals
(
defaultFeatureListSize
+
1
,
map
.
getController
().
getOverlayCount
());
map
.
Features
(
YailList
.
makeEmptyList
());
assertEquals
(
0
,
map
.
Features
().
size
());
assertEquals
(
1
,
map
.
getController
().
getOverlayCount
());
assertEquals
(
defaultFeatureListSize
,
map
.
getController
().
getOverlayCount
());
}
private
MapView
getMapView
()
{
RelativeLayout
layout
=
(
RelativeLayout
)
map
.
getView
();
return
(
MapView
)
layout
.
getChildAt
(
0
);
}
private
static
ShadowView
shadowOf
(
View
view
)
{
return
(
ShadowView
)
Shadow
.
extract
(
view
);
}
}
appinventor/components/tests/res/color/abc_btn_colored_borderless_text_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Used for the text of a borderless colored button. -->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_enabled=
"false"
app:alpha=
"?android:attr/disabledAlpha"
android:color=
"?android:attr/textColorSecondary"
/>
<item
android:color=
"?attr/colorAccent"
/>
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/abc_btn_colored_text_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Used for the text of a bordered colored button. -->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_enabled=
"false"
app:alpha=
"?android:attr/disabledAlpha"
android:color=
"?android:attr/textColorPrimary"
/>
<item
android:color=
"?android:attr/textColorPrimaryInverse"
/>
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/abc_hint_foreground_material_dark.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"true"
android:state_pressed=
"true"
android:alpha=
"@dimen/hint_pressed_alpha_material_dark"
android:color=
"@color/foreground_material_dark"
/>
<item
android:alpha=
"@dimen/hint_alpha_material_dark"
android:color=
"@color/foreground_material_dark"
/>
</selector>
appinventor/components/tests/res/color/abc_hint_foreground_material_light.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"true"
android:state_pressed=
"true"
android:alpha=
"@dimen/hint_pressed_alpha_material_light"
android:color=
"@color/foreground_material_light"
/>
<item
android:alpha=
"@dimen/hint_alpha_material_light"
android:color=
"@color/foreground_material_light"
/>
</selector>
appinventor/components/tests/res/color/abc_primary_text_disable_only_material_dark.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:state_enabled=
"false"
android:color=
"@color/bright_foreground_disabled_material_dark"
/>
<item
android:color=
"@color/bright_foreground_material_dark"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/abc_primary_text_disable_only_material_dark.xml -->
\ No newline at end of file
appinventor/components/tests/res/color/abc_primary_text_disable_only_material_light.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:state_enabled=
"false"
android:color=
"@color/bright_foreground_disabled_material_light"
/>
<item
android:color=
"@color/bright_foreground_material_light"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/abc_primary_text_disable_only_material_light.xml -->
\ No newline at end of file
appinventor/components/tests/res/color/abc_primary_text_material_dark.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:state_enabled=
"false"
android:color=
"@color/primary_text_disabled_material_dark"
/>
<item
android:color=
"@color/primary_text_default_material_dark"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/abc_primary_text_material_dark.xml -->
\ No newline at end of file
appinventor/components/tests/res/color/abc_primary_text_material_light.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:state_enabled=
"false"
android:color=
"@color/primary_text_disabled_material_light"
/>
<item
android:color=
"@color/primary_text_default_material_light"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/abc_primary_text_material_light.xml -->
\ No newline at end of file
appinventor/components/tests/res/color/abc_search_url_text.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,4 @@
<item
android:state_pressed=
"true"
android:color=
"@color/abc_search_url_text_pressed"
/>
<item
android:state_selected=
"true"
android:color=
"@color/abc_search_url_text_selected"
/>
<item
android:color=
"@color/abc_search_url_text_normal"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/abc_search_url_text.xml -->
\ No newline at end of file
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/abc_secondary_text_material_dark.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:state_enabled=
"false"
android:color=
"@color/secondary_text_disabled_material_dark"
/>
<item
android:color=
"@color/secondary_text_default_material_dark"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/abc_secondary_text_material_dark.xml -->
\ No newline at end of file
appinventor/components/tests/res/color/abc_secondary_text_material_light.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:state_enabled=
"false"
android:color=
"@color/secondary_text_disabled_material_light"
/>
<item
android:color=
"@color/secondary_text_default_material_light"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/abc_secondary_text_material_light.xml -->
\ No newline at end of file
appinventor/components/tests/res/color/abc_tint_btn_checkable.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_enabled=
"false"
android:color=
"?attr/colorControlNormal"
app:alpha=
"?android:disabledAlpha"
/>
<item
android:state_checked=
"true"
android:color=
"?attr/colorControlActivated"
/>
<item
android:color=
"?attr/colorControlNormal"
/>
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/abc_tint_default.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_enabled=
"false"
android:color=
"?attr/colorControlNormal"
app:alpha=
"?android:disabledAlpha"
/>
<item
android:state_focused=
"true"
android:color=
"?attr/colorControlActivated"
/>
<item
android:state_pressed=
"true"
android:color=
"?attr/colorControlActivated"
/>
<item
android:state_activated=
"true"
android:color=
"?attr/colorControlActivated"
/>
<item
android:state_selected=
"true"
android:color=
"?attr/colorControlActivated"
/>
<item
android:state_checked=
"true"
android:color=
"?attr/colorControlActivated"
/>
<item
android:color=
"?attr/colorControlNormal"
/>
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/abc_tint_edittext.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_enabled=
"false"
android:color=
"?attr/colorControlNormal"
app:alpha=
"?android:disabledAlpha"
/>
<item
android:state_pressed=
"false"
android:state_focused=
"false"
android:color=
"?attr/colorControlNormal"
/>
<item
android:color=
"?attr/colorControlActivated"
/>
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/abc_tint_seek_thumb.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_enabled=
"false"
android:color=
"?attr/colorControlActivated"
app:alpha=
"?android:attr/disabledAlpha"
/>
<item
android:color=
"?attr/colorControlActivated"
/>
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/abc_tint_spinner.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_enabled=
"false"
android:color=
"?attr/colorControlNormal"
app:alpha=
"?android:disabledAlpha"
/>
<item
android:state_pressed=
"false"
android:state_focused=
"false"
android:color=
"?attr/colorControlNormal"
/>
<item
android:color=
"?attr/colorControlActivated"
/>
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/abc_tint_switch_track.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:state_enabled=
"false"
android:color=
"?android:attr/colorForeground"
app:alpha=
"0.1"
/>
<item
android:state_checked=
"true"
android:color=
"?attr/colorControlActivated"
app:alpha=
"0.3"
/>
<item
android:color=
"?android:attr/colorForeground"
app:alpha=
"0.3"
/>
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/switch_thumb_material_dark.xml
View file @
b7d0d12e
...
...
@@ -17,4 +17,4 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"false"
android:color=
"@color/switch_thumb_disabled_material_dark"
/>
<item
android:color=
"@color/switch_thumb_normal_material_dark"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/switch_thumb_material_dark.xml -->
\ No newline at end of file
</selector>
\ No newline at end of file
appinventor/components/tests/res/color/switch_thumb_material_light.xml
View file @
b7d0d12e
...
...
@@ -17,4 +17,4 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"false"
android:color=
"@color/switch_thumb_disabled_material_light"
/>
<item
android:color=
"@color/switch_thumb_normal_material_light"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/color/switch_thumb_material_light.xml -->
\ No newline at end of file
</selector>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_btn_borderless_material.xml
View file @
b7d0d12e
...
...
@@ -20,4 +20,3 @@
<item
android:drawable=
"@android:color/transparent"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_btn_borderless_material.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_btn_check_material.xml
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 201
4
The Android Open Source Project
<!-- Copyright (C) 201
5
The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
...
...
@@ -17,4 +17,4 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_checked=
"true"
android:drawable=
"@drawable/abc_btn_check_to_on_mtrl_015"
/>
<item
android:drawable=
"@drawable/abc_btn_check_to_on_mtrl_000"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_btn_check_material.xml -->
\ No newline at end of file
</selector>
appinventor/components/tests/res/drawable/abc_btn_colored_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Used as the canonical button shape. -->
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@drawable/abc_btn_default_mtrl_shape"
/>
</layer-list>
appinventor/components/tests/res/drawable/abc_btn_default_mtrl_shape.xml
View file @
b7d0d12e
...
...
@@ -30,4 +30,3 @@
android:bottom=
"@dimen/abc_button_padding_vertical_material"
/>
</shape>
</inset>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_btn_default_mtrl_shape.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_btn_radio_material.xml
View file @
b7d0d12e
...
...
@@ -17,4 +17,4 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_checked=
"true"
android:drawable=
"@drawable/abc_btn_radio_to_on_mtrl_015"
/>
<item
android:drawable=
"@drawable/abc_btn_radio_to_on_mtrl_000"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_btn_radio_material.xml -->
\ No newline at end of file
</selector>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_cab_background_internal_bg.xml
View file @
b7d0d12e
...
...
@@ -20,4 +20,4 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@android:color/white"
/>
</shape>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_cab_background_internal_bg.xml -->
\ No newline at end of file
</shape>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_cab_background_top_material.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@android:color/white"
/>
</shape>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_cab_background_top_material.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_dialog_material_background.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<inset
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:insetLeft=
"16dp"
android:insetTop=
"16dp"
android:insetRight=
"16dp"
android:insetBottom=
"16dp"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"2dp"
/>
<solid
android:color=
"@android:color/white"
/>
</shape>
</inset>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_edit_text_material.xml
View file @
b7d0d12e
...
...
@@ -27,4 +27,3 @@
</selector>
</inset>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_edit_text_material.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_ic_ab_back_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
android:autoMirrored=
"true"
android:tint=
"?attr/colorControlNormal"
>
<path
android:pathData=
"M20,11L7.8,11l5.6,-5.6L12,4l-8,8l8,8l1.4,-1.4L7.8,13L20,13L20,11z"
android:fillColor=
"@android:color/white"
/>
</vector>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_ic_arrow_drop_right_black_24dp.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
android:width=
"24dp"
android:tint=
"?attr/colorControlNormal"
android:autoMirrored=
"true"
>
<group
android:name=
"arrow"
android:rotation=
"90.0"
android:pivotX=
"12.0"
android:pivotY=
"12.0"
>
<path
android:fillColor=
"@android:color/black"
android:pathData=
"M7,14 L12,9 L17,14 L7,14 Z"
/>
<path
android:pathData=
"M0,0 L24,0 L24,24 L0,24 L0,0 Z"
/>
</group>
</vector>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_ic_clear_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
android:tint=
"?attr/colorControlNormal"
>
<path
android:pathData=
"M19,6.41L17.59,5,12,10.59,6.41,5,5,6.41,10.59,12,5,17.59,6.41,19,12,13.41,17.59,19,19,17.59,13.41,12z"
android:fillColor=
"@android:color/white"
/>
</vector>
appinventor/components/tests/res/drawable/abc_ic_go_search_api_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
android:tint=
"?attr/colorControlNormal"
>
<path
android:pathData=
"M10,6l-1.4,1.4 4.599999,4.6 -4.599999,4.6 1.4,1.4 6,-6z"
android:fillColor=
"@android:color/white"
/>
</vector>
appinventor/components/tests/res/drawable/abc_ic_menu_overflow_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
android:tint=
"?attr/colorControlNormal"
>
<path
android:pathData=
"M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2c-1.1,0 -2,0.9 -2,2S10.9,8 12,8zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c1.1,0 2,-0.9 2,-2S13.1,10 12,10zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c1.1,0 2,-0.9 2,-2S13.1,16 12,16z"
android:fillColor=
"@android:color/white"
/>
</vector>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_ic_search_api_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
android:tint=
"?attr/colorControlNormal"
>
<path
android:pathData=
"M15.5,14l-0.8,0l-0.3,-0.3c1,-1.1 1.6,-2.6 1.6,-4.2C16,5.9 13.1,3 9.5,3C5.9,3 3,5.9 3,9.5S5.9,16 9.5,16c1.6,0 3.1,-0.6 4.2,-1.6l0.3,0.3l0,0.8l5,5l1.5,-1.5L15.5,14zM9.5,14C7,14 5,12 5,9.5S7,5 9.5,5C12,5 14,7 14,9.5S12,14 9.5,14z"
android:fillColor=
"@android:color/white"
/>
</vector>
appinventor/components/tests/res/drawable/abc_ic_voice_search_api_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
android:tint=
"?attr/colorControlNormal"
>
<path
android:pathData=
"M12,14c1.7,0 3,-1.3 3,-3l0,-6c0,-1.7 -1.3,-3 -3,-3c-1.7,0 -3,1.3 -3,3l0,6C9,12.7 10.3,14 12,14zM17.299999,11c0,3 -2.5,5.1 -5.3,5.1c-2.8,0 -5.3,-2.1 -5.3,-5.1L5,11c0,3.4 2.7,6.2 6,6.7L11,21l2,0l0,-3.3c3.3,-0.5 6,-3.3 6,-6.7L17.299999,11.000001z"
android:fillColor=
"@android:color/white"
/>
</vector>
appinventor/components/tests/res/drawable/abc_item_background_holo_dark.xml
View file @
b7d0d12e
...
...
@@ -24,4 +24,3 @@
<item
android:state_focused=
"true"
android:drawable=
"@drawable/abc_list_focused_holo"
/>
<item
android:drawable=
"@android:color/transparent"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_item_background_holo_dark.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_item_background_holo_light.xml
View file @
b7d0d12e
...
...
@@ -24,4 +24,3 @@
<item
android:state_focused=
"true"
android:drawable=
"@drawable/abc_list_focused_holo"
/>
<item
android:drawable=
"@android:color/transparent"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_item_background_holo_light.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_list_selector_background_transition_holo_dark.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:drawable=
"@drawable/abc_list_pressed_holo_dark"
/>
<item
android:drawable=
"@drawable/abc_list_longpressed_holo"
/>
</transition>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_list_selector_background_transition_holo_dark.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_list_selector_background_transition_holo_light.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:drawable=
"@drawable/abc_list_pressed_holo_light"
/>
<item
android:drawable=
"@drawable/abc_list_longpressed_holo"
/>
</transition>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_list_selector_background_transition_holo_light.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_list_selector_holo_dark.xml
View file @
b7d0d12e
...
...
@@ -25,4 +25,3 @@
<item
android:state_focused=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/abc_list_selector_background_transition_holo_dark"
/>
<item
android:state_focused=
"true"
android:drawable=
"@drawable/abc_list_focused_holo"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_list_selector_holo_dark.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_list_selector_holo_light.xml
View file @
b7d0d12e
...
...
@@ -26,4 +26,3 @@
<item
android:state_focused=
"true"
android:drawable=
"@drawable/abc_list_focused_holo"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_list_selector_holo_light.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_ratingbar_indicator_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
android:drawable=
"@drawable/abc_ic_star_black_36dp"
/>
<item
android:id=
"@android:id/secondaryProgress"
android:drawable=
"@drawable/abc_ic_star_half_black_36dp"
/>
<item
android:id=
"@android:id/progress"
>
<bitmap
android:src=
"@drawable/abc_ic_star_black_36dp"
android:tileModeX=
"repeat"
/>
</item>
</layer-list>
appinventor/components/tests/res/drawable/abc_ratingbar_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
android:drawable=
"@drawable/abc_ic_star_black_48dp"
/>
<item
android:id=
"@android:id/secondaryProgress"
android:drawable=
"@drawable/abc_ic_star_half_black_48dp"
/>
<item
android:id=
"@android:id/progress"
>
<bitmap
android:src=
"@drawable/abc_ic_star_black_48dp"
android:tileModeX=
"repeat"
/>
</item>
</layer-list>
appinventor/components/tests/res/drawable/abc_ratingbar_small_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
android:drawable=
"@drawable/abc_ic_star_black_16dp"
/>
<item
android:id=
"@android:id/secondaryProgress"
android:drawable=
"@drawable/abc_ic_star_half_black_16dp"
/>
<item
android:id=
"@android:id/progress"
>
<bitmap
android:src=
"@drawable/abc_ic_star_black_16dp"
android:tileModeX=
"repeat"
/>
</item>
</layer-list>
appinventor/components/tests/res/drawable/abc_seekbar_thumb_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:constantSize=
"true"
>
<item
android:state_enabled=
"false"
android:state_pressed=
"true"
>
<bitmap
android:src=
"@drawable/abc_scrubber_control_off_mtrl_alpha"
android:gravity=
"center"
/>
</item>
<item
android:state_enabled=
"false"
>
<bitmap
android:src=
"@drawable/abc_scrubber_control_off_mtrl_alpha"
android:gravity=
"center"
/>
</item>
<item
android:state_pressed=
"true"
>
<bitmap
android:src=
"@drawable/abc_scrubber_control_to_pressed_mtrl_005"
android:gravity=
"center"
/>
</item>
<item>
<bitmap
android:src=
"@drawable/abc_scrubber_control_to_pressed_mtrl_000"
android:gravity=
"center"
/>
</item>
</selector>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_seekbar_tick_mark_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"oval"
>
<size
android:width=
"@dimen/abc_progress_bar_height_material"
android:height=
"@dimen/abc_progress_bar_height_material"
/>
<solid
android:color=
"@android:color/white"
/>
</shape>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_seekbar_track_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
android:drawable=
"@drawable/abc_scrubber_track_mtrl_alpha"
/>
<item
android:id=
"@android:id/secondaryProgress"
>
<scale
android:scaleWidth=
"100%"
>
<selector>
<item
android:state_enabled=
"false"
>
<color
android:color=
"@android:color/transparent"
/>
</item>
<item
android:drawable=
"@drawable/abc_scrubber_primary_mtrl_alpha"
/>
</selector>
</scale>
</item>
<item
android:id=
"@android:id/progress"
>
<scale
android:scaleWidth=
"100%"
>
<selector>
<item
android:state_enabled=
"false"
>
<color
android:color=
"@android:color/transparent"
/>
</item>
<item
android:drawable=
"@drawable/abc_scrubber_primary_mtrl_alpha"
/>
</selector>
</scale>
</item>
</layer-list>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_spinner_textfield_background_material.xml
View file @
b7d0d12e
...
...
@@ -33,4 +33,4 @@
</layer-list>
</item>
</selector>
</inset>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_spinner_textfield_background_material.xml -->
\ No newline at end of file
</inset>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_switch_thumb_material.xml
View file @
b7d0d12e
...
...
@@ -17,4 +17,4 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_checked=
"true"
android:drawable=
"@drawable/abc_btn_switch_to_on_mtrl_00012"
/>
<item
android:drawable=
"@drawable/abc_btn_switch_to_on_mtrl_00001"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_switch_thumb_material.xml -->
\ No newline at end of file
</selector>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_tab_indicator_material.xml
View file @
b7d0d12e
...
...
@@ -18,4 +18,3 @@
<item
android:state_selected=
"true"
android:drawable=
"@drawable/abc_tab_indicator_mtrl_alpha"
/>
<item
android:drawable=
"@android:color/transparent"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_tab_indicator_material.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_text_cursor_material.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<size
android:height=
"2dp"
android:width=
"2dp"
/>
<solid
android:color=
"@android:color/white"
/>
</shape>
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_textfield_search_material.xml
View file @
b7d0d12e
...
...
@@ -20,4 +20,3 @@
<item
android:state_enabled=
"true"
android:drawable=
"@drawable/abc_textfield_search_default_mtrl_alpha"
/>
<item
android:drawable=
"@drawable/abc_textfield_search_default_mtrl_alpha"
/>
</selector>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/lmp-mr1-supportlib-release/frameworks/support/v7/appcompat/res/drawable/abc_textfield_search_material.xml -->
\ No newline at end of file
appinventor/components/tests/res/drawable/abc_vector_test.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M20,11L7.8,11l5.6,-5.6L12,4l-8,8l8,8l1.4,-1.4L7.8,13L20,13L20,11z"
/>
</vector>
\ No newline at end of file
appinventor/components/tests/res/drawable/tooltip_frame_dark.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2017 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/tooltip_background_dark"
/>
<corners
android:radius=
"@dimen/tooltip_corner_radius"
/>
</shape>
\ No newline at end of file
appinventor/components/tests/res/drawable/tooltip_frame_light.xml
0 → 100644
View file @
b7d0d12e
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2017 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/tooltip_background_light"
/>
<corners
android:radius=
"@dimen/tooltip_corner_radius"
/>
</shape>
\ No newline at end of file
appinventor/docs/reference/blocks/images/math/bitwise_and.png
0 → 100644
View file @
b7d0d12e
6.96 KB
appinventor/docs/reference/blocks/images/math/bitwise_ior.png
0 → 100644
View file @
b7d0d12e
6.71 KB
appinventor/docs/reference/blocks/images/math/bitwise_xor.png
0 → 100644
View file @
b7d0d12e
6.85 KB
appinventor/docs/reference/blocks/math.html
View file @
b7d0d12e
This diff is collapsed.
Click to expand it.
appinventor/docs/reference/components/maps.html
View file @
b7d0d12e
...
...
@@ -784,9 +784,15 @@
<dd>
Sets or gets the tile layer used to draw the Map background. Defaults to Roads. Valid values are
1 (Roads), 2 (Aerial), or 3 (Terrain). Road layers are provided by OpenStreetMap and aerial and
terrain layers are provided by the U.S. Geological Survey.
</dd>
<dt
class=
"number"
id=
"Map.ScaleUnits"
>
ScaleUnits
<i></i></dt>
<dd>
Sets or gets the units used for the scale overlay. 1 (the default) will give metric units (km, m)
whereas 2 will give imperial units (mi, ft).
</dd>
<dt
class=
"boolean"
id=
"Map.ShowCompass"
>
ShowCompass
<i></i></dt>
<dd>
Shows or hides a compass overlay on the Map. The compass will be rotated based on the
device
'
s orientation if a digital compass is present in hardware.
</dd>
<dt
class=
"boolean"
id=
"Map.ShowScale"
>
ShowScale
<i></i></dt>
<dd>
Shows or hides a scale overlay on the Map. The scale will change with the zoom level and its units
can be controlled by the
<a
href=
"#Map.ScaleUnits"
>
ScaleUnits
</a>
property.
</dd>
<dt
class=
"boolean"
id=
"Map.ShowUser"
>
ShowUser
<i></i></dt>
<dd>
Shows or hides an icon indicating the user
'
s current location on the Map. The availability
and accuracy of this feature will depend on whether the user has location services enabled and which
...
...
appinventor/lib/android/support/testing-support-R-classes.jar
View file @
b7d0d12e
No preview for this file type
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