Permalink
Browse files

PoiDetails

  • Loading branch information...
Simon Thibert
Simon Thibert committed May 11, 2012
1 parent fb9447f commit 43711cae3372d568c2e3cd81c668dcbf3702c0ae
Showing with 68 additions and 0 deletions.
  1. +68 −0 src/com/mobilecityguide/activity/PoiDetails.java
@@ -1,5 +1,7 @@
package com.mobilecityguide.activity;
import java.util.HashMap;
import com.mobilecityguide.MobileCityGuideActivity;
import com.mobilecityguide.R;
import com.mobilecityguide.controllers.POIController;
@@ -8,14 +10,18 @@
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -24,6 +30,8 @@
private boolean inItinerary;
private int step;
ImageView image;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -62,6 +70,66 @@ public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.poi_details);
((TextView) findViewById(R.id.description)).setText(desc);
((TextView) findViewById(R.id.address)).setText(poi.getAddress());
image = (ImageView) findViewById(R.id.imageView);
String path = ((poi.getImages("day")).split("\\."))[0];
if(path.equals("barb93"))
image.setImageResource(R.drawable.barb93);
else if(path.equals("barbe1"))
image.setImageResource(R.drawable.barbe1);
else if(path.equals("barbe2"))
image.setImageResource(R.drawable.barbe2);
else if(path.equals("barbe3"))
image.setImageResource(R.drawable.barbe3);
else if(path.equals("cinescope1"))
image.setImageResource(R.drawable.cinescope1);
else if(path.equals("cinescope2"))
image.setImageResource(R.drawable.cinescope2);
else if(path.equals("cinescope3"))
image.setImageResource(R.drawable.cinescope3);
else if(path.equals("creperie_bretone"))
image.setImageResource(R.drawable.creperie_bretone);
else if(path.equals("creperie_bretone2"))
image.setImageResource(R.drawable.creperie_bretone2);
else if(path.equals("esplanade"))
image.setImageResource(R.drawable.esplanade);
else if(path.equals("esplanade2"))
image.setImageResource(R.drawable.esplanade2);
else if(path.equals("gp1"))
image.setImageResource(R.drawable.gp1);
else if(path.equals("gp2"))
image.setImageResource(R.drawable.gp2);
else if(path.equals("gp3"))
image.setImageResource(R.drawable.gp3);
else if(path.equals("lac1"))
image.setImageResource(R.drawable.lac1);
else if(path.equals("lac2"))
image.setImageResource(R.drawable.lac2);
else if(path.equals("lac3"))
image.setImageResource(R.drawable.lac3);
else if(path.equals("sciences1"))
image.setImageResource(R.drawable.sciences1);
else if(path.equals("sciences2"))
image.setImageResource(R.drawable.sciences2);
else if(path.equals("sciences3"))
image.setImageResource(R.drawable.sciences3);
else if(path.equals("univ1"))
image.setImageResource(R.drawable.univ1);
else if(path.equals("univ2"))
image.setImageResource(R.drawable.univ2);
else if(path.equals("univ3"))
image.setImageResource(R.drawable.univ3);
else if(path.equals("wallons1"))
image.setImageResource(R.drawable.wallons1);
else if(path.equals("museeherge31"))
image.setImageResource(R.drawable.museeherge31);
else if(path.equals("museeherge5"))
image.setImageResource(R.drawable.museeherge5);
else if(path.equals("museelln1"))
image.setImageResource(R.drawable.museelln1);
else if(path.equals("museelln2"))
image.setImageResource(R.drawable.museelln2);
/* if we're coming from an itinerary, show a 'Next' button */
if (this.inItinerary) {

0 comments on commit 43711ca

Please sign in to comment.