2026-10-19 01:43:37 +08:00
|
|
|
package cn.ucvl.zhaodisplay;
|
|
|
|
|
import android.graphics.*;
|
|
|
|
|
import org.json.*;
|
|
|
|
|
/** Clearly labelled placeholder: no map tiles or real coordinates in this offline fixture. */
|
|
|
|
|
final class LocationMapView extends android.view.View {
|
2026-10-19 07:27:48 +08:00
|
|
|
JSONArray items;JSONObject focused;Paint p=new Paint(3);
|
2026-10-19 01:43:37 +08:00
|
|
|
LocationMapView(android.content.Context c){super(c);setContentDescription("地图占位,隔离验收不加载真实位置");}
|
2026-10-19 07:27:48 +08:00
|
|
|
void setItems(JSONArray a){items=a;invalidate();}void setTrack(JSONArray a){}void reset(){}void focus(JSONObject p){focused=p;}void resumeMap(){}void pauseMap(){setItems(new JSONArray());}void close(){}
|
2026-10-19 01:43:37 +08:00
|
|
|
protected void onDraw(Canvas c){c.drawColor(0xffe7eee5);float d=getResources().getDisplayMetrics().density;p.setColor(0xffc9d9ce);p.setStrokeWidth(2*d);for(int x=0;x<getWidth();x+=60*d)c.drawLine(x,0,x,getHeight(),p);for(int y=0;y<getHeight();y+=60*d)c.drawLine(0,y,getWidth(),y,p);p.setColor(PhoneStyle.MUTED);p.setTextSize(15*d);p.setTextAlign(Paint.Align.CENTER);c.drawText("智家地图 · 隔离验收占位",getWidth()/2f,getHeight()/2f,p);p.setTextSize(12*d);c.drawText("正式版加载已授权家人位置",getWidth()/2f,getHeight()/2f+25*d,p);}
|
|
|
|
|
}
|