AndroidAnnotations——Enhance contentproviders优化ContentProvider
2014-04-06 15:39
357 查看
Enhance contentproviders优化ContentProvider
Since AndroidAnnotations 2.4You can enhance an Android Content Provider with the
@EProviderannotation:
你可以使用
@EProvider
优化Android Content Provider:
@EProviderpublic class MyContentProvider extends ContentProvider { }
You can then start using most AA annotations, except the ones related to views and extras:
然后,除了Views和extras相关的注解,你可以使用大多数AA的其他注解:
@EProvider public class MyContentProvider extends ContentProvider { @SystemService NotificationManager notificationManager; @Bean MyEnhancedDatastore datastore; @UiThread void showToast() { Toast.makeText(getContext().getApplicationContext(), "Hello World!", Toast.LENGTH_LONG).show(); } // ... }
相关文章推荐
- AndroidAnnotations——Enhance contentproviders优化ContentProvider
- AndroidAnnotations——Enhance broadcastreceivers优化广播接收器
- AndroidAnnotations——Enhance custom classes 优化自定义类
- AndroidAnnotations——Enhance custom views 优化自定义组件
- AndroidAnnotations——Enhance custom views 优化自定义组件
- android contentResolver与contentProvider如何关联在一起的
- Android实训案例(五)——四大组件之一ContentProvider的使用,通讯录的实现以及ListView的优化
- android之ContentResolver与ContentProvider介绍
- android in practice_Using standard ContentProviders(AutoForm)
- Android之Content Providers
- android之ContentResolver与ContentProvider
- AndroidAnnotations——Enhance Fragments 优化Fragments
- Android实训案例(五)——四大组件之一ContentProvider的使用,通讯录的实现以及ListView的优化
- Android ContentProvider和getContentResolver
- Android实训案例(五)——四大组件之一ContentProvider的使用,通讯录的实现以及ListView的优化
- android之contentProvider的使用以及为其添加观察者(ContentObserver)
- Android ContentProvider和ContentObserver 监控数据库变化 简单使用说明
- Android基础 : Android ContentProvider和getContentResolver
- 【Android ContentProvider 一】关于ContactsContract.CommonDataKinds.Phone.CONTENT_URI的一点理解
- android之ContentResolver与ContentProvider