/*
* 函数介绍:从资源里获取交互界面的控件
* 输入参数:无
* 输出参数:无
* 返回值 :无
*/
private void findCtrlsFromID() {
Log.v(TAG, "findCtrlsFromID enter");
m_button_calc = (Button)findViewById(R.id.submit);
m_field_height = (EditText)findViewById(R.id.height);
m_field_weight = (EditText)findViewById(R.id.weight);
m_view_result = (TextView)findViewById(R.id.result);
m_view_suggest = (TextView)findViewById(R.id.suggest);
if ((null==m_button_calc) || (null==m_field_height) || (null==m_field_weight) || (null==m_view_result)
|| (null==m_view_suggest)) {
//如果要输出到一个ui_001.log运行期日志文件里,有实现的可能吗?
//这样的话,如果程序出了问题,让人将运行期log发回。
//有“findCtrlsFromID : pointer is null”的话,就可以推断出从资源里获取交互界面的控件失败了。
Log.v(TAG, "findCtrlsFromID : pointer is null");
}
Log.v(TAG, "findCtrlsFromID exit");
}
* 函数介绍:从资源里获取交互界面的控件
* 输入参数:无
* 输出参数:无
* 返回值 :无
*/
private void findCtrlsFromID() {
Log.v(TAG, "findCtrlsFromID enter");
m_button_calc = (Button)findViewById(R.id.submit);
m_field_height = (EditText)findViewById(R.id.height);
m_field_weight = (EditText)findViewById(R.id.weight);
m_view_result = (TextView)findViewById(R.id.result);
m_view_suggest = (TextView)findViewById(R.id.suggest);
if ((null==m_button_calc) || (null==m_field_height) || (null==m_field_weight) || (null==m_view_result)
|| (null==m_view_suggest)) {
//如果要输出到一个ui_001.log运行期日志文件里,有实现的可能吗?
//这样的话,如果程序出了问题,让人将运行期log发回。
//有“findCtrlsFromID : pointer is null”的话,就可以推断出从资源里获取交互界面的控件失败了。
Log.v(TAG, "findCtrlsFromID : pointer is null");
}
Log.v(TAG, "findCtrlsFromID exit");
}
解决方案 »
- 【100分求答案】问个关于notification和activity的小白问题,求指点
- 想学点JAVA搞安卓开发,有什么书推荐么
- android 同时把彩信和短信一起显示在列表里 就和系统自带的短信列表一样
- 如何在一个activity中实现多个listview
- 获取Activity的View
- 急!!求各位解释下 非常感谢
- 关于android手机显示文件名的时候 出现出错误的现象
- android如何在service中启动另一个service
- 请教下,GeoDiary2 那种浮动于activity上的ui怎么实现的
- Andorid 的模拟器,如何模拟双手触屏呢?
- android 背景突然变黑
- [求助]android下JNI串口通信问题!!!
就可以把log重定向到a.txt文件中