Comments (4)
Hello! Thanks for applying this issue.
Feature looks really useful so I am going to handle it. I need time to check some other ways of implementing this functionality. For example maybe it will be better to create new Mode
instead of directly calling, let's say startRecord()
and stopRecord()
.
from camerabutton.
Added in version 2.0.0. Thanks!
from camerabutton.
Hi @hluhovskyi Thanks for this...but I was unable to figure out how to handle this..
If I set Mode to 2, the tap/click does not fire the onVideoListener..if I set to 0, then onPhotoListener is fired on tap..but I am unable to get the progress animation
from camerabutton.
You should also set cb_collapse_action="click"
.
By default this property is set to release
and it means when user clicks/taps on button it immediately collapses (cause click also includes release action in the end). In case if you use action click
it starts collapse right after user clicks again on the button.
You should have something like this in your xml:
<com.hluhovskyi.camerabutton.CameraButton
android:id="@+id/camera_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cb_collapse_action="click"
app:cb_mode="video" />
Or via code:
button.setMode(CameraButton.Mode.VIDEO)
button.setCollapseAction(CameraButton.Action.CLICK)
By the way, thanks a lot for bringing up the problem with visibility of Mode
and Action
. You should use Mode.VIDEO
rather than raw value 2. Version 2.0.1 will be available via maven soon.
from camerabutton.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camerabutton.