/**
 * Copyright (C) 2009 - 2013 SC 4ViewSoft SRL
 *  
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.achartengine;

import org.achartengine.chart.AbstractChart;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;

/**
 * An activity that encapsulates a graphical view of the chart.
 */
public class GraphicalActivity extends Activity {
  /** The encapsulated graphical view. */
  private GraphicalView mView;
  /** The chart to be drawn. */
  private AbstractChart mChart;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle extras = getIntent().getExtras();
    mChart = (AbstractChart) extras.getSerializable(ChartFactory.CHART);
    mView = new GraphicalView(this, mChart);
    String title = extras.getString(ChartFactory.TITLE);
    if (title == null) {
      requestWindowFeature(Window.FEATURE_NO_TITLE);
    } else if (title.length() > 0) {
      setTitle(title);
    }
    setContentView(mView);
  }

}
@@ -44,25 +44,28 @@
 oft SRL%0D%0A * 
- 
+%3Cp/%3E
 %0D%0A * License
@@ -242,18 +242,16 @@
 %0A * 
- %0D%0A *     
+%3Cp/%3E%0D%0A *
  htt
@@ -294,17 +294,20 @@
 2.0%0D%0A * 
- 
+%3Cp/%3E
 %0D%0A * Unl
@@ -671,47 +671,30 @@
 ort 
-org.achartengine.chart.AbstractChart;%0D%0A
+android.app.ActionBar;
 %0D%0Aim
@@ -721,16 +721,42 @@
 ivity;%0D%0A
+import android.os.Build;%0D%0A
 import a
@@ -794,22 +794,101 @@
 id.view.
-Window
+MenuItem;%0D%0Aimport android.view.Window;%0D%0A%0D%0Aimport org.achartengine.chart.AbstractChart
 ;%0D%0A%0D%0A/**
@@ -1008,26 +1008,36 @@
 tivity %7B%0D%0A  
-/*
+  /**%0D%0A     
 * The encaps
@@ -1058,21 +1058,29 @@
 al view.
+%0D%0A    
  */%0D%0A
+  
   privat
@@ -1103,21 +1103,31 @@
 mView;%0D%0A
+  
   /**
+%0D%0A     *
  The cha
@@ -1141,23 +1141,31 @@
 e drawn.
+%0D%0A    
  */%0D%0A  
+ 
+ 
 private 
@@ -1189,16 +1189,18 @@
 art;%0D%0A%0D%0A
+  
   @Overr
@@ -1204,16 +1204,18 @@
 erride%0D%0A
+  
   protec
@@ -1266,16 +1266,20 @@
  %7B%0D%0A    
+ 
+   
 super.on
@@ -1311,16 +1311,20 @@
 );%0D%0A    
+  
+  
 Bundle e
@@ -1353,24 +1353,28 @@
 tExtras();%0D%0A
+    
     mChart =
@@ -1431,24 +1431,28 @@
 ry.CHART);%0D%0A
+    
     mView = 
@@ -1489,16 +1489,20 @@
 );%0D%0A    
+  
+  
 String t
@@ -1543,24 +1543,28 @@
 ry.TITLE);%0D%0A
+    
     if (titl
@@ -1583,16 +1583,22 @@
 %0D%0A      
+     
+ 
 requestW
@@ -1633,24 +1633,28 @@
 NO_TITLE);%0D%0A
+    
     %7D else i
@@ -1675,24 +1675,30 @@
 h() %3E 0) %7B%0D%0A
+      
       setTit
@@ -1713,19 +1713,27 @@
 );%0D%0A    
-%7D%0D%0A
+    %7D%0D%0A    
     setC
@@ -1752,16 +1752,654 @@
 View);%0D%0A
+%0D%0A        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.HONEYCOMB) %7B%0D%0A            ActionBar actionBar = this.getActionBar();%0D%0A            actionBar.setDisplayShowHomeEnabled(true);%0D%0A            actionBar.setDisplayHomeAsUpEnabled(true);%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0D%0A        switch (item.getItemId()) %7B%0D%0A            case android.R.id.home:%0D%0A                System.out.println(%22%5Bjls%5D this was unexpected%22);%0D%0A                this.onBackPressed();%0D%0A                return true;%0D%0A            default:%0D%0A                return super.onOptionsItemSelected(item);%0D%0A        %7D%0D%0A  
   %7D%0D%0A%0D%0A%7D

Enable back icon & action on full-screen graphs