Align form inputs
This commit is contained in:
parent
b03a0df74e
commit
4e1c62a374
@ -94,8 +94,10 @@ public abstract class BaseFunctionFragment extends BaseDialogFragment implements
|
|||||||
public TextInputLayout bodyLabel;
|
public TextInputLayout bodyLabel;
|
||||||
@Bind(R.id.function_body)
|
@Bind(R.id.function_body)
|
||||||
public EditTextCompat bodyView;
|
public EditTextCompat bodyView;
|
||||||
|
@Bind(R.id.function_description_label)
|
||||||
|
public TextInputLayout descriptionLabel;
|
||||||
@Bind(R.id.function_description)
|
@Bind(R.id.function_description)
|
||||||
EditText descriptionView;
|
public EditText descriptionView;
|
||||||
@Inject
|
@Inject
|
||||||
Calculator calculator;
|
Calculator calculator;
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -112,6 +112,8 @@ public class PlotEditFunctionFragment extends BaseFunctionFragment
|
|||||||
final int[] colors = MeshSpec.LightColors.asIntArray();
|
final int[] colors = MeshSpec.LightColors.asIntArray();
|
||||||
colorPicker.setColors(colors);
|
colorPicker.setColors(colors);
|
||||||
paramsView.setMaxParams(2);
|
paramsView.setMaxParams(2);
|
||||||
|
// no descriptions for functions in plotter
|
||||||
|
descriptionLabel.setVisibility(View.GONE);
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
if (plotFunction != null) {
|
if (plotFunction != null) {
|
||||||
setupViews(plotFunction.meshSpec);
|
setupViews(plotFunction.meshSpec);
|
||||||
|
@ -59,7 +59,8 @@
|
|||||||
|
|
||||||
<android.support.design.widget.TextInputLayout
|
<android.support.design.widget.TextInputLayout
|
||||||
a:layout_width="match_parent"
|
a:layout_width="match_parent"
|
||||||
a:layout_height="wrap_content">
|
a:layout_height="wrap_content"
|
||||||
|
a:id="@+id/function_description_label">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
a:id="@+id/function_description"
|
a:id="@+id/function_description"
|
||||||
|
@ -23,9 +23,10 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="wrap_content"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="wrap_content"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -33,7 +34,7 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<include layout="@layout/fragment_function_edit_base_controls" />
|
<include layout="@layout/fragment_function_edit_base_controls"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/fn_meshspec_views"
|
android:id="@+id/fn_meshspec_views"
|
||||||
@ -44,12 +45,12 @@
|
|||||||
|
|
||||||
<org.solovyev.android.plotter.PlotIconView
|
<org.solovyev.android.plotter.PlotIconView
|
||||||
android:id="@+id/fn_iconview"
|
android:id="@+id/fn_iconview"
|
||||||
android:layout_width="100dp"
|
android:layout_width="@dimen/cpp_plot_icon_size"
|
||||||
android:layout_height="100dp"
|
android:layout_height="@dimen/cpp_plot_icon_size"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginLeft="@dimen/cpp_plot_icon_margin"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="@dimen/cpp_plot_icon_margin"
|
||||||
android:background="#212121"
|
android:background="#212121"
|
||||||
android:padding="5dp" />
|
android:padding="@dimen/cpp_image_button_padding"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -61,25 +62,31 @@
|
|||||||
style="@style/TextAppearance.AppCompat.Caption"
|
style="@style/TextAppearance.AppCompat.Caption"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fn_line_width" />
|
android:paddingStart="4dp"
|
||||||
|
android:paddingLeft="4dp"
|
||||||
|
android:text="@string/fn_line_width"
|
||||||
|
tools:ignore="RtlSymmetry"/>
|
||||||
|
|
||||||
<SeekBar
|
<SeekBar
|
||||||
android:id="@+id/fn_linewidth_seekbar"
|
android:id="@+id/fn_linewidth_seekbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fn_color_label"
|
android:id="@+id/fn_color_label"
|
||||||
style="@style/TextAppearance.AppCompat.Caption"
|
style="@style/TextAppearance.AppCompat.Caption"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fn_line_color" />
|
android:paddingStart="4dp"
|
||||||
|
android:paddingLeft="4dp"
|
||||||
|
android:text="@string/fn_line_color"
|
||||||
|
tools:ignore="RtlSymmetry"/>
|
||||||
|
|
||||||
<uz.shift.colorpicker.LineColorPicker
|
<uz.shift.colorpicker.LineColorPicker
|
||||||
android:id="@+id/fn_color_picker"
|
android:id="@+id/fn_color_picker"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
app:lcp_orientation="horizontal" />
|
app:lcp_orientation="horizontal"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -40,6 +40,9 @@
|
|||||||
<dimen name="cpp_clickable_area_size">50dp</dimen>
|
<dimen name="cpp_clickable_area_size">50dp</dimen>
|
||||||
<dimen name="cpp_image_button_size">30dp</dimen>
|
<dimen name="cpp_image_button_size">30dp</dimen>
|
||||||
<dimen name="cpp_image_button_padding">5dp</dimen>
|
<dimen name="cpp_image_button_padding">5dp</dimen>
|
||||||
|
<!-- 3 * cpp_image_button_size - 2 * cpp_plot_icon_margin -->
|
||||||
|
<dimen name="cpp_plot_icon_size">70dp</dimen>
|
||||||
|
<dimen name="cpp_plot_icon_margin">10dp</dimen>
|
||||||
<dimen name="cpp_dialog_width_max">400dp</dimen>
|
<dimen name="cpp_dialog_width_max">400dp</dimen>
|
||||||
<dimen name="cpp_card_margin">4dp</dimen>
|
<dimen name="cpp_card_margin">4dp</dimen>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user