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 'org.apache.commons:commons-lang3:3.4'
|
||||||
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.1'
|
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.1'
|
||||||
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
|
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'
|
compile 'com.android.support:appcompat-v7:25.0.0'
|
||||||
|
|
||||||
|
@ -1,27 +1,35 @@
|
|||||||
package com.dougkeen.bart.activities;
|
package com.dougkeen.bart.activities;
|
||||||
|
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
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.support.v7.app.AppCompatActivity;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.webkit.WebView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import com.dougkeen.bart.R;
|
import com.dougkeen.bart.R;
|
||||||
|
|
||||||
|
import uk.co.senab.photoview.PhotoView;
|
||||||
|
import uk.co.senab.photoview.PhotoViewAttacher;
|
||||||
|
|
||||||
public class ViewMapActivity extends AppCompatActivity {
|
public class ViewMapActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
WebView webview = new WebView(this);
|
PhotoView photoView = new PhotoView(this);
|
||||||
setContentView(webview);
|
|
||||||
|
|
||||||
webview.getSettings().setBuiltInZoomControls(true);
|
setContentView(photoView);
|
||||||
webview.getSettings().setSupportZoom(true);
|
|
||||||
|
|
||||||
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().setHomeButtonEnabled(true);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(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 {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user