Update map
This commit is contained in:
parent
756545d491
commit
3c7429218a
@ -7,7 +7,8 @@ dependencies {
|
||||
compile 'org.apache.commons:commons-lang3:3.4'
|
||||
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.1'
|
||||
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
|
||||
compile 'com.squareup.okhttp:okhttp:2.5.0'
|
||||
compile 'com.squareup.okhttp:okhttp:2.7.5'
|
||||
compile 'com.github.chrisbanes:PhotoView:1.3.1'
|
||||
|
||||
compile 'com.android.support:appcompat-v7:25.0.0'
|
||||
|
||||
|
@ -1,27 +1,35 @@
|
||||
package com.dougkeen.bart.activities;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.graphics.drawable.VectorDrawableCompat;
|
||||
import android.support.v4.content.res.ResourcesCompat;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.dougkeen.bart.R;
|
||||
|
||||
import uk.co.senab.photoview.PhotoView;
|
||||
import uk.co.senab.photoview.PhotoViewAttacher;
|
||||
|
||||
public class ViewMapActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
WebView webview = new WebView(this);
|
||||
setContentView(webview);
|
||||
PhotoView photoView = new PhotoView(this);
|
||||
|
||||
webview.getSettings().setBuiltInZoomControls(true);
|
||||
webview.getSettings().setSupportZoom(true);
|
||||
setContentView(photoView);
|
||||
|
||||
webview.loadUrl("file:///android_res/drawable/map.png");
|
||||
Drawable map = ResourcesCompat.getDrawable(getResources(), R.drawable.map, null);
|
||||
photoView.setImageDrawable(map);
|
||||
|
||||
PhotoViewAttacher attacher = new PhotoViewAttacher(photoView);
|
||||
attacher.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
BIN
app/src/main/res/drawable/map.png
Normal file → Executable file
BIN
app/src/main/res/drawable/map.png
Normal file → Executable file
Binary file not shown.
Before Width: | Height: | Size: 697 KiB After Width: | Height: | Size: 969 KiB |
@ -13,5 +13,6 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user