fix disappearing save button

This commit is contained in:
Milos Kozak 2019-08-26 22:40:54 +02:00
parent 0866b480ac
commit 3fed995d51
2 changed files with 166 additions and 169 deletions

View file

@ -236,8 +236,8 @@ public class TimeListEdit {
if (i == 0) next = ONEHOURINSECONDS;
fillSpinner(timeSpinner, secondFromMidnight(i), previous, next);
editText1.setParams(value1(i), min, max, step, formatter, false, view.findViewById(R.id.localprofile_save));
editText2.setParams(value2(i), min, max, step, formatter, false, view.findViewById(R.id.localprofile_save));
editText1.setParams(value1(i), min, max, step, formatter, false,null);
editText2.setParams(value2(i), min, max, step, formatter, false, null);
if (data2 == null) {
editText2.setVisibility(View.GONE);

View file

@ -1,13 +1,9 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".plugins.profile.local.LocalProfileFragment">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -27,7 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/linearBlockBackground"
android:layout_marginLeft="10px"
android:layout_marginStart="10dp"
android:text="@string/units"
android:textAppearance="?android:attr/textAppearanceMedium" />
@ -55,13 +51,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/linearBlockBackground"
android:layout_marginLeft="10px"
android:layout_marginStart="10dp"
android:text="@string/dia"
android:textAppearance="?android:attr/textAppearanceMedium" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
@ -74,7 +69,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:minWidth="80dp"
android:visibility="invisible"/>
@ -82,7 +77,7 @@
android:id="@+id/localprofile_dia"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_marginRight="5dp"
android:layout_marginEnd="5dp"
android:layout_marginBottom="10dp"/>
<!-- dummy to align with TimeListEdits added dynamically -->
@ -91,7 +86,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp"
android:src="@drawable/add"
android:visibility="invisible"/>
@ -101,7 +96,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp"
android:src="@drawable/remove"
android:visibility="invisible"/>
</LinearLayout>
@ -151,47 +146,49 @@
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/activate_profile"
android:drawableLeft="@drawable/icon_local_activate" />
android:drawableStart="@drawable/icon_local_activate" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<Button
android:id="@+id/localprofile_reset"
style="?android:attr/buttonStyle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="1"
android:drawableStart="@drawable/icon_local_reset"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/reset"
android:drawableLeft="@drawable/icon_local_reset" />
android:text="@string/reset" />
<Button
android:id="@+id/localprofile_save"
style="?android:attr/buttonStyle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="1"
android:drawableStart="@drawable/icon_local_save"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/save"
android:drawableLeft="@drawable/icon_local_save" />
android:text="@string/save" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</FrameLayout>