获取控件

@InjectView(R.id.image_show_password)ImageView image_show_password;

控件事件

@OnClick(R.id.btn_submit) void btn_submit(){
intent=new Intent(context, MobileValidation.class);
startActivity(intent); 
}

配置项目

选择项目属性

选择 Java Compiler->选择 anotaion processin 把Enable project specific settings 和Enableprocessing in editor打上对勾
在选择左侧菜单中的Factory Path AddJARs 选择当前项目中Butter Knife JAR文件

http://jakewharton.github.io/butterknife/ide-eclipse.html

如果在Java Compiler里面找不到 anotaion processin 说明没有安装插件

地址:http://download.eclipse.org/releases/juno

选择 

Butter Knife 使用方法的更多相关文章

  1. Android Studio & Butter Knife —— 快速开发

    Butter Knife是一个Android的注解框架,可以帮助用户快速完成视图.资源与对象的绑定,完成事件的监听.(也就是少写findViewById()) 具体的介绍可以参考官方主页: http: ...

  2. [轉]Android Libraries 介紹 - Butter knife

    原文地址 Butter Knife 簡介 Butter Knife - Field and method binding for Android views.助你簡化程式碼,方便閱讀. 使用方法 開發 ...

  3. Butter Knife使用详解

    Butter Knife Github地址: https://github.com/JakeWharton/butterknife 官方说明给出的解释是 Bind Android views and ...

  4. Android RoboGuice开源框架、Butter Knife开源框架浅析

    Google Guice on Android(RoboGuice) 今天介绍一下Google的这个开源框架RoboGuice, 它的作用跟之前讲过的Dagger框架差点儿是一样的,仅仅是Dagger ...

  5. android Butter Knife 使用详解

    Butter Knife github连接:https://github.com/JakeWharton/butterknife 本文使用的butterknife版本7.0.1 butterknife ...

  6. Butter Knife 黄油刀

    简介 Github:https://github.com/JakeWharton/butterknife  文档 特点: 采用注解的方式实现强大的View绑定和Click事件处理功能,简化代码,提升开 ...

  7. Butter Knife:一个安卓视图注入框架

    Butter Knife:一个安卓视图注入框架 2014年5月8日 星期四 14:52 官网: http://jakewharton.github.io/butterknife/ GitHub地址: ...

  8. Butter Knife

    Butter Knife,专门为Android View设计的绑定注解,专业解决各种findViewById. 简介 对一个成员变量使用@BindView注解,并传入一个View ID, Butter ...

  9. Android:Butter Knife 8.0.1配置

    github地址:https://github.com/GarsonZhang/butterknife Butter Knife Field and method binding for Androi ...

随机推荐

  1. webpack 搭建问题汇总

    总结一下遇到的问题: 1.这样的警告(The 'mode' option has not been set, webpack will fallback to 'production' for thi ...

  2. 【点击项目属性】Target runtime Apache Tomcat v7.0 is not defined

    这个项目是去年用同一个eclipse做的,但是今年原封不动导入的时候,确发现这个东西 tomcat选成我们本地的tomcat8就可以了 泼菲解决.

  3. oracle数据库经常提示27102 out of memory解决方法

    网上有很多解决方案,但是我一个也看不懂,不知道写的什么鬼的东西,为什么一句话就能解决的事,非得长篇大论说原理是什么,看得一脸懵逼 我的解决方法入戏 vi /etc/sysctl.conf 修改kern ...

  4. js中的eval函数另一种实现

    js中有一个函数eval可以一段文本改为js代码,本来使用eval也可以达到目的,但自己看了不少资料都不推荐使用eval函数,于是自己就在思考有没有不使用eval的方法?  其实需求很简单,就是把一个 ...

  5. xe5 android 控制蓝牙[转]

    用以下代码中的接口实现控制蓝牙的开.关及详细信息 unit Androidapi.JNI.BluetoothAdapter; // (c) RedTitan Technology 2013// JNI ...

  6. Nuke的色彩匹配节点思路

    大致思路是首先利用node.sample()自带采样功能对整个画面逐像素采 样,我把采样函数写的比较灵活,可以定义一个采样族,即把整个画面分成若干块,逐块采样,很大程度上减少了采样工作量,但相对精度会 ...

  7. linux(ubuntu)下安装phantomjs

    1.安装phantomjs ubuntu下sudo apt-get install phantomjs下载的不能用 —-下载程序文件 到官网下载 1.安装phantomjs —-下载程序文件 wget ...

  8. nodejs在后台运行

    安装forever npm install forever -g 使用 forever 启动 app forever start app.js 启动app并输出日志 forever start -l ...

  9. 最新证明面临质疑:P/NP问题为什么这么难?

    转自:http://tech.sina.com.cn/d/2017-08-16/doc-ifyixias1432604.shtml 编译 | 张林峰(普林斯顿大学应用数学专业博士研究生) 责编 | 陈 ...

  10. C#中数据库事务、存储过程基本用法

    SQL 事务 public bool UpdateQsRegisterSql(List<string> ids, int newQueueId, string newQueueName) ...