WEB开发网
开发学院手机开发Android 开发 Android系列只androidGooglemap小应用 阅读

Android系列只androidGooglemap小应用

 2010-08-19 14:32:00 来源:WEB开发网   
核心提示:screenCoords);121 122 if (shadow) {123 // Only offset the shadow in the y-axis as the shadow is angled so the base is at x=0;124 canvas.drawBitmap(shadowIcon, s
screenCoords);121 122 if (shadow) {123 // Only offset the shadow in the y-axis as the shadow is angled so the base is at x=0;124 canvas.drawBitmap(shadowIcon, screenCoords.x, screenCoords.y - shadowIcon.getHeight(),null);125 } else {126 switch(Integer.valueOf(location.getLocation_ring())){127 case VOLUME:128 canvas.drawBitmap(bubbleVolume, screenCoords.x - bubbleVolume.getWidth()/2, screenCoords.y - bubbleVolume.getHeight(),null);129 break;130 case VIBRATE:131 canvas.drawBitmap(bubbleVibrate, screenCoords.x - bubbleVibrate.getWidth()/2, screenCoords.y - bubbleVibrate.getHeight(),null);132 break;133 case VOLUMEOFF:134 canvas.drawBitmap(bubbleVolumeOff, screenCoords.x - bubbleVolumeOff.getWidth()/2, screenCoords.y - bubbleVolumeOff.getHeight(),null);135 break;136 case VOLUMEVIBRATE:137 canvas.drawBitmap(bubbleVolumeeVibrate, screenCoords.x - bubbleVolumeeVibrate.getWidth()/2, screenCoords.y - bubbleVolumeeVibrate.getHeight(),null);138 break;139 default:140 canvas.drawBitmap(bubbleIcon, screenCoords.x - bubbleIcon.getWidth()/2, screenCoords.y - bubbleIcon.getHeight(),null);141 break;142 }143 }144 }145 }146 }147 148 149 public Paint getInnerPaint() {150 if ( innerPaint == null) {151 innerPaint = new Paint();152 innerPaint.setARGB(225, 75, 75, 75); //gray153 innerPaint.setAntiAlias(true);154 }155 return innerPaint;156 }157 158 public Paint getBorderPaint() {159 if ( borderPaint == null) {160 borderPaint = new Paint();161 borderPaint.setARGB(255, 255, 255, 255);162 borderPaint.setAntiAlias(true);163 borderPaint.setStyle(Style.STROKE);164 borderPaint.setStrokeWidth(2);165 }166 return borderPaint;167 }168 169 public Paint getTextPaint() {170 if ( textPaint == null) {171 textPaint = new Paint();172 textPaint.setARGB(255, 255, 255, 255);173 textPaint.setAntiAlias(true);174 }175 return textPaint;176 }

注:这里可能有些函数是无用的,因为这个类还实现在Mapview上出现infowindow的效果。不过这里为了简化起见我就删了。

上一页  6 7 8 9 10 11 12  下一页

Tags:Android 系列 androidGooglemap

编辑录入:coldstar [复制链接] [打 印]
赞助商链接