基本操作
写文本
View view = this.findViewById(R.id.id_hello);
TextView hello = (TextView) view;
hello.setText("你好");
findViewById() 从界面中寻找控件,返回目标控件
所有的控件都是View类型, TextView继承于View
将目标控件转为 TextView 类型
TextView hello = (TextView) findViewById(R.id.id_hello);
hello.setText("阿发你好");
修改布局 layout,添加其他控件,和java都类似,参考android api 这里略过