As part of the Android 2.2 "Froyo" Update, Google announced a software upgrade for Android mobile phone cameras at its I/O conference on Thursday.Google brings a brand new drop-down menu and transparent control system to help identify and access camera functions. Google also enhances the digital zoom feature from 5 to 13, you can drag the slider with your finger to complete the operation. In addition, the t
Android Development Get photo album of the way There are many kinds of online, here is a Android4.4 method, because the higher the version, some old APIs will be discarded, the new API and the old API is incompatible, resulting in a lot of problems.
For example: Managedquery () has now been replaced by Getcontentresolver (). query (), but their parameters are the same
such as Android4.4 after Intent (inte
Android: imitation QQ photo selector (display by album category, select more ),
The purpose of this example is to implement the photo selection function similar to QQ. After selecting a photo, use a page similar to Sina Weibo to display it.
First:
The main technologies used in this example:
1. Use ContentProvid
; Compensate The Mirror} else {//back-facing result = (info.orientation-degrees + 360)% 360; } camera.setdisplayorientation (Result); }The method of dynamic acquisition is landscape (horizontal screen) or portrait (vertical screen) to change the preview map.(The cameraid of the rear screen is 0)2. The correct angle of image preservation (when we take the photo, we find that the angle is not correct)@Overridepublic void Onpicturetaken (byte[] dat
Recently solved a problem that has been troubling me for a long time. Samsung mobile phone Photo picture rotation problem, the project has the function of uploading pictures, then involves taking photos, choose pictures from the album, other mobile phones are ok no problem, but Samsung's mobile phone photos, you will be very clear to see the photos will rotate, Then you find the image according to the path has been rotated, the solution finally I foun
general view. There is a textureview.setalpha (1.0f), the default does not write this sentence, its alpha is also 1.0f, that is, opaque. If you set it to transparent 0.0f, you can see nothing, which is just the opposite of Surfaceview.Surfaceview Surfaceholder generally want to set a transparent that is transparent. But Textureview because it is a view, no matter what a PNG photo transparency set to 0 must not see anything. 7, assuming that the previ
Android imitation photo, second shot, video cover selection. There are pictures with truth.
I am too lazy to add comments when there are not many codes. Forgive me for being lazy.
No thread is added for obtaining the thumbnail. FC may occur on some low-end servers or HD videos. You need to add the required children's shoes.
Code:
package com.tan.videoselectthumbnail;import java.lang.ref.WeakReference;im
This example for you to share the Android open camera and photo album specific code for your reference, the specific contents are as follows
Turn on the camera
/**
* Select camera
/private void Showcamera () {
//Jump to System camera
Intent cameraintent = new Intent ( Mediastore.action_image_capture);
if (Cameraintent.resolveactivity (Getpackagemanager ())!= null) {
//Set t
In the \packages\apps\camera\src\com\android\camera\settingchecker.java:Case Row_setting_jpeg_quality:int jpegquality = getjpegquality (Context, Integer.parseint (value));Parameters.setjpegquality (jpegquality);BreakModified to:Case Row_setting_jpeg_quality:int jpegquality = 100;Parameters.setjpegquality (jpegquality);BreakCan.The scope of the jpegquality is 1~100, you can change it on demand, and the current 6572 JB3 default is 90.Problems that may r
Android photography and photo album image cropping error Solution
Recently, I used photos and photo albums to take pictures and cut and upload pictures. I went online for a stroll. They were all the same and I used them, what I did not expect was a variety of strange issues. Let's take a look at the code to solve the problem.
This is to call the camera
public s
This function can help you to achieve, in the picture of random smear, can be used for SNS products.
The drawing itself is simple, but it's a bit of a hassle to implement the exact (position, zoom) drawings that you specify on the picture.
Here's how to implement the process and principles:
UI compositionThis UI, seemingly simple, or somewhat complex, the following needs a bottom chart, above a transparent picture control, when drawing to synchronize two control deformation.
UI Hierarchy D
view the value of the photo ID longid= Mcursor.getlong (Mcursor.getcolumnindex (mediastOre. images.media._id)); NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;LOG.I ("mediastore.images.media_id=", id+ "");// filter out unwanted images, Only get pictures in albums that store photos after taking pictures stringpath=mcursor.getstring ( Mcursor.getcolumnindex (MediaStore.Images.Media.DATA));if ( Path.startswith (sdcardpath+ "/dcim/100media") | | path.startswith (sdcardp
Reprinted from http://blog.csdn.net/guolin_blog/article/details/9526203Because each Android application has a memory limit, if you load a lot of pictures, there will be an Oom exceptionThis requires the use of LRUCache memory caching technology, LRUCache is in the Support-v4 jar package, so you want to use this technology to add the jar package.The technical principle of LRUCache. Recently used objects are saved in Linkedhashmap with strong references
()); -Intent.putextra ("Nofacedetection",true);//No Face Detection - Startactivityforresult (Intent, requestcode); the}4, the overall process is basically through the call system activity implementation, the code is as follows1 protected voidOnactivityresult (intRequestcode,intResultCode, Intent data) {2 Super. Onactivityresult (Requestcode, ResultCode, data);3 if(ResultCode! =RESULT_OK)4 return;5Bitmap Tempphoto =NULL;6 Switch(requestcode) {7
Android development template code (1)-simply open the image library and select a photo,
First, paste the sample code
// Check the permission public void checkPermission () {if (ContextCompat. checkSelfPermission (this, Manifest. permission. WRITE_EXTERNAL_STORAGE )! = PackageManager. PERMISSION_GRANTED) {ActivityCompat. requestPermissions (this, new String [] {Manifest. permission. WRITE_EXTERNAL_STORAGE},
Use your own definition checkbox or RadioButton time. Define your own icons and text on different phones to show different pitches. Sometimes not very well controlled, here is my own definition checkbox:In layout in the following XML:Inside a style defined by itself. The style content is:The selected and unchecked pictures are called. Under the drawable:XML version= "1.0" encoding= "Utf-8"? >Although you can display the desired on some systems by setting paddingleft, some do not.So the question
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.