[TIMOB-28358] Android: "ti.map" module logs theme errors
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-06-28T22:15:17.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.0.1 |
Components | Android |
Labels | android, maps, module, theme, ti.map |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2021-02-18T07:53:18.000+0000 |
Updated | 2021-06-28T22:15:33.000+0000 |
Description
*Summary:*
Show the "ti.map" module's map view causes theme errors to be logged.
*Steps to reproduce:*
Set up a Titanium project to use the newest "ti.map" module.
Build and run the below code on Android.
In the log, notice the following error will be logged on app startup.
[ERROR] ThemeUtils: View class com.google.maps.android.ui.SquareTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
app.js
const map = require("ti.map");
const window = Ti.UI.createWindow();
window.add(map.createView({
width: Ti.UI.FILL,
height: Ti.UI.FILL,
}));
window.open();
*Cause:*
It's caused by our marker clustering feature. We're supposed to pass an Activity
to the Java ClusterManager
constructor, but we're passing it an Application
instance instead.
[TiUIMapView.java](https://github.com/appcelerator-modules/ti.map/blob/2e77f40617b68b970cb24bf120bd46b881b96b13/android/src/ti/map/TiUIMapView.java#L208-L212)
*Note:*
This error appears to be harmless. The map view and its markers still function correctly.
PR: https://github.com/appcelerator-modules/ti.map/pull/402
PR (titanium_mobile): https://github.com/appcelerator/titanium_mobile/pull/12919
merged to master (for titanium_mobile)
10_0_X backport merged