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

Commit d0e5dc21 authored by Danny Baumann's avatar Danny Baumann
Browse files

Add back call stats feature.

Change-Id: Id10bc12cacaee3523b7614bce8493d8b423b3f40
parent 49e377c3
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -155,6 +155,17 @@
            </intent-filter>
        </activity>

        <activity android:name=".callstats.CallStatsDetailActivity"
            android:label="@string/callStatsDetailTitle"
            android:theme="@style/CallDetailActivityTheme"
            android:screenOrientation="portrait"
            android:icon="@mipmap/ic_launcher_phone" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name="com.android.contacts.common.test.FragmentTestActivity">
            <intent-filter>
                <category android:name="android.intent.category.TEST"/>
+550 B
Loading image diff...
+385 B
Loading image diff...
+751 B
Loading image diff...
+225 −0
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.
-->

<com.android.dialer.widget.AnchoredScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ex="http://schemas.android.com/apk/res/com.android.dialer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    ex:anchorView="@+id/photo_text_bar_dummy"
    ex:anchoredView="@+id/controls" >

    <RelativeLayout
        android:id="@+id/call_stats_detail"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone" >

        <!-- This layout defines the position of the scroll anchor.
             Sizes are supposed to match their counterpart in controls -->
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_alignParentTop="true" >

            <!-- Contact photo placeholder -->
            <com.android.contacts.common.widget.ProportionalLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:id="@+id/photo_dummy"
                ex:direction="widthToHeight"
                ex:ratio="0.5" >

                <!-- Proportional layout requires a view in it. -->
                <View
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />

            </com.android.contacts.common.widget.ProportionalLayout>

            <!-- Contact name placeholder -->
            <View
                android:id="@+id/photo_text_bar_dummy"
                android:layout_width="match_parent"
                android:layout_height="42dip"
                android:layout_alignBottom="@id/photo_dummy"
                android:layout_alignParentStart="true" />

        </RelativeLayout>

        <!-- The actual details -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/controls" >

            <include layout="@layout/call_stats_detail_info" />
        </LinearLayout>

        <!-- The contents of the title block -->

        <RelativeLayout
            android:id="@+id/controls"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true" >

            <com.android.contacts.common.widget.ProportionalLayout
                android:id="@+id/contact_background_sizer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                ex:direction="widthToHeight"
                ex:ratio="0.5" >

                <ImageView
                    android:id="@+id/contact_background"
                    android:layout_width="match_parent"
                    android:layout_height="0dip"
                    android:adjustViewBounds="true"
                    android:scaleType="centerCrop" />

            </com.android.contacts.common.widget.ProportionalLayout>

            <LinearLayout
                android:id="@+id/separator"
                android:layout_width="match_parent"
                android:layout_height="1dip"
                android:layout_below="@+id/contact_background_sizer"
                android:background="@color/background_dialer_light" />

            <View
                android:id="@+id/photo_text_bar"
                android:layout_width="match_parent"
                android:layout_height="42dip"
                android:layout_alignBottom="@id/contact_background_sizer"
                android:layout_alignParentStart="true"
                android:background="#7F000000" />

            <ImageView
                android:id="@+id/main_action"
                android:layout_width="wrap_content"
                android:layout_height="0dip"
                android:layout_alignBottom="@id/photo_text_bar"
                android:layout_alignEnd="@id/photo_text_bar"
                android:layout_alignTop="@id/photo_text_bar"
                android:layout_marginEnd="@dimen/call_log_outer_margin"
                android:scaleType="center" />

            <TextView
                android:id="@+id/header_text"
                android:layout_width="wrap_content"
                android:layout_height="0dip"
                android:layout_alignBottom="@id/photo_text_bar"
                android:layout_alignStart="@id/photo_text_bar"
                android:layout_alignTop="@id/photo_text_bar"
                android:layout_marginStart="@dimen/call_detail_contact_name_margin"
                android:layout_marginEnd="@dimen/call_log_inner_margin"
                android:layout_toStartOf="@id/main_action"
                android:gravity="center_vertical"
                android:singleLine="true"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="?attr/call_log_header_color" />

            <ImageButton
                android:id="@+id/main_action_push_layer"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignBottom="@id/contact_background_sizer"
                android:layout_alignStart="@id/contact_background_sizer"
                android:layout_alignEnd="@id/contact_background_sizer"
                android:layout_alignTop="@id/contact_background_sizer"
                android:background="?android:attr/selectableItemBackground" />

            <FrameLayout
                android:id="@+id/call_and_sms"
                android:layout_width="match_parent"
                android:layout_height="@dimen/call_log_list_item_height"
                android:layout_below="@id/main_action_push_layer"
                android:layout_marginBottom="@dimen/call_detail_button_spacing"
                android:layout_marginTop="@dimen/call_detail_button_spacing"
                android:background="@color/background_dialer_list_items"
                android:gravity="center_vertical" >

                <LinearLayout
                    android:id="@+id/call_and_sms_main_action"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="?android:attr/selectableItemBackground"
                    android:focusable="true"
                    android:orientation="horizontal" >

                    <LinearLayout
                        android:layout_width="0dip"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:gravity="center_vertical"
                        android:orientation="vertical"
                        android:paddingStart="@dimen/call_log_indent_margin" >

                        <TextView
                            android:id="@+id/call_and_sms_text"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:ellipsize="end"
                            android:paddingEnd="@dimen/call_log_icon_margin"
                            android:singleLine="true"
                            android:textAppearance="?android:attr/textAppearanceMedium"
                            android:textColor="?attr/call_log_primary_text_color" />

                        <TextView
                            android:id="@+id/call_and_sms_label"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:ellipsize="end"
                            android:paddingEnd="@dimen/call_log_icon_margin"
                            android:singleLine="true"
                            android:textAllCaps="true"
                            android:textAppearance="?android:attr/textAppearanceSmall"
                            android:textColor="?attr/call_log_primary_text_color" />
                    </LinearLayout>

                    <View
                        android:id="@+id/call_and_sms_divider"
                        android:layout_width="1px"
                        android:layout_height="32dip"
                        android:layout_gravity="center_vertical"
                        android:background="@color/background_dialer_light" />

                    <ImageView
                        android:id="@+id/call_and_sms_icon"
                        android:layout_width="@color/call_log_voicemail_highlight_color"
                        android:layout_height="match_parent"
                        android:background="?android:attr/selectableItemBackground"
                        android:focusable="true"
                        android:gravity="center"
                        android:paddingStart="@dimen/call_log_inner_margin"
                        android:paddingEnd="@dimen/call_log_outer_margin"
                        android:scaleType="centerInside" />

                </LinearLayout>

            </FrameLayout>

        </RelativeLayout>

    </RelativeLayout>

</com.android.dialer.widget.AnchoredScrollView>
Loading