Icons for plotter
@ -12,7 +12,6 @@ import android.support.v7.app.AlertDialog;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -20,19 +19,13 @@ import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.solovyev.android.calculator.App;
|
||||
import org.solovyev.android.calculator.AppComponent;
|
||||
import org.solovyev.android.calculator.BaseDialogFragment;
|
||||
import org.solovyev.android.calculator.BaseFragment;
|
||||
import org.solovyev.android.calculator.R;
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
import org.solovyev.android.calculator.*;
|
||||
import org.solovyev.android.plotter.Check;
|
||||
import org.solovyev.android.plotter.Plot;
|
||||
import org.solovyev.android.plotter.Plotter;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.inject.Inject;
|
||||
|
||||
@ -152,7 +145,7 @@ public class PlotDimensionsFragment extends BaseDialogFragment
|
||||
@Override
|
||||
protected void onPrepareDialog(@NonNull AlertDialog.Builder builder) {
|
||||
builder.setTitle("Dimensions");
|
||||
builder.setPositiveButton(android.R.string.ok, null);
|
||||
builder.setPositiveButton(R.string.cpp_done, null);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@ -243,12 +236,12 @@ public class PlotDimensionsFragment extends BaseDialogFragment
|
||||
final boolean nanRight = Float.isNaN(r);
|
||||
if (nanLeft || nanRight) {
|
||||
if (nanLeft) {
|
||||
setError(lInput, " ");
|
||||
setError(lInput, R.string.cpp_nan);
|
||||
} else {
|
||||
clearError(lInput);
|
||||
}
|
||||
if (nanRight) {
|
||||
setError(rInput, " ");
|
||||
setError(rInput, R.string.cpp_nan);
|
||||
} else {
|
||||
clearError(rInput);
|
||||
}
|
||||
@ -259,8 +252,7 @@ public class PlotDimensionsFragment extends BaseDialogFragment
|
||||
|
||||
@NonNull
|
||||
private RectF collectData() {
|
||||
return new RectF(getDimension(xMin), getDimension(yMin), getDimension(xMax),
|
||||
getDimension(yMax));
|
||||
return new RectF(getDimension(xMin), getDimension(yMin), getDimension(xMax), getDimension(yMax));
|
||||
}
|
||||
|
||||
private void applyData() {
|
||||
@ -272,7 +264,6 @@ public class PlotDimensionsFragment extends BaseDialogFragment
|
||||
try {
|
||||
return Float.parseFloat(view.getText().toString().replace(",", ".").replace("−", "-"));
|
||||
} catch (NumberFormatException e) {
|
||||
Log.w(Plot.getTag("MainActivity"), e.getMessage(), e);
|
||||
return Float.NaN;
|
||||
}
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-hdpi/ic_3d_rotation_white_24dp.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
app/src/main/res/drawable-hdpi/ic_my_location_white_24dp.png
Normal file
After Width: | Height: | Size: 546 B |
BIN
app/src/main/res/drawable-hdpi/ic_zoom_in_white_24dp.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
app/src/main/res/drawable-hdpi/ic_zoom_out_white_24dp.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
app/src/main/res/drawable-mdpi/ic_3d_rotation_white_24dp.png
Normal file
After Width: | Height: | Size: 381 B |
BIN
app/src/main/res/drawable-mdpi/ic_my_location_white_24dp.png
Normal file
After Width: | Height: | Size: 350 B |
BIN
app/src/main/res/drawable-mdpi/ic_zoom_in_white_24dp.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
app/src/main/res/drawable-mdpi/ic_zoom_out_white_24dp.png
Normal file
After Width: | Height: | Size: 249 B |
BIN
app/src/main/res/drawable-xhdpi/ic_3d_rotation_white_24dp.png
Normal file
After Width: | Height: | Size: 738 B |
BIN
app/src/main/res/drawable-xhdpi/ic_my_location_white_24dp.png
Normal file
After Width: | Height: | Size: 687 B |
BIN
app/src/main/res/drawable-xhdpi/ic_zoom_in_white_24dp.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
app/src/main/res/drawable-xhdpi/ic_zoom_out_white_24dp.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_3d_rotation_white_24dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_my_location_white_24dp.png
Normal file
After Width: | Height: | Size: 1012 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_zoom_in_white_24dp.png
Normal file
After Width: | Height: | Size: 737 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_zoom_out_white_24dp.png
Normal file
After Width: | Height: | Size: 731 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_3d_rotation_white_24dp.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_my_location_white_24dp.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_zoom_in_white_24dp.png
Normal file
After Width: | Height: | Size: 954 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_zoom_out_white_24dp.png
Normal file
After Width: | Height: | Size: 925 B |
@ -16,11 +16,11 @@
|
||||
a:layout_gravity="top|start"
|
||||
a:src="@drawable/ic_straighten_white_24dp" />
|
||||
|
||||
<org.solovyev.android.material.MaterialButton
|
||||
<org.solovyev.android.material.MaterialImageButton
|
||||
a:id="@id/plot_3d_button"
|
||||
style="@style/CppPlotButton"
|
||||
a:layout_gravity="top|end"
|
||||
a:text="@string/cpp_plot_3d" />
|
||||
a:src="@drawable/ic_3d_rotation_white_24dp" />
|
||||
|
||||
<LinearLayout
|
||||
a:layout_width="wrap_content"
|
||||
@ -28,10 +28,10 @@
|
||||
a:layout_gravity="bottom|start"
|
||||
a:orientation="vertical">
|
||||
|
||||
<org.solovyev.android.material.MaterialButton
|
||||
<org.solovyev.android.material.MaterialImageButton
|
||||
a:id="@+id/plot_add_function"
|
||||
style="@style/CppPlotButton"
|
||||
a:text="@string/cpp_plot_add_function" />
|
||||
a:src="@drawable/ic_add_white_24dp" />
|
||||
|
||||
<org.solovyev.android.material.MaterialImageButton
|
||||
a:id="@+id/plot_functions"
|
||||
@ -45,20 +45,20 @@
|
||||
a:layout_gravity="bottom|end"
|
||||
a:orientation="vertical">
|
||||
|
||||
<org.solovyev.android.material.MaterialButton
|
||||
<org.solovyev.android.material.MaterialImageButton
|
||||
a:id="@id/plot_zoom_in_button"
|
||||
style="@style/CppPlotButton"
|
||||
a:text="@string/cpp_plot_zoom_in" />
|
||||
a:src="@drawable/ic_zoom_in_white_24dp" />
|
||||
|
||||
<org.solovyev.android.material.MaterialButton
|
||||
<org.solovyev.android.material.MaterialImageButton
|
||||
a:id="@id/plot_zoom_reset_button"
|
||||
style="@style/CppPlotButton"
|
||||
a:text="@string/cpp_plot_zoom_reset" />
|
||||
a:src="@drawable/ic_my_location_white_24dp" />
|
||||
|
||||
<org.solovyev.android.material.MaterialButton
|
||||
<org.solovyev.android.material.MaterialImageButton
|
||||
a:id="@id/plot_zoom_out_button"
|
||||
style="@style/CppPlotButton"
|
||||
a:text="@string/cpp_plot_zoom_out" />
|
||||
a:src="@drawable/ic_zoom_out_white_24dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</org.solovyev.android.plotter.PlotViewFrame>
|