Android Open Source - Android_OSM_offlinemap Copyright Map View






From Project

Back to project page Android_OSM_offlinemap.

License

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.

Java Source Code

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);
  }

}




Java Source Code List

com.vellut.offlinemap.CircleDrawable.java
com.vellut.offlinemap.ColorPickerAdapter.java
com.vellut.offlinemap.CopyrightMapView.java
com.vellut.offlinemap.CurrentPositionDrawable.java
com.vellut.offlinemap.CurrentPosition.java
com.vellut.offlinemap.FileExplorerActivity.java
com.vellut.offlinemap.MainActivity.java
com.vellut.offlinemap.MapAnnotationEditActivity.java
com.vellut.offlinemap.MapAnnotation.java
com.vellut.offlinemap.MapData.java
com.vellut.offlinemap.MarkerFactory.java
com.vellut.offlinemap.StarDrawable.java
com.vellut.offlinemap.Utils.java