博不如精

完美靠的是质量而非数量。世上的好东西时常小而难求,过多必无誉。只靠广博则难免成为平庸之辈,有所谓通才总想在学业上门门皆精,结果却常常是门门皆瘟。学业专攻必结硕果;若从事重要的事务,则必得美名。...

AndroidAnnotations——Enhance broadcastreceivers优化广播接收器

Enhance broadcastreceivers优化广播接收器

Since AndroidAnnotations 2.4


You can enhance an Android BroadcastReceiver with the @EReceiver annotation:
你可以使用@EReceiver 优化Android广播接收器:

@EReceiver
public class MyReceiver extends BroadcastReceiver {

}

You can then start using most AA annotations, except the ones related to views and extras:
然后,除了Views和extras相关的注解,你可以使用大多数AA的其他注解:

@EReceiver
public class MyReceiver extends BroadcastReceiver {

  @SystemService
  NotificationManager notificationManager;

  @Bean
  SomeObject someObject;
  
}
阅读更多
文章标签: AndroidAnnotation
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

AndroidAnnotations——Enhance broadcastreceivers优化广播接收器

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭