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

Commit 9a1fd04f authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Improvements to the DeskClock dream.

 - simplify layouts (removing a number of obsolete sw600
   ones)
 - add a clickable alarm button way down in the corner, to
   let you see your alarm info

TODO: Add another little button for dim mode.

Change-Id: Ibc8e44a33c2a934e485277868c77356eb4250194
parent 90dc136d
Loading
Loading
Loading
Loading

res/layout-sw600dp/desk_clock.xml

deleted100644 → 0
+0 −68
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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.
-->

<!-- This is the alarm clock in desk dock mode. It shows the time in large
     type, plus information about active alarms and charge status.  It can
     also show some additional status information (e.g. weather data).
     Buttons are provided to access alarms, music, and other useful functions.
     -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <View android:id="@+id/window_touch"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#00000000"
        android:visibility="visible"
        android:clickable="false"
        />

    <!-- the top padding accounts for the status bar area -->
    <RelativeLayout
        android:id="@+id/desk_clock"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >
        <include layout="@layout/desk_clock_time_date"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/time_margin_top"
            android:layout_marginBottom="@dimen/time_margin_bottom"
            android:layout_centerInParent="true"
            android:layout_centerHorizontal="true"
            />

        <include layout="@layout/desk_clock_battery"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:layout_marginRight="4dip"
            android:layout_marginBottom="4dip"
            android:layout_alignParentRight="true"
            android:layout_alignParentBottom="true"
            />
    </RelativeLayout>

    <View android:id="@+id/window_tint"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#CC000000"
        android:visibility="visible"
        android:clickable="false"
        />

</FrameLayout>
+0 −75
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->

<!-- Special "screen saver mode" with just the time/date on black. -->
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_x="0dip"
        android:layout_y="0dip"
        android:background="#FF000000"
        />

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/saver_view">
        <com.android.deskclock.DigitalClock android:id="@+id/time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/time_margin_bottom"
            >
            <com.android.deskclock.AndroidClockTextView
                android:id="@+id/timeDisplay"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="@dimen/time_margin_right"
                android:textSize="@dimen/time_text_size"
                android:textColor="@color/time_text_color"
                android:gravity="left"
                />
            <com.android.deskclock.AndroidClockTextView
                android:id="@+id/am_pm"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@id/timeDisplay"
                android:layout_alignTop="@id/timeDisplay"
                android:layout_marginTop="@dimen/ampm_margin_top"
                android:textSize="@dimen/ampm_text_size"
                android:textColor="@color/ampm_text_color"
                android:gravity="left"
                useClockTypeface="false"
                />
            <TextView android:id="@+id/date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignRight="@id/timeDisplay"
                android:layout_below="@id/timeDisplay"
                android:layout_marginTop="@dimen/time_margin_bottom"
                android:layout_marginRight="@dimen/font_margin_adjust"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textSize="@dimen/date_text_size"
                android:textColor="@color/time_text_color"
                />
        </com.android.deskclock.DigitalClock>
    </RelativeLayout>

</AbsoluteLayout>
+0 −81
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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.
-->

<!-- digital clock & date, together -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/time_date"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    >

    <com.android.deskclock.DigitalClock android:id="@+id/time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/time_margin_bottom"
        >

        <com.android.deskclock.AndroidClockTextView
            android:id="@+id/timeDisplay"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="@dimen/time_margin_right"
            android:textSize="@dimen/time_text_size"
            android:textColor="@color/time_text_color"
            android:gravity="left"
            />

        <com.android.deskclock.AndroidClockTextView
            android:id="@+id/am_pm"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@id/timeDisplay"
            android:layout_alignBaseline="@id/timeDisplay"
            android:layout_marginTop="@dimen/ampm_margin_top"
            android:textSize="@dimen/ampm_text_size"
            android:textColor="@color/ampm_text_color"
            android:gravity="left"
            useClockTypeface="false"
            />

        <TextView android:id="@+id/date"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignRight="@id/timeDisplay"
            android:layout_below="@id/timeDisplay"
            android:layout_marginTop="@dimen/time_margin_bottom"
            android:layout_marginRight="@dimen/font_margin_adjust"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textSize="@dimen/date_text_size"
            android:textColor="@color/time_text_color"
            />

        <TextView android:id="@+id/nextAlarm"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/date"
            android:layout_marginTop="12dip"
            android:padding="@dimen/font_margin_adjust"
            android:layout_alignRight="@id/timeDisplay"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textSize="@dimen/next_alarm_text_size"
            android:textColor="@color/white"
            android:background="?android:attr/listChoiceBackgroundIndicator"
            android:drawablePadding="2dip"
            android:drawableLeft="@drawable/ic_lock_idle_alarm"
            />
    </com.android.deskclock.DigitalClock>

</LinearLayout>
+20 −7
Original line number Diff line number Diff line
@@ -15,20 +15,33 @@
-->

<!-- Special "screen saver mode" with just the time/date on black. -->
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FF000000"
    >

    <FrameLayout
    <include layout="@layout/desk_clock_time_date"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/saver_view">
        <include layout="@layout/desk_clock_time_date"
        />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right|bottom"
        >
        <TextView android:id="@+id/saverAlarm"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="@dimen/font_margin_adjust"
            android:gravity="right"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textSize="@dimen/next_alarm_text_size"
            android:layout_marginTop="@dimen/next_alarm_margin_top"
            android:drawablePadding="4dip"
            android:textColor="@color/screen_saver_color"
            android:background="?android:attr/listChoiceBackgroundIndicator"
            />
    </LinearLayout>
</FrameLayout>

</AbsoluteLayout>
+1 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textSize="@dimen/date_text_size"
        android:textColor="@color/time_text_color"
        android:visibility="gone"
        />

</LinearLayout>
Loading