Back to project page Android_OSM_offlinemap.
The source code is released under:
GNU General Public License
If you think the Android project Android_OSM_offlinemap listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.vellut.offlinemap; //w w w .j a v a 2 s . c o m import org.mapsforge.android.maps.MapView; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Typeface; import android.util.TypedValue; import com.vellut.offlinemap.kansai.R; public class CopyrightMapView extends MapView { private Paint copyrightPaint; public CopyrightMapView(Context context) { super(context); setupCopyrightText(); } private void setupCopyrightText() { this.copyrightPaint = new Paint(Paint.ANTI_ALIAS_FLAG); this.copyrightPaint.setTypeface(Typeface.DEFAULT); int size = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 12, getResources().getDisplayMetrics()); this.copyrightPaint.setTextSize(size); this.copyrightPaint.setColor(Color.BLACK); this.copyrightPaint.setAlpha(128); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawText( getResources().getString(R.string.osm_copyright), 5, getHeight() - 5, this.copyrightPaint); } }