我的计划是这样的添加一个TextView到的TableRow
`
public class InfoWifiActivity<Intent> extends Activity {
TableRow tr;
TextView temp;
public void onCreate(Bundle savedInstanceState) {
wifi.startScan();
tr = new TableRow(this);
temp = new TextView(this);
IntentFilter i = new IntentFilter();
i.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
registerReceiver(new BroadcastReceiver(){
@Override
public void onReceive(Context context,
android.content.Intent intent) {
temp.setText("SSID");
temp.setPadding(0,0,3,0);
tr.addView(temp);
}
}
}, i);
}
}
`
但它一直FC当谈到tr.addView(临时);
任何人都可以帮助我吗?在此先感谢。
logcat中的消息说什么时它强制关闭什么? – FoamyGuy
它没有模拟器上的错误,因为它不具有wifi数据。只有在我的移动设备上,它保持fc –
那么logcat输出在移动设备强制关闭时会显示什么? – FoamyGuy