Android中的AndroidAnnotations
来源:互联网 发布:网络接口都有哪些 编辑:程序博客网 时间:2024/03/28 23:24
1、简介:是一个利用注解方式来简化代码结构,提高开发效率的开源框架,类似开源框架还有:roboguice 、butterknife 、dagger 等,该代码是一个第三方框架,通过注释来开发应用,使用Android Annotations能够大大减少代码量。
2、一些常用注释的使用方法:
@AfterInject 定义的方法在类的构造方法执行后执行
@AfterTextChange定义的方法在TextView及其子类的Text属性改变后执行
@AfterViews 定义的方法在setContentView后执行
@Background 定义的方法在后台线程执行
@BeforeTextChange 定义的方法在TextView及其子类的Text属性改变前执行
@Click 定义点击监听器
@EActivity 在Activity中启用Annotations
@EProvider 在 ContentProvider中启用Annotations
@EReceive 在BroadcastReceiver中启用Annotations
@EService 在Service中启用Annotations
@EView 在自定义的View的子类中启用Annotations
@Fullscreen 全屏
@NoTitle 无标题栏
3、eclipse的配置:http://jingyan.baidu.com/article/5552ef47c25fea518ffbc9e9.html
4、AvailableAnnotations
Enhanced components
@EActivity
@EApplication
@EBean
@EFragment
@EProvider
@EReceiver
@EIntentService
@EService
@EView
@EViewGroup
Injection
@AfterExtras
@AfterInject
@AfterViews
@App
@Bean
@Extra
@FragmentArg
@FragmentById
@FragmentByTag
@FromHtml
@HttpsClient
@NonConfigurationInstance
@RootContext
@SystemService
@ViewById
@ViewsById
Event binding
@TextChange
@AfterTextChange
@BeforeTextChange
@EditorAction
@FocusChange
@CheckedChange
@Touch
@Click
@LongClick
@ItemClick
@ItemLongClick
@ItemSelect
@OptionsItem
@SeekBarProgressChange
@SeekBarTouchStart
@SeekBarTouchStop
Threading
@Background
@UiThread
@SupposeBackground
@SupposeUiThread
Misc
@InstanceState
@WindowFeature
@Fullscreen
@NoTitle
@CustomTitle
@OptionsMenu
@OptionsMenuItem
@OrmLiteDao
@RoboGuice
@Trace
@Transactional
@OnActivityResult
@OnActivityResult.Extra
@HierarchyViewerSupport
@ServiceAction
@Receiver
@ReceiverAction
@ReceiverAction.Extra
@IgnoredWhenDetached
@WakeLock
Resource injection
@StringRes
@AnimationRes
@ColorRes
@DimensionPixelOffsetRes
@DimensionPixelSizeRes
@DimensionRes
@BooleanRes
@ColorStateListRes
@DrawableRes
@IntArrayRes
@IntegerRes
@LayoutRes
@MovieRes
@StringArrayRes
@TextArrayRes
@TextRes
@HtmlRes
Rest API
@Rest
@RestService
@Get
@Post
@Put
@Delete
@Options
@Head
@Accept
@RequiresHeader
@RequiresCookie
@RequiresCookieInUrl
@RequiresAuthentication
@SetsCookie
@RequiresCookieInUrl
Typesafe SharedPreferences
@DefaultBoolean
@DefaultFloat
@DefaultInt
@DefaultLong
@DefaultString
@DefaultStringSet
@DefaultRes
@Pref
@SharedPref 介绍到此,用到了再详细看他的文档。
- Android中的AndroidAnnotations
- android 框架androidannotations在Eclipse中的配置
- android 框架androidannotations在Eclipse中的配置
- AndroidAnnotations在Android Studio中的配置
- 注解工具Androidannotations在Android-studio中的配置
- androidannotations中的注解大全
- android androidannotations 使用配置
- android studio配置AndroidAnnotations
- Android Studio配置AndroidAnnotations
- AndroidAnnotations 框架写Android
- Android Studio 配置 AndroidAnnotations
- Android Studio 配置 AndroidAnnotations
- Android Studio 配置 androidannotations
- android studio配置AndroidAnnotations
- android 使用框架androidannotations
- Android框架------------------AndroidAnnotations
- Android Studio配置AndroidAnnotations
- Android Studio 添加AndroidAnnotations
- Could not launch “XXXX” process launch failed: Security
- lnux 的信号
- “移动互联网+”第一股 正益移动登陆新三板
- linux nfs文件挂载模拟云存储
- 百度地图定位v6.1.3--1.官方demo实践分析
- Android中的AndroidAnnotations
- c#自定义控件
- 扣丁学堂——AlarmManager
- 关于setsid() 函数的说明
- 山东省第六届蓝桥杯 ///标题:奖券数目//c/c++组
- Volley JsonObjectRequest 获取json字符串乱码
- 解析检测先锋之气体传感器的技术应用
- Java 开发必会的 Linux 命令
- 为了取消老毛桃的主页设置而发的博客,没有用,不要点开