Add widget to email2.
Change-Id: I66bbee2bc5317837d625b1acc037b75056cfc277
This commit is contained in:
parent
27282ed34a
commit
70470c9a01
@ -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>
|
||||
|
27
email2/res/xml-sw600dp/widget_info.xml
Normal file
27
email2/res/xml-sw600dp/widget_info.xml
Normal 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>
|
29
email2/res/xml/widget_info.xml
Normal file
29
email2/res/xml/widget_info.xml
Normal 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>
|
@ -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 {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user