赞
踩
activity
TextView text1 = findViewById(R.id.text1); //选择视频 TextView text2 = findViewById(R.id.text2); //拍摄视频 imageview = findViewById(R.id.image); //展示选择的视频的第一帧 text1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setType("video/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(intent, 2); } }); text2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { video(); } });
跳转去拍摄视频 限制拍15秒
private void video() {
push_mp3 = true;
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。