Changeset 14521


Ignore:
Timestamp:
04/08/13 23:03:53 (12 years ago)
Author:
ltnguyen
Message:

REMOVE: User stay on splashscreen problem, remove custom back button and add functional to android default back button

Location:
issm/trunk-jpl/src/mobile/android/ISSM_APP
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/AndroidManifest.xml

    r14516 r14521  
    1414        <activity android:name="gov.nasa.jpl.issm.ISSMAPP"
    1515                  android:screenOrientation="portrait"
    16                   android:label="@string/title_activity_issm" >
     16                  android:label="@string/title_activity_issm"
     17                  android:noHistory="true" >
    1718            <intent-filter>
    1819                <action android:name="android.intent.action.MAIN" />
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/bin/AndroidManifest.xml

    r14516 r14521  
    1414        <activity android:name="gov.nasa.jpl.issm.ISSMAPP"
    1515                  android:screenOrientation="portrait"
    16                   android:label="@string/title_activity_issm" >
     16                  android:label="@string/title_activity_issm"
     17                  android:noHistory="true" >
    1718            <intent-filter>
    1819                <action android:name="android.intent.action.MAIN" />
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/res/layout/issmcore.xml

    r14504 r14521  
    2020        android:layout_height="wrap_content"
    2121        android:layout_above="@+id/play"
    22         android:layout_below="@+id/back"
     22        android:layout_below="@+id/spinner"
    2323        android:layout_marginBottom="12dp" >
    2424    </FrameLayout>
     
    3333        android:layout_marginBottom="18dp"
    3434        android:background="@drawable/custom_button"
    35         android:text="Solve" /> -->
     35        android:text="Solve" />
    3636
    3737    <Button
     
    4141        android:layout_alignParentLeft="true"
    4242        android:layout_alignParentTop="true"
    43         android:background="@drawable/back_button"/>
     43        android:background="@drawable/back_button"/> -->
    4444   
    4545    <Spinner
  • issm/trunk-jpl/src/mobile/android/ISSM_APP/src/gov/nasa/jpl/issm/ISSM.java

    r14516 r14521  
    1111import android.util.DisplayMetrics;
    1212import android.view.Gravity;
     13import android.view.KeyEvent;
    1314import android.view.Menu;
    1415import android.view.MenuInflater;
     
    5253        private ImageView defaultMap;
    5354        private Spinner spinner;
     55        private boolean onSimulationScreen = false;
    5456        //------------------------------------------------------------------------------------------------   
    5557    @Override
     
    7779        //Button solve = (Button) super.findViewById(R.id.solve);
    7880        //solve.setOnClickListener(this);
    79         Button back = (Button) super.findViewById(R.id.back);
    80         back.setOnClickListener(this);
     81        //Button back = (Button) super.findViewById(R.id.back);
     82        //back.setOnClickListener(this);
    8183        Button play = (Button) super.findViewById(R.id.play);
    8284        play.setOnClickListener(this);
     
    145147        return true;
    146148    }
     149//---------------------------------------------------------------------------------
     150    @Override
     151    public boolean onKeyDown(int keyCode, KeyEvent event)  {
     152        if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0 && onSimulationScreen) {
     153                 frame.removeView(mGLView);
     154                         viewflipper.setInAnimation(inFromLeftAnimation());
     155                 viewflipper.setOutAnimation(outToRightAnimation());
     156                 viewflipper.showPrevious();
     157                 onSimulationScreen = false;
     158            return true;
     159        }
     160        // return to menu screen
     161        finish();
     162        return super.onKeyDown(keyCode, event);
     163    }
    147164//---------------------------------------------------------------------------------   
    148165    public void onClick(View view)
     
    157174                        viewflipper.showNext();
    158175                        defaultMap.setVisibility(View.VISIBLE);
     176                        onSimulationScreen = true;
    159177                        //create FemModel in native code and return the size of the model
    160178                        this.createModel();
     
    168186                        viewflipper.showNext();
    169187                        defaultMap.setVisibility(View.VISIBLE);
     188                        onSimulationScreen = true;
    170189                        //create FemModel in native code and return the size of the model
    171190                        this.createModel();
    172191                        break;
    173192                        }
    174                 case R.id.back:
     193                /*case R.id.back:
    175194                {
    176195                         frame.removeView(mGLView);
     
    179198                         viewflipper.showPrevious();
    180199                         break;
    181                 }
     200                }*/
    182201                /*case R.id.solve:
    183202                {
Note: See TracChangeset for help on using the changeset viewer.