解决方案 »
- 为啥build完Android源代码,硬盘占用这么大?
- android AVD打不开的问题
- 修改了drawable里png文件,但是手机运行还是显示旧的图标。
- 通过httpurlconnection获取服务器端的inputstream为什么会是空的呢
- 求助:怎样是ImageSwitcher加载远程图片
- android开发中,怎么在Button控件中触发menu事件?
- 按钮无法显示。。请教。。
- 关于Android中使用UDP
- 如何从Surface得到ISurfaceTexture
- 简单的BaseAdapter问题
- AcitivityGroup中Activity跳转出现闪屏
- Java中如何通过反射获取 T 类型
getSupportFragmentManager().beginTransaction()
.add(R.id.container, new PlaceholderFragment()).commit();
}这句话后面findViewById会报错?
textView = (TextView) this.findViewById(R.id.textView1);
progressBar = (ProgressBar) this.findViewById(R.id.progressBar);
editText = (EditText) this.findViewById(R.id.editText);
// button.setOnClickListener(this);
System.out.println(editText.getText().toString().trim());
false);这里写
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;
}
}
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container,
false);
TextView textView = (TextView) rootView
.findViewById(R.id.section_label);
textView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));