長方形.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:layout_weight="100">
<solid android:color="#ffffff"/>
<stroke android:width="3dp"
android:color="#ff000000"/>
<padding android:left="1dp"
android:top="1dp"
android:right="1dp"
android:bottom="1dp"/>
<corners android:radius="30dp"/>
</shape>
マイ マップ アクティビティ
//Drawable d = getResources().getDrawable(R.drawable.chart); <-- this will get drawn on my map
Drawable rect = getResources().getDrawable(R.drawable.rectangle); // <-- this wont
OverlayItems itemizedoverlay = new OverlayItems(rect, this);
マップビューにカスタムシェイプを追加できない理由を誰か説明してもらえますか? 通常の png ファイルは問題なく機能しますが、カスタム シェイプを作成して追加しようとすると、表示されません。どちらもドローアブルであるため、私には意味がありませんか?
明らかな何かを見逃しましたか?ありがとう