i need to know if there is a possibility to put a camera (with ACTION_IMAGE_CAPTURE) in a Activity splitted in two part , in the top the camera , and in a buttom part a listview of the captured images.
I'm sorry if this question is simple or stupid, but i'm new in the Android programming.
Thx Alessandro
As far as I understand you are trying to launch the external camera app with a intent, using ACTION_IMAGE_CAPTURE.
So, no its not possible to style/modify another activity/app.
Related
My first android app I'm creating, a text based game. Everything is looking great so far with functionality. I'm just wondering 2 things, one, is there a way to control how the new activity opens in the screen (new activities open from the center of the screen on my app, takes about a half second), and second, its it better to have each button pressed choice open a new activity or is there a better way to clear the screen and use the if and else commands in java.
I think as for the first part, you may want to use animation on transition between activities/fragments.
You do want to read more about fragments as i think it will solve your second question.
Check this small tutorial for the animation part.
Check docs for fragments.
Good luck.
I'm trying to writing an app that can help me to control my screen.
For example,I can press a button,and my android phone can help me to slide from left to right by itself.
Please refer to the picture as below.
I saw some of the Transfer beads Game Cheat MAYBE use this method to control the screen slide automatically, but actually I don't know how it does.
For another example, refer form the following video. In this video,he made the phone slide the screen by itself. What I want to do is as same as his work. =)
https://youtu.be/a5quGThvjT4
Thank you all in advance!
As it figured out the OP needs a drag/drop on the same screen for his problem and not swiping between activities or fragments:
The keyword is "android drag and drop": https://developer.android.com/guide/topics/ui/drag-drop.html
This question already has an answer here:
Custom camera android
(1 answer)
Closed 8 years ago.
There is an application made by another developer and I need to continue it. It has an activity with a button that calls the default camera app as an intent with startActivityForResult. It works ok when they take only one picture per app session. But now the client wants to be able to take various photos from different position of the place and then upload them all to the web server. So I need another way to do that, faster than opening the camera app for every picture.
For this I wish to load the camera directly in my activity, place a 'shoot' button, a label with the number of pictures taken, an imageView with the last image saved, and a button to finish. As an example I show you this printed screen from Internet.
The idea is to save a picture on every button click, and save the file names in an array.
How can I use the camera this way and control it with a custom button?
I also try to control the camera and I am using this link
I hope it is useful for you. It has helped me to fix several bugs
I'm fairly new to Android programming and I've got this project I need to finish and I'm currently stuck.
I've got a standard listview in a Menu class with an array containing around 20 different elements. So what I want to do is load images in an imageview depending on which item in the listview I click, and since I'm a beginner the only idea I had was to make a new activity for each imageview which seems like a pretty bad way to do it since I'd need about 20-30 new activities..
To sum things up what I want is:
Code for making ONE activity that will display a different image depending on which item in the listview I click, probably pretty basic coding I want as simple solution as possible.
If possible I'm also looking for a solution that includes an SQLite database that stores the URL of an image and then display it in a single activity, also depending on which item I press in my current listview.
(I hope you understand my needs, and if you need I can also post my current code for the Menu class if it helps you help me) Or you can just show me a different way to make this work, I appreciate every answer! Thanks in advance!
NOTE
And please keep in mind, I'm a noob at Java and Android so keep it rather simple or at least explain what you do.
When you click on a list item, display the image in another view in the same layout, unless you want the image to take up the entire screen real estate. If you want it in the entire screen, go to a new Activity by sending the activity an Intent.
Activities are the "controller" of your application. They interact with the visible UI and the input from the user. You don't need a separate activity for each image, just an activity that's associated with a "place" in the UI (an ImageView) where you'll display the image.
I'd start by adding the images as resources under res/drawable before going on to databases.
You are going to have to do most of this yourself. There really isn't any substitute for taking the time to learn Java and Android. There are several tutorials and Android University classes under the Resources tab in the Developers Guide; I suggest you do all of them.
What I am looking to do is to capture an image on a button click, without requesting any other input from the user.
At the moment I'm using a MediaStore.ACTION_IMAGE_CAPTURE intent inside my activity, which is called when pressing a button on a widget. At the moment this opens the camera preview allowing me to take a picture.
That's all working great, however what I'm looking to do is when the user presses the button on the widget, take the picture straight away and display a preview of the captured image. So it essentially snaps the picture automatically, without the need for the user to press anything else.
I tried using the Camera API directly, using a SurfaceView class to capture the image and call the PictureCallback etc, this worked how I want it to, however the quality of the images was very low and I couldn't figure out how to change it.
So I guess I'm looking for an answer to either of those two problems, or both if anyone knows them.
Firstly, is there anyway, using something similar to a MediaStore.ACTION_IMAGE_CAPTURE intent to snap the image automatically without requesting the user to take the picture.
Or secondly, how can I increase the quality and resolution of an image captured using the Camera API directly (camera.takePicture(shutterCallback, rawCallback, jpegCallback); and all that business).
Any help would be much appreciated.
Did you try autoFocus?