Recent whim, want to make up an Android battery plugin on the desktop, one is this app does have its practical value, the second is to build up the amount of work should not be very large, do not spend too long, three and can learn the development of the widget under the three-way, so, Pause the game development of learning, to make a widget first.
After the s
The first day of the new year began to learn the MU class Spring Festival activities in the Android wish to share a lesson, learned a few knowledge points, in this record.1. Call System GalleryCall the system library with intent, the procedure is to pop up the system library selector, select the picture to get to the selected picture. The code is as follows://call where it's neededIntent Intent =NewIntent (Intent.action_pick,NULL); Intent.setdataandty
First look at the Viewpager display multiple picture effects:
From the above picture can be seen, when adding more than a picture, can be formed below the effect of a gallery, we pull around the picture to see we add in the picture, the effect is not a lot better? Let's see how to achieve it!
The above effect is similar to the viewpage effect of Android, but unlike Viewpager, Viewpager can only display
In the development of Android often use the image upload function, commonly used is to call the Android system comes with the library and photo function. The sample code is as follows:Java code:public class Testactivity extends Activity {public final static int photo_zoom = 0; Public final static int take_photo = 1; Public final static int photo_result = 2; public static final String image_unspecif
Picture enlargement idea:First, you can transform the image through the Matrix object, zoom in when you choose, and zoom out to the original size when you lose focus.Double scale = 1.2;int width = bm.getwidth ();int height = bm.getheight ();LOG.I ("Size:", width+ "");float ScaleWidth = (float) (scale*width);float ScaleHeight = (float) (scale*height);LOG.I ("Size:", scalewidth+ "");Matrix matrix = new Matrix ();Matrix.postscale (ScaleWidth, ScaleHeight);BM = BITMAP.CREATEBITMAP (BM, 0, 0, width,
Alps/packages/apps/camera/src/com/android/camera/filesaver.java1:import Java.util.Locale;2:modify the function:public void Refactoertitle () {......if (mtag! = intermedia_image) {If the data is Intermedia file,the file name notThe indexMtitle + = String.Format ("%02d", Mindex);}Setignorethumbnail (TRUE);}Changed to:public void Refactoertitle () {......if (mtag! = intermedia_image) {If the data is Intermedia file,the file name notThe indexMtitle + = St
The Desktop component app widget is a practical function of Android. Although the development process is not very difficult, there are many steps and a little trouble. The following key steps are summarized to facilitate future use. The project is packaged to facilitate future use. Create an android project and follow the steps below to create a simple app
Some specific software automatically generates a file named ". Nomedia" in the cached Pictures folder, shielding the scanning of other software.This folder represents the MP3, MP4, RMVB, JPEG and other media files such as audio and video, so the system library is not visible.However, some special software such as quick maps, MX player can also be in the settings to cancel the identification of these files!Android caches images that are not visible in
Double-click the Android Gallery image magnification algorithm,Double-click magnification of an image is related to the image size, view size, and current scale size.To avoid image enlargement, the maximum limit SCALE_LIMIT of a magnification is set. Currently, this value is 4.The specific algorithm is as follows:The image width and height are recorded as: imageW imageHThe view width and height of the displ
The behavior of the gallery displayed on the JB and JB2 versions is that the horizontal screen displays a full screen, and the vertical screen displays status bar. How to make the vertical screen not show status bar.
Modify alps/packages/apps/gallery2/src/com/android/gallery3d/app/ Togglestatusbarbyorientation () method in Abstractgalleryactivity.java:
Copy Code code as follows:
private void Tog
Copy Code code as follows:
/* Long press the picture in gallery to delete the picture.
Gallery.setonitemlongclicklistener (New Onitemlongclicklistener () {
@Override
public boolean Onitemlongclick (adapterviewFinal int arg2, long arg3) {
TODO auto-generated Method Stub
New Alertdialog.builder (Sdcardactivity.this)
. SetIcon (Android. R.drawable.ic_dialog_alert)
. Settitle ("Warm Tip")
. Setm
Java. lang. ClassCastException: android. widget. FrameLayout $ LayoutParams cannot be cast to android. widget. LinearLayout $ LayoutParams
The parent control of FrameLayout is a LinearLayout control. The problem is that when LinearLayout allocates space for the Child control, the LayoutParams for retrieving FrameLayou
Recently, I was wondering how to compile an Android battery plug-in on the desktop. First, this App has practical value, and second, the compilation workload should not be very large, you don't have to spend too much time learning the development method of widgets, so you can do it three times. So you can pause the learning of Game Development and compile a Widget first.
After finding and combining multi
Android. widget. Toast is a class provided by android for quick display of information. This is a very convenient and useful thing, especially when we initially set up the control or behavior of Android applications, it can be used to assist us in preliminary testing.
The following shows the status of the menu added to
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.