Data storage and interface display based on Android Application Development (I): android Application DevelopmentDirectory structure of the Android Project
Activity: interface displayed when an application is opened
Src: project code
R. java: Resource id of all resource files in the project
);
Externaltv.settext ("External storage capacity" + "n" + "Total size:" +totalstr+ "n" + "Usable size:" +AVAILABLESTR);
}
else {
Toast.maketext (This,
"SD card is not available, please check the status of SD card",
Toast.length_long). Show ();
}
File path = Environment.getdatadirectory ();
Statfs stat = new Statfs (Path.getpath ());
Size of block for file system (byte)
Long blockSize1 = Stat.get
drive
Internal storage space Internal storage
SD card:
The equivalent of a computer's mobile hard drive
External storage space External storage
SD card StatusRemove: No plug-in SD card UNMOUNT:SD card i
Android. support. v7.internal. widget. ActionBarOverlayLayout Couldn't Be Initialized, actionbaroverlay
Symptoms:
Android Studio 1.2 (Build 141.1890965)
After a new project is created and the automatic build is complete, Layout Editor cannot preview the Layout file. The following error occurs:
Rendering Problems
The following classes cocould not be found:-
Android learning 10 (android file storage)
The android system provides three methods for simple data persistence, namely file storage, SharePreference storage, and database storage. You
Android Storage access and directoryExternal storage for AndroidAndroid supports external storage (case-insensitive filesystem with immutable POSIX permission classes and modes).External storage can be provided through physical media, such as an SD card, or by encapsulating
One of the three core functions of the Android kernel, the internal principle of AMS, androidams
The above class is the full name of AmS, and the other two core functions are WindowManagerService. java and View. java.
AmS provides the following functions:
Unified management of memory management processes for each application
AmS defines several important data classesUsed to save processes, activities, and
Today on a new machine, configure the Android environment. System for Win7 flagship 64-bit, downloaded the JAVA8 installation package "Jdk-8u40-windows-x64.exe", installed on the D-disk:When the installation is complete, right-click on the desktop to open the Command line window, enter "Java-version", "java" command no problem:Enter the "Javac" command to indicate that "javac is not an internal or external
Android development path 04 (beginner android engineers will, you know !), 04 android
Android beginners Android engineers focus on the following:
1. Android development basics:
① UI
External storage for AndroidAndroid supports external storage (case-insensitive filesystem with immutable POSIX permission classes and modes).External storage can be provided through physical media, such as an SD card, or by encapsulating a portion of the internal storage, a
The memory of the phone is divided into running memory (RAM) and the storage capacity (ROM) of the phone, of course, most of the phone also supports external memory card, today is only in the memory space of the phone for simple read and write operationsBelow is a login interface and XML file content for this interface1 Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"2 Xmlns:tools=
Problem:Cause: The Android SDK environment variables are not configured properlyWorkaround:(1) switch to the Tools folder under the Android SDK, then execute the android command to launch the Android SDK manager, my Android SDK folder is C:\Users\canfly\AppData\Local\
Virgins Android (13th) --- SharedPreferences and sharedpreferences for lightweight Android Data Storage
I. Preface
Reprinted please indicate the source: http://blog.csdn.net/wlwlwlwl015/article/details/42437007
When I was a beginner in Android, I used the Intent + Bundle mode to transfer values between activities.
data editor.commit () without committing;} public void btn (view view) {string string = sp.getstring ("name", "null"); Toast.maketext (This, string, 1). Show ();}}The storage path is: data/data/package name/shared_prefs/test.xmlOpen the file to seeWhen storing the put value, the string node is in the corresponding XML file. int at the time of the corresponding int node.Storage Duration: The directory where
stores temporary cache files.
When your device has insufficient storage space, Android may delete these cached files to restore the space. However, you should not rely on the system to clear these files for you. You should always maintain these cached files on your own and keep them within a reasonable space consumption range, such as 1 MB. when you uninstall your application, these files will also be de
The above class is the full name of AMS, and the other two core functions are Windowmanagerservice.java and View.javaThe main functions provided by AMS:Unified scheduling for each application memory management process ManagementSeveral important data classes are defined in AMS to hold processes, activities, and tasks (Task)Processrecord.java information about the process that is loggedThe internal variables in this class can be divided into three part
btn (view view) {string string = sp.getstring ("name", "null"); Toast.maketext (This, string, 1). Show ();}}The storage path is: data/data/package name/shared_prefs/test.xmlOpen the file to seeWhen storing the values, the string corresponds to the string node in the XML file, and int is the INT node.Storage Duration: The folder that contains the package name disappears when you uninstall the software, so t
Problem:Cause: The Android SDK environment variables are not configured properlyWorkaround:(1) switch to the tools directory under the Android SDK, then run the Android command to launch the Android SDK manager, my Android SDK directory is C:\Users\canfly\AppData\Local\
the file.
3. close the input stream using the close () method of the FileInputStream object.
Tip: If you want to save a static file to the application during compilation, save the file to the res/raw/directory of the project. You can use the openRawResource () method to open this file. This method needs to pass the resource ID of R. raw.
Save cache files
If you only want to cache some data, instead of permanently saving it, you should use the getCacheDir () method to open a File object, it rep
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.