From: kruland2607 Date: Tue, 3 Jan 2012 18:58:10 +0000 (+0000) Subject: Added progress dialog when loading a file. Removed some default text from the view... X-Git-Tag: upstream/12.03~1^2~203 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a6b62a972714fb4cf63f18ed339394862a5dd712;p=debian%2Fopenrocket Added progress dialog when loading a file. Removed some default text from the view. Added safety net to launch the file browser when no file is specified. This last piece of functionality might be replaced with a dialog and better error handling in the future. git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@267 180e2498-e6e9-4542-8430-84ac67f01cd8 --- diff --git a/android/res/layout/openrocketviewer.xml b/android/res/layout/openrocketviewer.xml index 1f024e0b..12634b90 100644 --- a/android/res/layout/openrocketviewer.xml +++ b/android/res/layout/openrocketviewer.xml @@ -8,7 +8,7 @@ android:id="@+id/heading" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:text="Started" /> + android:text="" /> sims = new ArrayAdapter(this,android.R.layout.simple_list_item_1,rocket.getSimulations()) { @Override @@ -104,16 +147,20 @@ public class OpenRocketViewer extends Activity { i.putExtra("Simulation",(int)id); startActivityForResult(i, 1/*magic*/); } - + }); simulationList.setAdapter(sims); + if ( progress.isShowing() ) { + progress.dismiss(); + } + } - + @Override public boolean onCreateOptionsMenu(Menu menu) { - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.rocket_viewer_option_menu, menu); + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.rocket_viewer_option_menu, menu); return true; } @@ -134,9 +181,9 @@ public class OpenRocketViewer extends Activity { public void startMotorBrowser() { Log.d(TAG,"motorBrowserButton clicked"); - Intent i = new Intent(OpenRocketViewer.this, MotorHierarchicalBrowser.class); - startActivity(i); - } + Intent i = new Intent(OpenRocketViewer.this, MotorHierarchicalBrowser.class); + startActivity(i); + }