diff --git a/contrib/mobile/Android/src/org/geuz/onelab/Gmsh.java b/contrib/mobile/Android/src/org/geuz/onelab/Gmsh.java index 00d4d8e66d6150ef1fb11a6380110279a0c9cf63..2e1e04fda184c4e6ad5b01433b9055489bfec9ae 100644 --- a/contrib/mobile/Android/src/org/geuz/onelab/Gmsh.java +++ b/contrib/mobile/Android/src/org/geuz/onelab/Gmsh.java @@ -30,7 +30,7 @@ public class Gmsh implements Parcelable { public native String[] getPView(); // get a list of PViews public native void setPView(int position, int intervalsType,int visible,int nbIso, float raisez); // Change options for a PView public native int onelabCB(String action); // Call onelab - + public native void animationNext(); public native void animationPrev(); diff --git a/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java b/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java index 6203d2aaaf226b77a7c38b4fde6d16029040a86d..2a3a8f85b51200ad538d5deb6f1b844dc327d8f6 100644 --- a/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java +++ b/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java @@ -264,7 +264,7 @@ public class MainActivity extends Activity{ notifyEndComputing("The computing had to stop because your device ran out of memory"); _notify = false; } - else if(level == Activity.TRIM_MEMORY_COMPLETE) { + else if(level == Activity.TRIM_MEMORY_MODERATE) { notifyComputing("Computing in progress - low memory", true); } super.onTrimMemory(level); diff --git a/contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java b/contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java index 38d91dd4b6c2ed92dc11adee4a2518725ba64d51..bb4e2c7fd37015bd36a82ea3c0aa680ea1e60ac7 100644 --- a/contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java +++ b/contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java @@ -136,7 +136,7 @@ public class ModelFragment extends Fragment{ ((ImageButton)v).setImageResource(android.R.drawable.ic_media_play); _animation.cancel(); prevButton.setEnabled(true); - nextButton.setEnabled(true); + nextButton.setEnabled(true); } } }); @@ -171,7 +171,7 @@ public class ModelFragment extends Fragment{ public void showControlBar() { if(getActivity() == null) return; this.postDelay(); - getActivity().getActionBar().show(); + //getActivity().getActionBar().show(); Animation bottomUp = AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in); _controlBarLayout.setVisibility(View.VISIBLE); _controlBarLayout.startAnimation(bottomUp); @@ -179,7 +179,7 @@ public class ModelFragment extends Fragment{ public void hideControlBar() { if(getActivity() == null) return; _hideDelay.removeCallbacks(hideControlsRunnable); - getActivity().getActionBar().hide(); + //getActivity().getActionBar().hide(); Animation bottomDown = AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_out); _controlBarLayout.startAnimation(bottomDown); _controlBarLayout.setVisibility(View.INVISIBLE); diff --git a/contrib/mobile/Android/src/org/geuz/onelab/ModelList.java b/contrib/mobile/Android/src/org/geuz/onelab/ModelList.java index 4ebcf151997d50e03671f262ea9b128accfe7b74..e5b10f527fb69de5ed715cd4be51c7077905ff99 100644 --- a/contrib/mobile/Android/src/org/geuz/onelab/ModelList.java +++ b/contrib/mobile/Android/src/org/geuz/onelab/ModelList.java @@ -10,6 +10,7 @@ import org.xmlpull.v1.XmlPullParserException; import android.app.Activity; import android.app.AlertDialog; +import android.content.ActivityNotFoundException; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; @@ -24,6 +25,7 @@ import android.view.View; import android.widget.AdapterView; import android.widget.LinearLayout; import android.widget.ListView; +import android.widget.Toast; public class ModelList extends Activity { @@ -113,7 +115,12 @@ public class ModelList extends Activity { Intent fileBrowserIntent = new Intent(); fileBrowserIntent.setAction(Intent.ACTION_GET_CONTENT); fileBrowserIntent.setType("file/*"); - startActivityForResult(fileBrowserIntent, 1); + try { + startActivityForResult(fileBrowserIntent, 1); + } + catch(ActivityNotFoundException e) { + Toast.makeText(this, "No application found on your device to open the files.", Toast.LENGTH_LONG).show(); + } } return super.onMenuItemSelected(featureId, item); } diff --git a/contrib/mobile/Android/src/org/geuz/onelab/OptionsDisplayFragment.java b/contrib/mobile/Android/src/org/geuz/onelab/OptionsDisplayFragment.java index fe8d78e63dd32ec24b0efe28ee0863a612d4adf4..707bbf50a06907929e59d9a4b7f2518022a619a7 100644 --- a/contrib/mobile/Android/src/org/geuz/onelab/OptionsDisplayFragment.java +++ b/contrib/mobile/Android/src/org/geuz/onelab/OptionsDisplayFragment.java @@ -131,7 +131,7 @@ public class OptionsDisplayFragment extends Fragment{ if(mListener != null) mListener.OnModelOptionsChanged(); } }); - button.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + button.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); button.setBackgroundColor(Color.TRANSPARENT); button.setGravity(Gravity.RIGHT); layout.addView(checkbox);