diff options
author | Aravind Asam <aasam@codeaurora.org> | 2014-02-26 17:54:28 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-18 13:52:40 -0700 |
commit | fc23910577c0fc7512dcd8092ef172f6e9ee119e (patch) | |
tree | 2fefac40b3553f1ea590a704ee7e1e8bcc21dd95 /res | |
parent | 01d8d3561efa4b93d3d7d92d0e5d9019e7954b92 (diff) | |
download | android_packages_apps_Calendar-fc23910577c0fc7512dcd8092ef172f6e9ee119e.tar.gz android_packages_apps_Calendar-fc23910577c0fc7512dcd8092ef172f6e9ee119e.tar.bz2 android_packages_apps_Calendar-fc23910577c0fc7512dcd8092ef172f6e9ee119e.zip |
Support for deleting calendar events
First version. Includes support for deleting some or all events. Updates for comments..
Change-Id: Id61ce184396f3c1e084de68ab082b056378a537a
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/event_list_item.xml | 74 | ||||
-rw-r--r-- | res/menu/all_in_one_title_bar.xml | 10 | ||||
-rw-r--r-- | res/menu/delete_events_title_bar.xml | 47 | ||||
-rw-r--r-- | res/values/cm_strings.xml | 12 |
4 files changed, 141 insertions, 2 deletions
diff --git a/res/layout/event_list_item.xml b/res/layout/event_list_item.xml new file mode 100644 index 00000000..b9782341 --- /dev/null +++ b/res/layout/event_list_item.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (c) 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 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="match_parent" + android:layout_height="match_parent" > + + <CheckBox + android:id="@+id/checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:clickable="false" + android:focusable="false" > + </CheckBox> + + <TextView + android:id="@+id/event_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_toRightOf="@id/checkbox" + android:focusable="false" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textStyle="bold" > + </TextView> + + <TextView + android:id="@+id/event_time" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/event_title" + android:layout_toRightOf="@id/checkbox" + android:focusable="false" > + </TextView> + + <TextView + android:id="@+id/calendar_account" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/event_time" + android:layout_toRightOf="@id/checkbox" + android:focusable="false" > + </TextView> + +</RelativeLayout> diff --git a/res/menu/all_in_one_title_bar.xml b/res/menu/all_in_one_title_bar.xml index ad3598b2..3e658705 100644 --- a/res/menu/all_in_one_title_bar.xml +++ b/res/menu/all_in_one_title_bar.xml @@ -47,16 +47,22 @@ android:imeOptions="actionSearch" android:orderInCategory="4" /> <item + android:id="@+id/action_delete_events" + android:alphabeticShortcut="d" + android:title="@string/events_delete" + android:showAsAction="never" + android:orderInCategory="5" /> + <item android:id="@+id/action_select_visible_calendars" android:title="@string/menu_select_visible_calendars" android:icon="@drawable/ic_menu_select_visible_calendars_holo_light" android:showAsAction="never" - android:orderInCategory="5" /> + android:orderInCategory="6" /> <item android:id="@+id/action_settings" android:alphabeticShortcut="s" android:title="@string/menu_preferences" android:icon="@drawable/ic_menu_settings_holo_light" android:showAsAction="never" - android:orderInCategory="10" /> + android:orderInCategory="7" /> </menu> diff --git a/res/menu/delete_events_title_bar.xml b/res/menu/delete_events_title_bar.xml new file mode 100644 index 00000000..2ee9762a --- /dev/null +++ b/res/menu/delete_events_title_bar.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (c) 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 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. +--> + +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/action_delete" + android:icon="@drawable/ic_menu_trash_holo_light" + android:showAsAction="always|withText" + android:title="@string/action_delete" + android:visible="true"> + </item> + <item + android:id="@+id/action_select_all" + android:showAsAction="never" + android:title="@string/action_select_all"> + </item> + +</menu> + diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index dda2a801..7ba89664 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -31,4 +31,16 @@ <!-- Label values for the default start page preference. --> <string name="default_start_title">Default view</string> <string name="default_start_last">Previously used view</string> + + <!-- Delete Events related --> + <string name="events_delete">Delete events</string> + <string name="action_select_all">Select all</string> + <string name="action_delete">Delete</string> + <string name="all_events">All events</string> + <string name="no_events">No events available</string> + <string name="selected">selected</string> + <string name="evt_del_dlg_title">Delete Events?</string> + <string name="evt_del_dlg_msg_selected">Selected events will be deleted</string> + <string name="evt_del_dlg_msg_all">All events will be deleted</string> + <string name="no_events_selected">No events selected</string> </resources> |