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

Commit abd84229 authored by James Kung's avatar James Kung
Browse files

Alarm timeline view

Change-Id: Id0c31d5dbe1a1cd02c0af6f02050efc36986dfee
parent fd116ef2
Loading
Loading
Loading
Loading
+104 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 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.
-->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingTop="?android:attr/actionBarSize" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:baselineAligned="false" >

        <FrameLayout
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="2"
            >
            <ListView
                android:id="@+id/alarms_list"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:clipToPadding="false"
                android:descendantFocusability="beforeDescendants"
                android:divider="@null"
                android:dividerHeight="6dp"
                />
            <TextView
                android:id="@+id/alarms_empty_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/no_alarms"
                style="@style/small_thin"
                android:drawableTop="@drawable/ic_alarm"
                android:contentDescription="@string/no_alarms"
                android:layout_gravity="center"
                android:textColor="@color/grey" />
            <com.android.deskclock.widget.ActionableToastBar
                android:id="@+id/undo_bar"
                android:layout_width="match_parent"
                android:layout_height="64dip"
                android:layout_gravity="bottom"
                android:layout_marginBottom="96dp"
                android:layout_marginLeft="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginRight="8dp"
                android:layout_marginEnd="8dp"
                style="@style/ToastBarStyle" />
        </FrameLayout>

        <include layout="@layout/alarm_timeline_layout"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
        />

    </LinearLayout>
    <FrameLayout
        android:background="@drawable/footer_bg"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom" >
        <ImageButton
            android:id="@+id/alarm_add_alarm"
            android:contentDescription="@string/add_alarm"
            android:layout_width="@dimen/add_alarm_button_size"
            android:layout_height="@dimen/add_alarm_button_size"
            android:layout_marginTop="@dimen/add_alarm_layout_margin"
            android:layout_marginBottom="@dimen/add_alarm_layout_margin"
            android:layout_marginRight="@dimen/add_alarm_layout_margin"
            android:layout_marginEnd="@dimen/add_alarm_layout_margin"
            android:layout_marginLeft="@dimen/add_alarm_layout_margin"
            android:layout_marginStart="@dimen/add_alarm_layout_margin"
            android:layout_gravity="center"
            android:src="@drawable/ic_add"
            style="@style/button"
            android:background="@drawable/main_button_normal" />
        <ImageButton
            android:id="@+id/menu_button"
            android:contentDescription="@string/button_menu"
            style="?android:attr/actionOverflowButtonStyle"
            android:background="@drawable/item_background"
            android:onClick="clockButtonsOnClick"
            android:layout_gravity="end|center_vertical"
            android:layout_width="@dimen/add_alarm_button_size"
            android:layout_height="@dimen/add_alarm_button_size" />
    </FrameLayout>
</FrameLayout>
+10 −10
Original line number Diff line number Diff line
@@ -59,14 +59,14 @@
        <ImageButton
            android:id="@+id/alarm_add_alarm"
            android:contentDescription="@string/add_alarm"
            android:layout_width="56dip"
            android:layout_height="56dip"
            android:layout_marginTop="16dp"
            android:layout_marginBottom="16dp"
            android:layout_marginRight="16dp"
            android:layout_marginEnd="16dp"
            android:layout_marginLeft="16dp"
            android:layout_marginStart="16dp"
            android:layout_width="@dimen/add_alarm_button_size"
            android:layout_height="@dimen/add_alarm_button_size"
            android:layout_marginTop="@dimen/add_alarm_layout_margin"
            android:layout_marginBottom="@dimen/add_alarm_layout_margin"
            android:layout_marginRight="@dimen/add_alarm_layout_margin"
            android:layout_marginEnd="@dimen/add_alarm_layout_margin"
            android:layout_marginLeft="@dimen/add_alarm_layout_margin"
            android:layout_marginStart="@dimen/add_alarm_layout_margin"
            android:layout_gravity="center"
            android:src="@drawable/ic_add"
            style="@style/button"
@@ -78,7 +78,7 @@
            android:background="@drawable/item_background"
            android:onClick="clockButtonsOnClick"
            android:layout_gravity="end|center_vertical"
            android:layout_width="56dp"
            android:layout_height="56dp" />
            android:layout_width="@dimen/add_alarm_button_size"
            android:layout_height="@dimen/add_alarm_button_size" />
    </FrameLayout>
</FrameLayout>
+39 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    android:paddingTop="@dimen/alarm_timeline_layout_padding_top"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    >
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/alarm_timeline_title_margin_bottom"
        android:text="@string/alarm_timeline_title_text"
        android:textSize="@dimen/alarm_timeline_title_text_size"
        android:textStyle="bold"
        android:textColor="@color/clock_red"
        android:gravity="center_horizontal" />
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
        <com.android.deskclock.AlarmTimelineView
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </ScrollView>
</LinearLayout>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -51,4 +51,6 @@

    <drawable name="notification_template_icon_bg">#3333B5E5</drawable>
    <drawable name="notification_template_icon_low_bg">#0cffffff</drawable>

    <color name="alarm_timeline_color">#4D4D4D</color>
</resources>
+14 −0
Original line number Diff line number Diff line
@@ -52,6 +52,20 @@
    <dimen name="actionbar_tab_padding">0dip</dimen>
    <dimen name="actionbar_title_font_size">22sp</dimen>

    <dimen name="add_alarm_button_size">56dip</dimen>
    <dimen name="add_alarm_layout_margin">16dip</dimen>

    <dimen name="alarm_timeline_width">2dp</dimen>
    <dimen name="alarm_timeline_margin_top">50dp</dimen>
    <dimen name="alarm_timeline_length">1200dp</dimen>
    <dimen name="alarm_timeline_radius">5dp</dimen>
    <dimen name="alarm_timeline_inner_radius">4dp</dimen>
    <dimen name="alarm_text_padding">15dp</dimen>
    <dimen name="alarm_text_font_size">16sp</dimen>
    <dimen name="alarm_min_distance">2dp</dimen>
    <dimen name="alarm_timeline_layout_padding_top">50dp</dimen>
    <dimen name="alarm_timeline_title_margin_bottom">10dp</dimen>
    <dimen name="alarm_timeline_title_text_size">24dp</dimen>
    <dimen name="circletimer_diamond_size">12dip</dimen>
    <dimen name="circletimer_circle_size">4dip</dimen>
    <dimen name="circletimer_marker_size">16dip</dimen>
Loading