已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 手机 > 安卓

标题: 开发调试logcat

作者: @Ta

时间: 2013-04-08

点击: 1153


(文件1)新建文本文档.txt
importandroid.app.Activity; importandroid.os.Bundle; importandroid.util.Log; importandroid.widget.Button; importandroid.widget.EditText; importandroid.widget.TextView; importandroid.util.Log;  public class RelativeLayout extends Activity {  final static String TAG = "LOGCAT";  privateTextViewtv = null;  privateEditText et = null;  private Button btn1 = null;  private Button btn2 = null;     @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tv = (TextView)findViewById(R.id.label); et = (EditText)findViewById(R.id.entry);         btn1 = (Button)findViewById(R.id.cancel);         btn2 = (Button)findViewById(R.id.ok); tv.setText(R.string.name); btn1.setText(R.string.button1); btn2.setText(R.string.button2);  Log.v(TAG, "This is Verbose"); Log.d(TAG, "This is Debug"); Log.i(TAG, "This is Info"); Log.w(TAG, "This is Warn"); Log.e(TAG, "This is Error");     } } 

[隐藏样式|查看源码]


『回复列表(1|隐藏机器人聊天)』

1.
(图片1)1.jpg
(图片2)2.jpg
(图片3)3.jpg
(/@Ta/2013-04-08 21:16//)

回复需要登录

9月19日 23:17 星期五

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1