Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
/cameraviewPublic archive

[DEPRECATED] Easily integrate Camera features into your Android app

License

NotificationsYou must be signed in to change notification settings

google/cameraview

CameraView is deprecated. No more development will be taking place.

UseJetpack CameraX instead.

CameraView

This is not an official Google product.

CameraView aims to help Android developers easily integrate Camera features.

Requires API Level 9. The library uses Camera 1 API on API Level 9-20 and Camera2 on 21 and above.

API LevelCamera APIPreview View
9-13Camera1SurfaceView
14-20Camera1TextureView
21-23Camera2TextureView
24Camera2SurfaceView

Features

  • Camera preview by placing it in a layout XML (and calling the start method)
  • Configuration by attributes
    • Aspect ratio (app:aspectRatio)
    • Auto-focus (app:autoFocus)
    • Flash (app:flash)

Usage

<com.google.android.cameraview.CameraViewandroid:id="@+id/camera"android:layout_width="match_parent"android:layout_height="wrap_content"android:keepScreenOn="true"android:adjustViewBounds="true"app:autoFocus="true"app:aspectRatio="4:3"app:facing="back"app:flash="auto"/>
@OverrideprotectedvoidonResume() {super.onResume();mCameraView.start();    }@OverrideprotectedvoidonPause() {mCameraView.stop();super.onPause();    }

You can see a complete usage in the demo app.

Contribution

SeeCONTRIBUTING.md.

About

[DEPRECATED] Easily integrate Camera features into your Android app

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp