赵城藏软件站:安全、绿色、放心的软件下载站 首页|软件发布|专题集合|站内导航

butterknife插件 v6.1.0官方版

官方
  • 大小:44KB
  • 评分:💗💗💗
  • 语言:简体中文
  • 类别:其它插件
  • 授权:免费版
  • 插件情况:无插件请放心使用
  • 软件官网:未知官网
  • 平台:WinXP, Win7, WinAll
  • 备案号:
  • 更新日期:2022-03-24 19:13:03
  • 软件厂商:
安全检测:

网友评分:10

好评10 差评0
软件介绍 人气软件 相关文章 下载地址 用户评论

 

butterknife插件是用于android开发中,对于较复杂的布局使用注解技术,可以提高代码编写效率,是一个很好用的开源框架,给大家提供的是butterknifejar包,有需要的赶快下载吧!

butterknife插件

使用方法

把下载下来的jar包,放到项目的libs下,就会自动导入项目了。

butterknife.jar下载

配置eclips,鼠标对准需要注解的项目,单击右键 poperties –>java Compiler –>

butterknife插件

Annotation Procession –> 钩一下 Enable project specific settings 其它的就会自动钩上了

butterknife.jar下载

–> Factory Path ( 钩一下Enable project specific settings )–> 最后Add …. JARs 把刚刚下载的jar包来。这样eclips配置就可以了。

butterknife插件

刚是用注解,直接上代码。
xml部分
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/tv_test"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</RelativeLayout>
java部分
package com.msquirrel.main;
import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
import android.os.Bundle;
import android.app.Activity;
import android.widget.TextView;
public class MainActivity extends Activity {
@InjectView(R.id.tv_test)
TextView tvTest;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.inject(this);
tvTest.setText("test");
}
@OnClick(R.id.tv_test)
public void sayHi() {
tvTest.setText("Hello!");
}
}
这样就算完成了,就可以使用注解了。

下载地址

butterknife插件 v6.1.0官方版

下载地址:

  • 通用网络下载
  • 通用网络下载
有问题?不能下载,

部分文件为zip、rar等压缩格式,请下载360压缩进行解压

用户评论
所有评论
昵称:
(您的评论需要经过审核才能显示)