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

Commit c286a14c authored by Richard MacGregor's avatar Richard MacGregor
Browse files

Update open file progress dialog

Now uses icon and color of file being opened
Background is correct color.

Change-Id: I0eda7bf82f81a057220822f92396c81d6cacafaf
parent c8b3656f
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
     Copyright (C) 2015 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.
-->
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/open_file_progress_circle" >

    <target
        android:name="progressBar"
        android:animation="@*android:anim/progress_indeterminate_material" />

    <target
        android:name="root"
        android:animation="@*android:anim/progress_indeterminate_rotation_material" />

</animated-vector>
 No newline at end of file
+42 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright (C) 2014 The Android Open Source Project
 Copyright (C) 2015 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:height="76dp"
    android:width="76dp"
    android:viewportHeight="40"
    android:viewportWidth="40"
    android:tint="?attr/colorControlActivated">

    <group
        android:name="root"
        android:translateX="20.0"
        android:translateY="20.0" >
        <path
            android:name="progressBar"
            android:fillColor="#00000000"
            android:pathData="M0, 0 m 0, -19 a 19,19 0 1,1 0,38 a 19,19 0 1,1 0,-38"
            android:strokeColor="@android:color/white"
            android:strokeLineCap="square"
            android:strokeLineJoin="miter"
            android:strokeWidth="2"
            android:trimPathEnd="0"
            android:trimPathOffset="0"
            android:trimPathStart="0" />
    </group>

</vector>
 No newline at end of file
+71 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 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.
 -->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/open_dialog_progress_layout_width"
    android:layout_height="@dimen/open_dialog_progress_layout_height"
    android:background="@color/default_background">

    <ProgressBar
        android:id="@+id/message_progress_dialog_waiting"
        android:layout_width="@dimen/open_dialog_progress_circle_size"
        android:layout_height="@dimen/open_dialog_progress_circle_size"
        android:layout_centerVertical="true"
        android:layout_marginStart="@dimen/open_dialog_progressbar_margin_start"
        android:indeterminate="true"
        android:indeterminateOnly="true"
        android:indeterminateDrawable="@drawable/open_file_progress_animation"/>

    <ImageView
        android:id="@+id/message_progress_dialog_icon"
        android:layout_width="@dimen/open_dialog_icon_size"
        android:layout_height="@dimen/open_dialog_icon_size"
        android:layout_centerVertical="true"
        android:layout_marginStart="@dimen/open_dialog_icon_margin_start"
        android:src="@null" />

    <TextView
        android:id="@+id/open_file_progress_dialog_filename"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/open_dialog_text_margin_top"
        android:layout_marginStart="@dimen/open_dialog_text_margin_start_end"
        android:layout_marginEnd="@dimen/open_dialog_text_margin_start_end"
        android:layout_toEndOf="@id/message_progress_dialog_waiting"
        android:gravity="start|center_vertical"
        android:minHeight="@dimen/open_dialog_text_min_height"
        android:singleLine="true"
        android:text="@null"
        android:textColor="@color/open_file_progress_dialog_file_color"
        android:textSize="16sp"/>

    <TextView
        android:id="@+id/message_progress_dialog_message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/open_file_progress_dialog_filename"
        android:layout_marginStart="@dimen/open_dialog_text_margin_start_end"
        android:layout_marginEnd="@dimen/open_dialog_text_margin_start_end"
        android:layout_toEndOf="@id/message_progress_dialog_waiting"
        android:gravity="start|center_vertical"
        android:minHeight="@dimen/open_dialog_text_min_height"
        android:singleLine="true"
        android:text="@string/waiting_dialog_opening_storage_provider_message_2"
        android:textColor="@color/open_file_progress_dialog_message_color"
        android:textSize="14sp"
        android:paddingBottom="@dimen/open_dialog_text_padding_bottom" />

</RelativeLayout>
+4 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@
    <color name="dark_button_blue">#0277bd</color>

    <!-- The default background color -->
    <color name="default_background">@android:color/white</color>
    <color name="default_background">#fafafa</color>
    <!-- The default dissabled background color -->
    <color name="default_background_disabled">#f2f2f2</color>

@@ -178,4 +178,7 @@
    <color name="snackbar_upgrade_color">#def2b807</color>

    <color name="status_bar_foreground_color">#33000000</color>

    <color name="open_file_progress_dialog_file_color">#de000000</color>
    <color name="open_file_progress_dialog_message_color">#8b000000</color>
</resources>
+23 −0
Original line number Diff line number Diff line
@@ -199,4 +199,27 @@
    <dimen name="quick_search_text_margin_top">15dp</dimen>
    <dimen name="quick_search_text_height">16dp</dimen>

    <!-- Open dialog icon size -->
    <dimen name="open_dialog_icon_size">24dp</dimen>
    <!-- Open dialog progress circle stroke size -->
    <dimen name="open_dialog_progress_circle_size">40dp</dimen>
    <!-- Open dialog progress circle stroke size -->
    <dimen name="open_dialog_progress_circle_stroke_size">2dp</dimen>
    <!-- Open dialog progress layout width -->
    <dimen name="open_dialog_progress_layout_width">280dp</dimen>
    <!-- Open dialog progress layout height -->
    <dimen name="open_dialog_progress_layout_height">88dp</dimen>
    <!-- Open dialog progressbar margin start -->
    <dimen name="open_dialog_progressbar_margin_start">16dp</dimen>
    <!-- Open dialog icon margin start -->
    <dimen name="open_dialog_icon_margin_start">24dp</dimen>
    <!-- Open dialog text min height -->
    <dimen name="open_dialog_text_min_height">20dp</dimen>
    <!-- Open dialog text margin start/end -->
    <dimen name="open_dialog_text_margin_start_end">16dp</dimen>
    <!-- Open dialog text margin top -->
    <dimen name="open_dialog_text_margin_top">25dp</dimen>
    <!-- Open dialog text padding bottom -->
    <dimen name="open_dialog_text_padding_bottom">21dp</dimen>

</resources>
Loading