When debugging a program, parameter output is helpful for us to know whether the entire program operates according to our own logic.
There are many methods for outputting information in the java program on the Android platform on the console:
1.
I. Basic Knowledge:
Preferences is a lightweight database storage mechanism used to record game scores and the last login time of applications.
Ii. Programming implementation:
1. Edit the interface (res \ layout \ main. xml ):
[Java]Android:
I. Basic Knowledge:
Id = "@ + id/edtInput", which is a bridge between the UI and codeLayout_width = "fill_parent", automatically filled to the screen widthLayout_width = "wrap_content", automatically filled into the control size Controls in
// Obtain the screen size to properly set the button size and position
DisplayMetrics dm = new DisplayMetrics ();GetWindowManager (). getDefaultDisplay (). getMetrics (dm );Int width = dm. widthPixels;Int height = dm. heightPixels;
// Customize the
When we modify the classes opened by google. The so-called open classes and open APIs are only the scope of javadoc and are not public and private in java. That is to say, it does not matter for source code compilation, it only affects the opening
1. Create an AppWidget layout that contains two textviews for displaying the content: Xml Code 2. create an xml directory under res, and then create the AppWidget information xml file in the xml directory: 2.1 when creating an xml file,
Using ActionProvider in Android4.0 (API leverl 14) makes it easier to implement a user-friendly and efficient shared Action in the ActionBar. Once an ActionProvider is appended to the Intent ActionProvider menu, you only need to provide a shared
Overview:
First of all, I will briefly describe my understanding of message pushing. Here I will take QQ as an example. When QQ is offline on our mobile phone and we quit the QQ application, however, if someone sends us a message at this time, we
Permission:
...
Video:
Private void dispatchTakeVideoIntent (){Intent takeVideoIntent = new Intent (MediaStore. ACTION_VIDEO_CAPTURE );StartActivityForResult (takeVideoIntent, ACTION_TAKE_VIDEO );}
Check whether the video can be processed:
Public
TVs are much different from other Android-powered devices: http://blog.csdn.net/sergeycao
They're not mobile.Out of habit, people use them for watching media with little or no interaction.People interact with them from a distance.Because TVs have a
Android has several accessibility-focused features baked into the platform, which make it easy to optimize your application for those with visual or physical disabilities. however, it's not always obvious what the correct optimizations are, or the
Accessibility services are a feature of the Android framework designed to provide alternative navigation feedback to the user on behalf of applications installed on Android devices. an accessibility service can communicate to the user on the
In Android, how does one transmit objects in Intent? As far as I know, there are two methods: Bundle. putSerializable (Key, Object); Bundle. putParcelable (Key, Object); of course, these objects have certain conditions. The former implements the
On android, you want to achieve local amplification, such as adding a magnifier to the screen.
It is found that ShapeDrawable is the best choice.
First, you can specify the drawing shape when ShapeDrawable is constructed,
Second, you can use shape.
Problem description:
When the View. invalidate () method is called, the View is requested to re-draw (). However, I have read the invalidate () and related methods, and there is no direct relationship with draw. How does invalidate () redraw a View?
1. Create color. xml under res/values
#80 ffffff PS: #80 is the transparency value (80% transparency), and ffffff is the color value (black)2. Create style. xml under res/values
PS: parent = "android: style/Theme. dialog "sets activity as a
Broadcast Introduction
Broadcast is divided into two different types: Normal broadcast (Normal broadcasts) and Ordered broadcast (Ordered broadcasts )". Normal broadcast is completely asynchronous and can be received by all receivers at the same
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.