1.SRC: Store all the *.java source programs.2.gen: Save path for automatically generated code file for ADT plug-in, R.java will save all resource IDs.3.assets: Can hold the project some large resource files, such as: pictures, music, fonts and so on.4.res: Can store all the resource files in the project, for example: Pictures (*.png, *.jpg), text, etc.5.RES/DRAWABLE-HDPI: Save a high-resolution picture resource, you can use Resources.getdrawable (ID) to get the resource type.6.RES/DRAWABLE-LDPI:
We know that Android offers several different resolution bitmap to match the density of different phone screens. The corresponding relationship is as follows:
xxhdpi:3.0
xhdpi:2.0
hdpi:1.5
mdpi:1.0
ldpi:0.75
So a problem arises:Since Android can be converted automatically, why waste user space to store low-resolution images when it comes to Android
Create a folder on sdcard in Android, androidsdcard
// Create a folder on the SD cardPublic void createSDCardDir (){If (Environment. MEDIA_MOUNTED.equals (Environment. getExternalStorageState ())){// Create a folder object and assign it to the directory of the External StorageFile sdcardDir = Environment. getExternalSt
The Android program function Copies files in the assets folder to the SD card (including subfolders) of the mobile phone and androidassets.
Recently, the function is to copy all files (including sub-files) in the asset folder to the specified directory. The method used is nothing more than AssetManager. However, the problem here is that both subfolders and subfol
In the LAN, the implementation from the Android client to the mobile phone SD card files uploaded to the PC server side, and saved in the PC hard drive under the specified folder. At the same time, the PC-side hard disk file directory and the file description information stored in the MySQL database.1, the client key code:(1) Get the files on the SD card/** * Get file path and status information * * @retur
Due to work needs, today we have studied how to create folders and modify their permissions in Android. We need to know that each application package has a private directory for storing data (similar to folders ), only applications of this package can write data to this directory space. The private data directory of each package application is in the absolute path of Android/data/
The Code is as follows:
1,
A Real-time folder is a desktop component used to display data information provided by a ContentProvider. To create a real-time folder, you must have two support options. On the one hand, you need to define an Activity for creating real-time folders. On the other hand, the ContentProvider of the specified data information URI must support real-time folder query.
From the previous article "Android screen adaptation to the full guide" after writing, often a friend asked me this question: "Can an app only provide a set of graphs to adapt to all the resolution?" "I think it is necessary to write an article to study the problem, so there is this article."
Research content
Research methods
Test environment
Research process
Results analysis
Conclusion
A
In the process of Android development, we often need to change the style of the control, can be used to increase the background image of the way to change, but the background image is more and more certainly will make the apk file greatly.We can do that with a custom attribute shape.Shapegradient--corresponds to the color gradient.StartColor, EndColor will not say much. android:angle refers to the angle from which the change begins. Solid--fill.Strok
Today began to enter the Android development, has been to do some Java webservice and other files, the first time to start from scratch Android project, I will have recently encountered the problem of one by one comb.Now let's take a look at the various folders created after the Android project. When we set up a basic Android
In this folder management app, we can try to reference some new elements, here I give a blow to introduce a drawer called the layout, QQ used to the drawer layout, notThey also on the original basis of their own development of the new drawer layout, and quite tall on the, by the way, classification management, these are just It's a very preliminary formulation,because it is pre-written, late did not do a perfect, suitable for general entry-level partn
The Android custom control style is in the XML under the Drawable folder, which is achieved by setting the control's Background property in the layout file.First, the control common state: used in the XML file selector node, selector can be understood as a state switcher, different states to switch the different styles, various states with the item node representation, The following are some common states
This is a simple Demo. The purpose is to read a folder to generate a thumbnail and click to display a large image.
Create a new project, create a ThumbnailsWindows class, and inherit LinearLayout. The Code is as follows:
[Java]Import java. io. File;Import java. io. FileInputStream;Import java. io. FileNotFoundException;Import java. io. InputStream;Import java. util. ArrayList;Import java. util. Collections;Import java. util. Iterator;Import java. util
Android drawable folder usage
I have been learning to understand a simple game since I started school. After writing the code, it is found that some images on the main interface are much larger than normal.
I thought it was a code error. I checked the code back and forth. There was no error... Crashed !!!
Later, I tried to move the image from drawable-mdpi to the hdpi f
As we all know, when it comes to developing an Android project, we need to store data in the Data folder of a virtual device when it's about needing access to data, which is the need to interact with it. Before in the relevant books to learn how to upload files to the device, such as the Mp3,mp4 player mentioned above need to upload to the device audio and video files. Methods are as follows:c:> ADB push C:
The last few days is really a variety of significance of the busy, busy exams, but also busy with curriculum design, hand and outsourced projects, the other side of the school project to do, their own things still in the document stage, it is really let people want to die Ah!!
Nearly half a month, C # This aspect of coding more, Android and Java here completely shelved, so take time to write a small example.
This is a very small example of a
A folder failed to be renamed or moved -- An error occurred while installing the Android SDK.
The prompt "A folder failed to be renamed or moved..." appears when you configure Android to install its SDK.
-= Warning! =-A folder failed to be renamed or moved. On Windows this
The "a folder failed to be renamed or moved ..." prompt appears when configuring Android to install its SDK-=warning!=-A folder failed to be renamed or moved. On the Windows this typically meansThat a program is using the that folder (for example Windows Explorer or your anti-virus software.)Please momentarily deactiva
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.