获取控件

@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. 实现tail

    编程之路刚刚开始,错误难免,希望大家能够指出. 自己实现一个tail的功能(使用IO系统调用),完全类似的操作步骤就不实现了,主要是让自己加深了解. 下面的代码不足之处很多,以后有空改正. #incl ...

  2. JSP中页面向Action传递参数的几种方式

    <form name="ThisForm" method="POST" action="index.jsp"> form是表单, ...

  3. opencv人脸识别代码

    opencv人脸识别C++代码 /* * Copyright (c) 2011,2012. Philipp Wagner <bytefish[at]gmx[dot]de>. * Relea ...

  4. ADB连接手机的两种方式(usb数据线连接和wifi连接)

    ADB(Android Debug Bridge)安卓测试桥,它是连接电脑开发端和安卓设备的桥梁,这个安卓设备可以是真实的安卓手机或者平板,也可以是虚拟的安卓模拟器,   这里介绍ADB连接手机的两种 ...

  5. First 1

    一,Python介绍 1,python的出生与应用 python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆(中文名字:龟叔)为了在阿姆斯特丹打 ...

  6. 单节点 Elasticsearch 出现 unassigned shards 原因及解决办法

    根本原因: 是因为集群存在没有启用的副本分片,我们先来看一下官网给出的副本分片的介绍: 副本分片的主要目的就是为了故障转移,正如在 集群内的原理 中讨论的:如果持有主分片的节点挂掉了,一个副本分片就会 ...

  7. 弱网测试—Network-Emulator-Toolkit工具

    参考别人网址:http://blog.csdn.net/no1mwb/article/details/53638681 弱网测试,属于健壮性测试:怎么样去做弱网测试呢? 一.安装弱网测试工具-Netw ...

  8. Jmeter--报错 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

    今天要用Jmeter测试服务器性能,发现GUI界面总是有warning提示: WARNING: Could not open/create prefs root node Software\JavaS ...

  9. JMeter ----与WebDriver安装与测试

    JMeter ----与WebDriver安装与测试 主要内容 JMeter安装 WebDriver安装 一个简单的JMeter+WebDriver示例 环境与参考 jvm版本: 1.8.0_65 j ...

  10. 微信小程序学习之for循环

    一.使用自定义创建的json数据 1. 创建微信小程序项目后 在wxml文件中增加for循环 <block wx:for="{{posts_key}}" wx:for-ite ...