Merged changes from Release-12.09-redo tag.
This commit is contained in:
parent
03c2fb45df
commit
e099a6264a
@ -72,7 +72,8 @@
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name=".android.thrustcurve.TCQueryActivity"
|
||||
android:theme="@style/Theme.Sherlock.Dialog" />
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@style/AppTheme.Dialog" />
|
||||
<activity
|
||||
android:name=".android.simulation.SimulationViewActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
BIN
android/res/drawable-hdpi/ic_menu_download.png
Normal file
BIN
android/res/drawable-hdpi/ic_menu_download.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 909 B |
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_download.png
Normal file
BIN
android/res/drawable-xhdpi/ic_menu_download.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
@ -4,7 +4,7 @@
|
||||
<item
|
||||
android:id="@+id/download_from_thrustcurve_menu_option"
|
||||
android:title="@string/Download"
|
||||
android:icon="@drawable/ic_menu_search"
|
||||
android:icon="@drawable/ic_menu_download"
|
||||
android:showAsAction="always"/>
|
||||
<item
|
||||
android:id="@+id/preference_menu_option"
|
||||
|
@ -38,7 +38,7 @@
|
||||
</string-array>
|
||||
|
||||
<string name="TCMotorSearchFormSubmit">Submit</string>
|
||||
<string name="TCMotorSearchFormTitle">Search Thrustcurve.org</string>
|
||||
<string name="TCMotorSearchFormTitle">Download from Thrustcurve.org</string>
|
||||
<string name="overviewConfigurationSpinnerPrompt">Select Configuration</string>
|
||||
<string name="simulationSeries1Label">Series 1</string>
|
||||
<string name="simulationSeries2Label">Series 2</string>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<style name="AppTheme.NoActionBar" parent="AppTheme">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
</style>
|
||||
|
||||
<style name="spinnerStyle" parent="Widget.Sherlock.TextView.SpinnerItem">
|
||||
<item name="android:textSize">26dp</item>
|
||||
@ -22,4 +22,12 @@
|
||||
<item name="android:layout_height">30dp</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogWindowTitleTwoLines" parent="DialogWindowTitle.Sherlock">
|
||||
<item name="android:maxLines">2</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Dialog" parent="Theme.Sherlock.Dialog">
|
||||
<item name="android:windowTitleStyle">@style/DialogWindowTitleTwoLines</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -3,8 +3,10 @@ package net.sf.openrocket.android.motor;
|
||||
import net.sf.openrocket.R;
|
||||
import net.sf.openrocket.android.ActivityHelpers;
|
||||
import net.sf.openrocket.android.PreferencesActivity;
|
||||
import net.sf.openrocket.android.db.DbAdapter;
|
||||
import net.sf.openrocket.android.util.AndroidLogWrapper;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
@ -39,6 +41,29 @@ implements MotorListFragment.OnMotorSelectedListener
|
||||
.add( R.id.motorBrowserList, new MotorListFragment(), MOTOR_LIST_FRAGMENT)
|
||||
.commit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
int motorCount = 0;
|
||||
|
||||
DbAdapter mDbHelper = new DbAdapter(this);
|
||||
mDbHelper.open();
|
||||
try {
|
||||
Cursor motorCounter = mDbHelper.getMotorDao().fetchAllMotors();
|
||||
motorCount = motorCounter.getCount();
|
||||
motorCounter.close();
|
||||
} finally {
|
||||
mDbHelper.close();
|
||||
}
|
||||
|
||||
if ( motorCount == 0 ) {
|
||||
ActivityHelpers.downloadFromThrustcurve(this,DOWNLOAD_REQUEST_CODE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -237,18 +237,6 @@ implements SharedPreferences.OnSharedPreferenceChangeListener
|
||||
}
|
||||
mDbHelper.open();
|
||||
|
||||
Cursor motorCounter = mDbHelper.getMotorDao().fetchAllMotors();
|
||||
int motorCount = motorCounter.getCount();
|
||||
motorCounter.close();
|
||||
|
||||
if ( motorCount == 0 ) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setTitle("No Motors Found");
|
||||
builder.setMessage("Motors can be downloaded from thrustcurve");
|
||||
builder.setCancelable(true);
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
Cursor motorCursor = mDbHelper.getMotorDao().fetchGroups(groupColumn);
|
||||
MotorHierarchicalListAdapter mAdapter = new MotorHierarchicalListAdapter(
|
||||
getActivity(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user