13一
归类于心情日志
14 条评论
很多事情。
什么都不想说。
安静的,忧伤的。
什么都别说,我害怕白名单。
再见google。
再见。
晚上一个人自习,好好的安静的思考一下。
生活还在继续。
ps : I do not want to use Baidu.
207 views gone, google, web, 伤感
15十
归类于程序人生
参与评论
今天搞了搞按钮~最最基本的android算是入门了一点点了。。。
自身状态还不是很好,工作效率太低阿。。。
先上xml文件
1
2
3
4
5
6
7
8
9
10
| <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView android:text="@+id/TextView01" android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
<Button android:text="@+id/Button01" android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
</LinearLayout> |
然后是源代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| package com.zerob13.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.*;
public class helloandroid extends Activity {
/** Called when the activity is first created. */
private TextView mTextView1;
private Button mb;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mTextView1=(TextView)findViewById(R.id.TextView01);
String kk="Keep Balance";
mTextView1.setText(kk);
mb=(Button)findViewById(R.id.Button01);
String k="push me";
mb.setText(k);
mb.setOnClickListener(new Button.OnClickListener()
{
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
mTextView1.setText("nice going");
}
});
}
} |
140 views Android, button, google, helloworld, java, sdk, text, 开发