Changeset 14547


Ignore:
Timestamp:
04/11/13 17:04:59 (12 years ago)
Author:
cnpetrie
Message:

updated team page to load issm/about/ web page in webview inside issm app. updated about page to load a local html about page in new webview. updated app to prompt for confirm on exit using back button.

Location:
issm/trunk-jpl/src/mobile/android
Files:
6 added
6 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/VideoActivity.java

    r14527 r14547  
    1111public class VideoActivity extends Activity {
    1212
    13         String SrcPath = "rtsp://v5.cache1.c.youtube.com/CjYLENy73wIaLQnNSFpiQoeuyBMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYI-SyfPGoqqyUQw=/0/0/0/video.3gp";
     13        String SrcPath = "rtsp://v8.cache8.c.youtube.com/CjYLENy73wIaLQkL_ysv0M5QKhMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYI-SyfPGoqqyUQw=/0/0/0/video.3gp";
    1414       
    1515           /** Called when the activity is first created. */
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/AndroidManifest.xml

    r14528 r14547  
    3232            android:name="gov.nasa.jpl.issm.VideoActivity"
    3333            android:screenOrientation="portrait"
     34            android:label="@string/title_video_issm" >
     35        </activity>
     36        <activity
     37            android:name="gov.nasa.jpl.issm.AboutActivity"
     38            android:screenOrientation="portrait"
     39            android:label="@string/title_activity_issm" >
     40        </activity>
     41         <activity
     42            android:name="gov.nasa.jpl.issm.TeamActivity"
     43            android:screenOrientation="portrait"
    3444            android:label="@string/title_activity_issm" >
    3545        </activity>
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/bin/AndroidManifest.xml

    r14528 r14547  
    3232            android:name="gov.nasa.jpl.issm.VideoActivity"
    3333            android:screenOrientation="portrait"
     34            android:label="@string/title_video_issm" >
     35        </activity>
     36        <activity
     37            android:name="gov.nasa.jpl.issm.AboutActivity"
     38            android:screenOrientation="portrait"
     39            android:label="@string/title_activity_issm" >
     40        </activity>
     41         <activity
     42            android:name="gov.nasa.jpl.issm.TeamActivity"
     43            android:screenOrientation="portrait"
    3444            android:label="@string/title_activity_issm" >
    3545        </activity>
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/project.properties

    r14537 r14547  
    1212
    1313# Project target.
    14 target=android-16
     14target=android-15
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/res/values/strings.xml

    r14472 r14547  
    44    <string name="hello_world">Hello world!</string>
    55    <string name="menu_settings">Settings</string>
     6    <string name="title_video_issm">ISSM Sample Video</string>
     7    <string name="about">ISSM is the result of a collaboration between the Jet Propulsion Laboratory and University of California at Irvine. Its purpose is to tackle the challenge of modeling the evolution of the polar ice caps in Greenland and Antarctica. \n\tISSM is funded by the NASA Cryosphere and MAP (Modeling Analysis and Prediction) programs, JPL R&amp;TD(Research, Technology and Development) and the National Science Foundation. Our main collaborators are:MSSMat Laboratory of École Centrale Paris, Argonne National Laboratory and the Department of Geology of University of Buffalo, NY.\n\tAs synthesized in the last Intergovernmental Panel on Climate Change (IPCC) Assessment Report AR4,future changes in the Greenland and Antarctic ice sheet mass, particularly due to changes in ice flow,are a major source of uncertainty that could increase sea level rise projections.\n\tTo remedy this problem, large scale ice flow models are necessary that can accurately model the evolution of Greenland and Antarctica in a warming climate. In order to achieve this goal,and improve projections of future sea level rise, ISSM relies on state of the art technologies,developed in synergy with the Research and Technology Development (R&amp;TD) at JPL.</string>
    68    <string name="title_activity_issm">ISSM</string>
    79    <string name="color_prompt">Pick a Color Map</string>
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/src/gov/nasa/jpl/issm/MenuPage.java

    r14528 r14547  
    22
    33import android.app.Activity;
     4import android.app.AlertDialog;
    45import android.net.Uri;
    56import android.os.Bundle;
     
    910import android.widget.Button;
    1011import android.widget.PopupWindow;
     12import android.content.DialogInterface;
    1113import android.content.Intent;
     14import android.widget.TabHost;
     15import android.widget.TextView;
     16import android.widget.TabHost.TabContentFactory;
     17import android.widget.TabHost.TabSpec;
    1218///////////////////////////////////////////////////////////////////////////
    1319public class MenuPage extends Activity
     
    5864                        public void onClick(View v)
    5965                        {
    60                                 LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE); 
    61                                 View popupView = layoutInflater.inflate(R.layout.popuptext, null); 
    62                                 final PopupWindow popupWindow = new PopupWindow( popupView, 400,600, true);
    63                                 popupWindow.showAtLocation(popupView, Gravity.CENTER, 0, 0);
    64                                 Button dismiss = (Button)popupView.findViewById(R.id.dismiss);
    65                     dismiss.setOnClickListener(new Button.OnClickListener()
    66                     {
    67                         public void onClick(View v)
    68                         {
    69                                 popupWindow.dismiss();
    70                         }
    71                     });
     66                                //LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE); 
     67                                //View popupView = layoutInflater.inflate(R.layout.popuptext, null); 
     68                                //final PopupWindow popupWindow = new PopupWindow( popupView, 400,600, true);
     69                                //popupWindow.showAtLocation(popupView, Gravity.CENTER, 0, 0);
     70                                //Button dismiss = (Button)popupView.findViewById(R.id.dismiss);
     71                    //dismiss.setOnClickListener(new Button.OnClickListener()
     72                    //{
     73                        //public void onClick(View v)
     74                    //  {
     75                                //popupWindow.dismiss();
     76                        //}
     77                    //});
     78                                Intent i = new Intent(MenuPage.this, AboutActivity.class);
     79                        startActivity(i);
    7280                        }
    7381                });
    74                 //navigate to website
     82                //Show Team Website
    7583                Button visitus = (Button) findViewById(R.id.visitus);           
    7684                visitus.setOnClickListener(new View.OnClickListener()
     
    7886                        public void onClick(View v)
    7987                        {
    80                                 String url = "http://issm.jpl.nasa.gov/";
    81                                 Intent i = new Intent(Intent.ACTION_VIEW);
    82                                 i.setData(Uri.parse(url));
     88                                //String url = "http://issm.jpl.nasa.gov/";
     89                                //Intent i = new Intent(Intent.ACTION_VIEW);
     90                                //i.setData(Uri.parse(url));
     91                        //startActivity(i);
     92                               
     93                                Intent i = new Intent(MenuPage.this, TeamActivity.class);
    8394                        startActivity(i);
    8495                        }
     
    95106                });
    96107        }
    97 //-------------------------------------------------------------------------------------
     108//-------------------------------------------------------------------------------------
     109       
     110         @Override
     111     public void onBackPressed() {
     112         new AlertDialog.Builder(this)
     113                .setMessage("Are you sure you want to exit?")
     114                .setCancelable(false)
     115                .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
     116                    public void onClick(DialogInterface dialog, int id) {
     117                        MenuPage.this.finish();
     118                    }
     119                })
     120                .setNegativeButton("No", null)
     121                .show();
     122     }
    98123}
    99124/////////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.