1 |
package com.caddi.android.caddipictureupload; |
2 |
|
3 |
import android.content.Intent; |
4 |
import android.graphics.Bitmap; |
5 |
import android.graphics.BitmapFactory; |
6 |
import android.support.v7.app.ActionBarActivity; |
7 |
import android.os.Bundle; |
8 |
import android.util.Log; |
9 |
import android.view.Menu; |
10 |
import android.view.MenuItem; |
11 |
import android.widget.ImageView; |
12 |
|
13 |
|
14 |
public class PictureView extends ActionBarActivity { |
15 |
|
16 |
ZoomableImageView imageView; |
17 |
|
18 |
@Override |
19 |
protected void onCreate(Bundle savedInstanceState) { |
20 |
super.onCreate(savedInstanceState); |
21 |
setContentView(R.layout.activity_picture_view); |
22 |
|
23 |
imageView = (ZoomableImageView) findViewById( R.id.imageViewDetail ); |
24 |
imageView.setImageBitmap( PictureSingleton.getInstance().getPicture() ); |
25 |
} |
26 |
|
27 |
@Override |
28 |
public boolean onCreateOptionsMenu(Menu menu) { |
29 |
// Inflate the menu; this adds items to the action bar if it is present. |
30 |
getMenuInflater().inflate(R.menu.menu_picture_view, menu); |
31 |
return true; |
32 |
} |
33 |
|
34 |
@Override |
35 |
public boolean onOptionsItemSelected(MenuItem item) { |
36 |
// Handle action bar item clicks here. The action bar will |
37 |
// automatically handle clicks on the Home/Up button, so long |
38 |
// as you specify a parent activity in AndroidManifest.xml. |
39 |
int id = item.getItemId(); |
40 |
|
41 |
//noinspection SimplifiableIfStatement |
42 |
if (id == R.id.action_settings) { |
43 |
return true; |
44 |
} |
45 |
|
46 |
return super.onOptionsItemSelected(item); |
47 |
} |
48 |
} |