为什么EditText得不到输入的字符串? EditTex,NullPointerException 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 但是在虚拟手机上输入了 /sdcard/xxx.txt 到 et_path。以前这么写很多次,也没出错。 将对et_path的处理放到Fragment的OnCreateView里。 你是指放到这个onCreateView里?public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_main, container, false); return rootView; } } 嗯@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {View rootView = inflater.inflate(R.layout.fragment_main, container,false);et_path = (EditText)rootView.findViewById(R.id.et_path);/*对et_path的各种处理*/return rootView;} 非常感谢!更新之后,自动产生了一堆代码!看来有点out了。 【原创】CDMA基站定位获取经纬度 如何拦截关屏事件、阻止关屏? Activity中用Button控件 调用 自定义 的GameView类中函数不响应。 在android中我安装了某apk,然后我把它给卸载掉。在程序中用说明可以知道该apk不在了呢? android开发 android手机软件开发 获得当前手机屏幕的View,求助。 ScrollView中放入listview和achartengine,图形无法展现 viewpager中的各个fragment怎么进行通信 界面刷新 关于viewpager和ontouch的滑动冲突,望大神给个完美解决方案 android jpeg2000编解码
public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() {
} @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container,
false);
return rootView;
}
}
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container,
false);
et_path = (EditText)rootView.findViewById(R.id.et_path);/*对et_path的各种处理*/return rootView;
}
更新之后,自动产生了一堆代码!
看来有点out了。