Android 动态添加控件
相机源码中 VideoCamera.java:
ViewGroup rootView = (ViewGroup) findViewById(R.id.video_camera);
LayoutInflater inflater = this.getLayoutInflater();
View controlBar = inflater.inflate(
R.layout.attach_camera_control, rootView);
controlBar.findViewById(R.id.btn_cancel).setOnClickListener(this);
ImageView retake =
(ImageView) controlBar.findViewById(R.id.btn_retake);
最后更新:2017-04-03 18:52:05