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

Commit 5cc4fb87 authored by blong's avatar blong Committed by Xiaojing Zhang
Browse files

Add batch delete for Contacts

- Add batch delete contacts function
- Add multi pick contacts function

Change-Id: Ifce5762937f5abd28b0c88a383b6ecff65e53c0d
parent 1a67987c
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@
        <activity android:name=".activities.PeopleActivity"
            android:label="@string/launcherActivityLabel"
            android:theme="@style/PeopleTheme"
            android:screenOrientation="nosensor"
            android:clearTaskOnLaunch="true"
            android:launchMode="singleTop"
        >
@@ -427,6 +428,42 @@
            android:label="@string/launcherActivityLabel"
            android:theme="@style/BackgroundOnlyTheme" />

        <activity
            android:name=".editor.MultiPickContactActivity"
            android:windowSoftInputMode="stateHidden|adjustResize"
            android:screenOrientation="nosensor"
            android:theme="@android:style/Theme.Holo.Light"
            android:configChanges="orientation|keyboardHidden|layoutDirection">
            <intent-filter>
                <action android:name="com.android.contacts.action.MULTI_PICK" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="vnd.android.cursor.dir/person"/>
                <data android:mimeType="vnd.android.cursor.dir/contact"/>
                <data android:mimeType="vnd.android.cursor.dir/raw_contact"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.DELETE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="vnd.android.cursor.dir/person"/>
                <data android:mimeType="vnd.android.cursor.dir/contact"/>
                <data android:mimeType="vnd.android.cursor.dir/raw_contact"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.android.contacts.action.MULTI_PICK_CALL"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.android.contacts.action.MULTI_PICK_EMAIL"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:mimeType="vnd.android.cursor.dir/person"/>
                <data android:mimeType="vnd.android.cursor.dir/contact"/>
                <data android:mimeType="vnd.android.cursor.dir/raw_contact"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.android.contacts.action.MULTI_PICK_SIM"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>
        <service
            android:name=".common.vcard.VCardService"
            android:exported="false" />
+100 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (c) 2013, The Linux Foundation. All Rights Reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 *       copyright notice, this list of conditions and the following
 *       disclaimer in the documentation and/or other materials provided
 *       with the distribution.
 *     * Neither the name of The Linux Foundation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    <LinearLayout
        android:id="@+id/search_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        style="@android:style/ButtonBar">

        <EditText
            android:id="@+id/search_field"
            android:layout_height="wrap_content"
            android:layout_width="0dip"
            android:layout_weight="1.0"
            android:layout_marginLeft="5dip"
            android:layout_marginRight="5dip"
            android:singleLine="true"
            android:ellipsize="end"
            android:inputType="textNoSuggestions"
            android:imeOptions="actionDone"
            android:hint="@string/search_bar_hint"
            android:drawableLeft="@drawable/ic_ab_search"
            android:freezesText="true"
        />
        <TextView android:id="@+id/select_all_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginRight="5dip"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:singleLine="true"
            android:text="@string/select_all"
        />
        <CheckBox
            android:id="@+id/select_all_check"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_marginRight="5dip"
        />
    </LinearLayout>

    <ListView android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1.0"
        android:fastScrollEnabled="true"
        android:id="@android:id/list">
    </ListView>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        style="@android:style/ButtonBar">

        <Button android:id="@+id/btn_ok"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/btn_ok"
        />

        <Button android:id="@+id/btn_cancel"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/btn_cancel"
        />
    </LinearLayout>
</LinearLayout>
+75 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (c) 2013-2014, The Linux Foundation. All Rights Reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 *       copyright notice, this list of conditions and the following
 *       disclaimer in the documentation and/or other materials provided
 *       with the distribution.
 *     * Neither the name of Code The Linux Foundation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 -->
<RelativeLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:minHeight="?android:attr/listPreferredItemHeight"
         android:paddingTop="3dip"
         android:paddingBottom="3dip"
         >
         <ImageView android:layout_width="@dimen/contact_browser_list_item_photo_size"
               android:layout_height="@dimen/contact_browser_list_item_photo_size"
               android:layout_marginLeft="10dip"
               android:layout_marginRight="5dip"
               android:layout_marginTop="5dip"
               android:visibility="gone"
               android:id="@+id/pick_contact_photo"/>
         <TextView
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_toRightOf="@id/pick_contact_photo"
               android:layout_marginLeft="10dip"
               android:layout_marginRight="50dip"
               android:layout_marginTop="5dip"
               android:textAppearance="?android:attr/textAppearanceLarge"
               android:id="@+id/pick_contact_name">
         </TextView>
         <TextView
               android:layout_height="wrap_content"
               android:layout_width="wrap_content"
               android:layout_below="@id/pick_contact_name"
               android:layout_marginLeft="10dip"
               android:layout_marginBottom="5dip"
               android:textAppearance="?android:attr/textAppearanceSmall"
               android:id="@+id/pick_contact_number"
               android:singleLine="true">
         </TextView>
         <CheckBox
             android:id="@+id/pick_contact_check"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginRight="10dip"
             android:layout_centerVertical="true"
             android:layout_alignParentRight="true"
             android:focusable="false"
             android:clickable="false">
         </CheckBox>
</RelativeLayout>
+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@
    <item
        android:id="@+id/menu_settings"
        android:title="@string/menu_settings" />
    <item
        android:id="@+id/menu_delete"
        android:title="@string/menu_deleteContact" />

    <item
        android:id="@+id/menu_help"
+17 −0
Original line number Diff line number Diff line
@@ -238,6 +238,23 @@
    <string name="keep_local" msgid="1258761699192993322">"本地保存"</string>
    <string name="add_account" msgid="8201790677994503186">"添加帐户"</string>
    <string name="add_new_account" msgid="5748627740680940264">"添加新帐户"</string>
    <string name="select_all">"全选"</string>
    <string name="btn_ok">"确定"</string>
    <string name="btn_cancel">"取消"</string>
    <string name="search_bar_hint">"搜索联系人"</string>
    <string name="menu_sendViaSMS">通过短信发送联系人</string>
    <string name="deleteConfirmation_title">"要删除联系人吗?"</string>
    <string name="ContactMultiDeleteConfirmation">"将会删除这些联系人。"</string>
    <string name="delete_contacts_title">"删除联系人"</string>
    <string name="delete_contacts_message">"正在删除..."</string>
    <string name="delete_termination">"删除结束"</string>
    <string name="ContactMultiImportConfirmation">"将会导入这些联系人。"</string>
    <string name="import_sim_contacts_title">"导入联系人"</string>
    <string name="import_sim_contacts_message">"正在导入..."</string>
    <!-- Import from sim card -->
    <string name="import_finish">"导入完成"</string>
    <string name="import_stop">"导入停止"</string>
    <string name="too_many_contacts_add_to_group">联系人过多,应该少于<xliff:g id="count">%d</xliff:g></string>
    <string name="menu_export_database" msgid="2659719297530170820">"导出数据库文件"</string>
    <string name="action_menu_add_new_contact_button" msgid="3180222523336380017">"添加新联系人"</string>
    <string name="expanding_entry_card_view_see_more" msgid="3779194067124758079">"查看更多"</string>
Loading