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

Commit 7c955e74 authored by Fan Zhang's avatar Fan Zhang
Browse files

Replace toast with snackbar when applicable.

Bug: 16877477
Bug: 23343217

Changed root view from a LinearLayout to CoordinatorLayout, which is
required to build custom behavior.

Added a custom behavior on linear layout - this makes the left/right/fab
button slide up/down as snackbar visibility changes.

Replaced most toast to snackbar. When we show toast without a UI, we
can't use snack bar.

Change-Id: Icd0ffd58d3f211dbe7d861868e763f227941e455
parent 487064ea
Loading
Loading
Loading
Loading

res/animator/fade_in.xml

deleted100644 → 0
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2012 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
    android:valueFrom="0.0"
    android:valueTo="1.0"
    android:propertyName="alpha"
    android:interpolator="@android:interpolator/decelerate_quad"
    android:duration="@integer/fade_duration" />

res/animator/fade_out.xml

deleted100644 → 0
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2012 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
    android:valueFrom="1.0"
    android:valueTo="0.0"
    android:propertyName="alpha"
    android:interpolator="@android:interpolator/decelerate_quad"
    android:duration="@integer/fade_duration" />
−599 B
Loading image diff...
−374 B
Loading image diff...
+0 −20
Original line number Diff line number Diff line
@@ -40,24 +40,4 @@

    <include layout="@layout/alarm_empty_view" />

    <FrameLayout
        android:id="@+id/undo_frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <com.android.deskclock.widget.ActionableToastBar
            android:id="@+id/undo_bar"
            style="@style/ToastBarStyle"
            android:layout_width="match_parent"
            android:layout_height="64dip"
            android:layout_gravity="bottom"
            android:layout_marginBottom="96dp"
            android:layout_marginLeft="@dimen/alarm_undo_bar_horizontal_margin"
            android:layout_marginStart="@dimen/alarm_undo_bar_horizontal_margin"
            android:layout_marginRight="@dimen/alarm_undo_bar_horizontal_margin"
            android:layout_marginEnd="@dimen/alarm_undo_bar_horizontal_margin" />

    </FrameLayout>

</FrameLayout>
Loading