Add widget to email2.

Change-Id: I66bbee2bc5317837d625b1acc037b75056cfc277
This commit is contained in:
Mindy Pereira 2012-03-05 17:21:11 -08:00
parent 27282ed34a
commit 70470c9a01
4 changed files with 107 additions and 0 deletions

View File

@ -46,6 +46,19 @@
</intent-filter>
</activity>
<activity android:name=".ui.CreateShortcutActivity"
android:label="@string/activity_folder_selection" />
<activity android:name=".ui.FolderSelectionActivity"
android:label="@string/activity_folder_selection" />
<activity android:name="com.android.email2.ui.MailboxSelectionActivityEmail"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<provider
android:authorities="com.android.email2.conversation.provider"
android:label="@string/conversation_content_provider"
@ -69,6 +82,21 @@
</receiver>
<service android:name=".compose.EmptyService"/>
<!-- Widget -->
<receiver android:name=".widget.WidgetProvider" android:label="@string/app_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.gm.intent.ACTION_NOTIFY_DATASET_CHANGED" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/widget_info" />
</receiver>
<service android:name=".widget.WidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS"
android:exported="false" />
</application>
</manifest>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 Google Inc.
Licensed to 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.
-->
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="220dp"
android:minHeight="220dp"
android:updatePeriodMillis="0"
android:previewImage="@drawable/mail_widget_preview"
android:initialLayout="@layout/widget"
android:configure="com.android.email2.ui.MailboxSelectionActivityEmail"
android:resizeMode="horizontal|vertical">
</appwidget-provider>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 Google Inc.
Licensed to 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.
-->
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="180dp"
android:minHeight="180dp"
android:minResizeWidth="180dp"
android:minResizeHeight="110dp"
android:updatePeriodMillis="0"
android:previewImage="@drawable/mail_widget_preview"
android:initialLayout="@layout/widget"
android:configure="com.android.email2.ui.MailboxSelectionActivityEmail"
android:resizeMode="horizontal|vertical">
</appwidget-provider>

View File

@ -0,0 +1,23 @@
/*
* Copyright (C) 2012 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.
*/
package com.android.email2.ui;
/* An activity that shows the list of all the available accounts and return the
* one selected in onResult().
*/
public class MailboxSelectionActivityEmail extends com.android.mail.ui.MailboxSelectionActivity {
}