我的布局中有 FloatingActionButton :
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="capture"/>
我想在用户点击此按钮时将图像从相机上传到 Parse.com 服务器。
编辑:
我找到了答案:
答案 0 :(得分:2)
对于此解决方法,您需要一台在后台运行的摄像头。在相机上你的所有视图都会调整。当您单击FAB时,您从相机调用捕获,然后您将进行预览。
有许多自定义相机和捕捉图像的例子。
相机示例
现在将其上传到服务器上。
注意: