Preface:
When we develop a project, many projects share one resource and logic.CodeIn this case, we generally use importing other projects in the development project as referenced class libraries and resources.
Operation:
1. Create an android
We often need to load SD cards or network images as drawable during the development process. Many people use drawable. createfromstream (stream, "src") for convenience ").
However, there is a problem with this method: the same image is configured
A year ago, I made an Android 2.3, using the feisikar imx5 system,
After a few days, the pigs and dogs are not as good as each other .. Finally.
With the previous experience, this time imx6 is used as the android 4 platform, which is much
Use this method below in android4.0:
Private void cutscreen () {view v = getlayoutinflater (). inflate (R. layout. activity_main, null); // enable image cache v. setdrawingcacheenabled (true); // v. builddrawingcache (); // measure the View
HTML tags may be used when defining strings in strings. xml,
Supported HTML Tag types include:
Bold.
Italics.
Underline.
However, when using these tags, you must register the"Into HTML Escape Character& Lt;, As follows:
Before I made this blog, I also searched a lot of tutorials on 9patch, including the himi android game series and blog series on the blog Park. The content is similar, but I did not draw it successfully at the time. I do not know how to perform this
My friendsArticleThis article introduces how to implement content change. The address of the associated article
In android4.0 (API leverl 14), The actionprovider can easily implement a user friend in the actionbar and efficiently share the action.
I. Basic Knowledge:
Gl_triangle_strip100% ~ Faster than gl_trianlges ~ 200%.
Suggestion: Try to useGl_triangle_stripReplace gl_triangles.
Ii. Usage:
1. Start with the framework. We generally draw a 3D image on Android, and
After entering the content on editview, you can directly click the search key on the keyboard [adapted from the previous enter key]
The procedure is as follows:
1. Modify the editview attribute: Android: imeoptions = "actionsearch". When this
• Android-support-v4.jar, a software package officially provided to us by Google that is compatible with Android devices of lower versions and contains APIs that can only be used in android3.0 and later versions. Viewpager is one of them. With
The marquee is that textview cannot accommodate content and must be displayed in the form of a playback animation.
1, usually, many people only need to implement a textview of the horse, just need to add the following section in the textview
I. Problems
Before Android 2.3, we had no problem performing network operations in mainthread. However, after Android 2.3 (that is, 3.0, etc.), A. networkonmainthreadexception occurs. For example, if we want to display a network image and use the
First
This is the source code of the project.
Http://download.csdn.net/detail/xu_song/5312262
If you are interested, try to solve it.
The function I want to implement is to add multiple linearlayout items to the listview item, but I don't know
Author: Bi Xiaopeng
Blog: http://www.wirelessqa.com
Reason
In Android development, socket programming makes it impossible to see from the log what is the packet sent and returned by the socket that communicates with it. Here is a tool, the tcpdump
First, it is shown as follows:
The project code is as follows:
Package com. My. listpreference;
Import Android. OS. Bundle;Import Android. Preference. listpreference;Import Android. Preference. preference;Import Android. Preference. Preference.
1. drawable-> bitmap
Resources res = getresources ();Bitmap BMP = bitmapfactory. decoderesource (Res, R. drawable. sample_0 );
2. Bitmap ----> drawable
Drawable = new bitmapdrawable (BMP );
In addition, I searched the internet and I don't know who
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service