Refactor. Rename SimulationSeriesDialog to SimulationPlotConfigDialog. Change names of layouts accordingly.
This commit is contained in:
parent
c5122ebef5
commit
bb64a32d34
@ -4,15 +4,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<!-- shim to get dialog correct size ?? -->
|
||||
<!--
|
||||
<View
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="0px"
|
||||
android:layout_margin="0px"
|
||||
android:orientation="horizontal" />
|
||||
-->
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -46,6 +37,6 @@
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="ok" />
|
||||
android:text="@string/plot" />
|
||||
|
||||
</LinearLayout>
|
@ -13,6 +13,7 @@
|
||||
<string name="select_series">Change Plot</string>
|
||||
<string name="view_events">View Events</string>
|
||||
<string name="simulationPlotDialogTitle">Select Series And Events</string>
|
||||
<string name="plot">Plot</string>
|
||||
|
||||
<string-array name="PreferenceMotorBrowserGroupingEntries">
|
||||
<item>Case</item>
|
||||
|
@ -25,7 +25,7 @@ import android.widget.ListView;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class SimulationSeriesDialog extends DialogFragment {
|
||||
public class SimulationPlotConfigDialog extends DialogFragment {
|
||||
|
||||
public interface OnConfirmListener {
|
||||
public void onConfirm();
|
||||
@ -38,8 +38,8 @@ public class SimulationSeriesDialog extends DialogFragment {
|
||||
private SimulationChart chart;
|
||||
private OnConfirmListener listener;
|
||||
|
||||
public static SimulationSeriesDialog newInstance( SimulationChart chart ) {
|
||||
SimulationSeriesDialog d = new SimulationSeriesDialog();
|
||||
public static SimulationPlotConfigDialog newInstance( SimulationChart chart ) {
|
||||
SimulationPlotConfigDialog d = new SimulationPlotConfigDialog();
|
||||
d.chart = chart;
|
||||
return d;
|
||||
}
|
||||
@ -58,7 +58,7 @@ public class SimulationSeriesDialog extends DialogFragment {
|
||||
builder.setTitle(R.string.simulationPlotDialogTitle);
|
||||
|
||||
final LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||
View v = inflater.inflate(R.layout.simulation_series_dialog, null);
|
||||
View v = inflater.inflate(R.layout.simulation_plot_config_dialog, null);
|
||||
builder.setView(v);
|
||||
|
||||
OpenRocketDocument rocketDocument = CurrentRocketHolder.getCurrentRocket().getRocketDocument();
|
||||
@ -87,7 +87,7 @@ public class SimulationSeriesDialog extends DialogFragment {
|
||||
if ( listener != null ) {
|
||||
listener.onConfirm();
|
||||
}
|
||||
SimulationSeriesDialog.this.dismiss();
|
||||
SimulationPlotConfigDialog.this.dismiss();
|
||||
}
|
||||
|
||||
});
|
@ -21,7 +21,7 @@ import com.actionbarsherlock.view.MenuItem;
|
||||
/**
|
||||
* An activity that encapsulates a graphical view of the chart.
|
||||
*/
|
||||
public class SimulationViewFragment extends SherlockFragment implements SimulationSeriesDialog.OnConfirmListener {
|
||||
public class SimulationViewFragment extends SherlockFragment implements SimulationPlotConfigDialog.OnConfirmListener {
|
||||
|
||||
SimulationChart chart;
|
||||
|
||||
@ -63,7 +63,7 @@ public class SimulationViewFragment extends SherlockFragment implements Simulati
|
||||
switch (item.getItemId())
|
||||
{
|
||||
case R.id.simulation_select_series_menu_option:
|
||||
SimulationSeriesDialog seriesDialog = SimulationSeriesDialog.newInstance(chart);
|
||||
SimulationPlotConfigDialog seriesDialog = SimulationPlotConfigDialog.newInstance(chart);
|
||||
seriesDialog.show(getFragmentManager(), "AbraCadaver");
|
||||
seriesDialog.setOnConfirmListener(this);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user