File tree Expand file tree Collapse file tree 3 files changed +18
-12
lines changed
java/com/chinaztt/fda/test Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ android {
9
9
minSdkVersion 15
10
10
targetSdkVersion 22
11
11
versionCode 4
12
- versionName " 1.1.1 "
12
+ versionName " 1.1.2 "
13
13
}
14
14
buildTypes {
15
15
release {
Original file line number Diff line number Diff line change 7
7
import com .chinaztt .fda .ui .R ;
8
8
import com .chinaztt .fda .ui .base .BaseActivity ;
9
9
10
+ import org .androidannotations .annotations .AfterInject ;
11
+ import org .androidannotations .annotations .AfterViews ;
12
+ import org .androidannotations .annotations .Click ;
10
13
import org .androidannotations .annotations .EActivity ;
14
+ import org .androidannotations .annotations .ViewById ;
11
15
12
16
13
17
/**
19
23
* QQ: 781931404
20
24
* 公司:江苏中天科技软件技术有限公司
21
25
*/
22
-
23
26
@ EActivity (R .layout .dragger_inject_layout )
24
27
public class AnnotationsTestActivity extends BaseActivity {
25
- private Button btn_show ;
26
- private TextView tv_show ;
28
+ @ ViewById
29
+ Button btn_show ;
30
+ @ ViewById
31
+ TextView tv_show ;
27
32
@ Override
28
33
protected void onCreate (Bundle savedInstanceState ) {
29
34
super .onCreate (savedInstanceState );
30
35
setContentView (R .layout .dragger_inject_layout );
31
- btn_show =( Button ) this . findViewById ( R . id . btn_show );
32
- tv_show =( TextView ) this . findViewById ( R .id .tv_show );
33
- btn_show . setOnClickListener ( new View . OnClickListener () {
34
- @ Override
35
- public void onClick ( View v ) {
36
+ }
37
+ @ Click ( R .id .btn_show )
38
+ public void btnShowClick () {
39
+ tv_show . setText ( "按钮被点击了..." );
40
+ }
36
41
37
- }
38
- });
42
+ @ AfterViews
43
+ public void setTv_show (){
44
+ tv_show .setText ("我已经被注入啦..." );
39
45
}
40
46
}
Original file line number Diff line number Diff line change 19
19
android : id =" @+id/btn_show"
20
20
android : layout_width =" wrap_content"
21
21
android : layout_height =" wrap_content"
22
- android : text =" 点击显示数据 " />
22
+ android : text =" 按钮点击 " />
23
23
<TextView
24
24
android : id =" @+id/tv_show"
25
25
android : layout_margin =" 5dp"
You can’t perform that action at this time.
0 commit comments