From 4780fb36b0c6df26b656b5281022b24b78f2144a Mon Sep 17 00:00:00 2001 From: Kevin Ruland Date: Wed, 8 Feb 2012 02:22:45 +0000 Subject: [PATCH] Second checkpoint commit of OpenRocketLoader to make it orientation change safe. Changed Main.java to register onclick listeners in java instead of the layout. Store the WarningSet in Application so it doesn't need to be serialized if the OpenRocketLoaderActivity is recreated during an orientation change. Fix the MissingMotorDialogFragment to only have the string and not the whole WarningSet. Finally completely rewrote the OpenRocketLoaderTask into a Fragment managing its own dialog. --- android/res/layout-land/main.xml | 29 ++--- android/res/layout/main.xml | 4 +- .../sf/openrocket/android/Application.java | 10 ++ .../src/net/sf/openrocket/android/Main.java | 15 +++ .../rocket/MissingMotorDialogFragment.java | 49 ++++++-- .../rocket/OpenRocketLoaderActivity.java | 53 +++----- .../rocket/OpenRocketLoaderFragment.java | 117 ++++++++++++++++++ .../android/rocket/OpenRocketLoaderTask.java | 49 -------- 8 files changed, 215 insertions(+), 111 deletions(-) create mode 100644 android/src/net/sf/openrocket/android/rocket/OpenRocketLoaderFragment.java delete mode 100644 android/src/net/sf/openrocket/android/rocket/OpenRocketLoaderTask.java diff --git a/android/res/layout-land/main.xml b/android/res/layout-land/main.xml index 0d682a0bf..fc5280254 100644 --- a/android/res/layout-land/main.xml +++ b/android/res/layout-land/main.xml @@ -13,34 +13,31 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:orientation="vertical" > - + - + - -