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

Commit f4bf533b authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: add Weather display to status bar header



Change-Id: Ic2fea861c36f405d8a0e64cc9224f47088ac6351
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 4ae256f5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3121,6 +3121,11 @@ public final class Settings {
         */
        public static final String DOUBLE_TAP_SLEEP_GESTURE = "double_tap_sleep_gesture";

        /**
         * Boolean value on whether to show weather in the statusbar
         */
        public static final String STATUS_BAR_SHOW_WEATHER = "status_bar_show_weather";

        /**
          * Volume keys control cursor in text fields (default is 0)
          * 0 - Disabled
+3 −0
Original line number Diff line number Diff line
@@ -115,6 +115,9 @@
    <!-- Screen Capturing -->
    <uses-permission android:name="android.permission.MANAGE_MEDIA_PROJECTION" />

    <!-- Weather -->
    <uses-permission android:name="com.cyanogenmod.lockclock.permission.READ_WEATHER" />

    <application
        android:name=".SystemUIApplication"
        android:persistent="true"
+30 −0
Original line number Diff line number Diff line
@@ -161,6 +161,36 @@
        android:visibility="gone"
        />

    <LinearLayout
        android:id="@+id/weather_container"
        android:background="@drawable/ripple_drawable"
        android:orientation="vertical"
        android:layout_marginBottom="@dimen/clock_collapsed_bottom_margin"
        android:layout_alignParentBottom="true"
        android:layout_alignParentEnd="true"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_width="wrap_content">
    <TextView
            android:id="@+id/weather_line_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingEnd="16dp"
            android:gravity="right"
            android:textColor="#ffffff"
            android:textSize="@dimen/weather_text_size"
            android:importantForAccessibility="noHideDescendants"/>
    <TextView
            android:id="@+id/weather_line_2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingEnd="16dp"
            android:gravity="right"
            android:textColor="#ffffff"
            android:textSize="@dimen/weather_text_size"
            android:importantForAccessibility="noHideDescendants"/>
    </LinearLayout>

    <include
        android:id="@+id/qs_detail_header"
        layout="@layout/qs_detail_header"
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2014 The CyanogenMod 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.
-->
<resources>
    <dimen name="weather_text_size">10sp</dimen>
</resources>
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2014 The CyanogenMod 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.
-->
<resources>
    <dimen name="weather_text_size">9sp</dimen>
</resources>
 No newline at end of file
Loading