下载之家:安全、高速、放心的绿色下载站!

当前位置:首页软件下载应用软件详细列表

butterknife插件 V6.1.0绿色版

  • 软件介绍
  • 下载地址
  • 同类推荐
  • 相关文章

butterknife插件绿色版是用于android开发中,对于较复杂的布局使用注解技术,可以提高代码编写效率,butterknife插件绿色版是一个很好用的开源框架,给大家提供的是butterknifejar包。

butterknife插件 v6.1.0绿色版

butterknife插件绿色版使用方法

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

butterknife插件 v6.1.0绿色版

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

butterknife插件 v6.1.0绿色版

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

butterknife插件 v6.1.0绿色版

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

butterknife插件 v6.1.0绿色版

刚是用注解,直接上代码。

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!");

}

}

这样就算完成了,就可以使用注解了。

点击查看更多: Android开发工具

下载声明

推荐使用[迅雷]下载,使用 [360压缩]解压本站软件。

本站提供的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。

本站提供的[butterknife插件 V6.1.0绿色版]资源来源互联网,版权归该下载资源的合法拥有者所有。