Skip to content

Instantly share code, notes, and snippets.

@root-ansh
Created June 2, 2019 23:40
Show Gist options
  • Save root-ansh/57abcc57378c1fc5b81fb21e35050f78 to your computer and use it in GitHub Desktop.
Save root-ansh/57abcc57378c1fc5b81fb21e35050f78 to your computer and use it in GitHub Desktop.
Camera basics:Delegating to system cam
public class MainActivity extends AppCompatActivity {
ImageView ivTemp;
Button btCallCameraThumbnail;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ivTemp = findViewById(R.id.iv_tmpcheck);
btCallCameraThumbnail = findViewById(R.id.bt_call_camera_thumbnail);
btCallCameraThumbnail.setOnClickListener(v -> callCameraForThumbnail());
}
private void callCameraForThumbnail() {
//todo
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment