Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1094c281 authored by Michael W's avatar Michael W
Browse files

DeskClock: Remove FAB from ExpiredTimersActivity

* Since every timer has an own stop button, we don't need a common
  one for all of them.
* Also, the behaviour is non deterministic: Button on each timer
  just stops it, FAB removes all of them

Change-Id: I4c9ddea9fe45b39ec46e22bb22ea44dd7bfff87f
parent aec45ba3
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/expired_timers_activity"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
@@ -36,16 +35,4 @@
            android:orientation="vertical" />

    </ScrollView>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal|bottom"
        android:layout_margin="@dimen/fab_margin"
        android:contentDescription="@string/timer_stop"
        android:src="@drawable/ic_stop_play"
        app:borderWidth="0dp"
        app:elevation="@dimen/fab_elevation" />

</FrameLayout>
+0 −15
Original line number Diff line number Diff line
@@ -77,8 +77,6 @@ public class ExpiredTimersActivity extends BaseActivity {
        mExpiredTimersView = findViewById(R.id.expired_timers_list);
        mExpiredTimersScrollView = findViewById(R.id.expired_timers_scroll);

        findViewById(R.id.fab).setOnClickListener(new FabClickListener());

        final View view = findViewById(R.id.expired_timers_activity);
        view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);

@@ -277,19 +275,6 @@ public class ExpiredTimersActivity extends BaseActivity {
        }
    }

    /**
     * Clicking the fab resets all expired timers.
     */
    private class FabClickListener implements View.OnClickListener {
        @Override
        public void onClick(View v) {
            stopUpdatingTime();
            DataModel.getDataModel().removeTimerListener(mTimerChangeWatcher);
            DataModel.getDataModel().resetOrDeleteExpiredTimers(R.string.label_deskclock);
            finish();
        }
    }

    /**
     * Adds and removes expired timers from this activity based on their state changes.
     */