为什么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了。 如何导出一个已安装的APK Android软件自我静默卸载 eclipse作出的android app怎么变成apk 关于使用游标操作数据 android程序发布后,如何在手机中写入错误日志 android开发板 U 盘能识别到但是没有盘符显示 请大神看看这个问题怎么解决? android 初学者 android有什么库可以画股市的实时走势和趋势图 Android 通话录音设置问题 关于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了。