简体   繁体   English

安卓相机应用

[英]android camera app

I am trying to build a camera app. 我正在尝试构建相机应用程序。 in the first activity user can see the camera preview when user hits the takepic button it goes to the next activity with bitmap data. 在第一个活动中,当用户单击“拍摄”按钮时,用户可以看到相机预览,然后转到带有位图数据的下一个活动。 In the second activity, user can see the image view of what they just take and if they like it there is button like and once it gets pushed the pic gets saved or there is button dislike when being pushed it goes to previous activity to retake a pic.Anybody can give me a bit advice how to build that app. 在第二个活动中,用户可以看到他们刚刚拍摄的图像视图,如果喜欢,可以看到一个按钮,一旦按下该按钮,该图片将被保存,或者在按下按钮时不喜欢该按钮,则转到上一个活动以重新获取pic。任何人都可以给我一些有关如何构建该应用程序的建议。 Thank you. 谢谢。

It is much easier if your follow the tutorial here. 如果您按照此处教程进行操作,则要容易得多

Note that instead of passing the bitmap object to the next activity, save it to a temporary location and pass the path of the created file in the intent. 请注意,不要将位图对象传递到下一个活动,而是将其保存到一个临时位置,并在意图中传递所创建文件的路径。 If the user dislikes the image, delete the temp image and call finish() to go back to the picture capturing activity. 如果用户不喜欢该图像,请删除临时图像并调用finish()返回到图片捕获活动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM