Draw text.There are three types of fonts: 1, built-in basic font 2, through the basic font and style, create a new Typeface 3, introduce external ttf files.The sample code is as follows: 1. package com. mike. activity;2.3. import android. R;4.
This example uses a custom theme style to implement a fuzzy translucent Activity.
1. Define the inventory file (AndroidManifest. xml)
Package = "my. android. test"
Android: versionCode = "1"
Android: versionName = "1.0" type = "codeph" text =
Get the resolution of the mobile phone screen:[Html] DisplayMetrics dm = new DisplayMetrics ();GetWindowManager (). getDefaultDisplay (). getMetrics (dm ); Int nowWidth = dm. widthPixels; // The current resolution width.Int nowHeigth = dm.
Key events are sometimes used during Android development and testing. However, for other reasons, it is not very convenient to use the keyboard or mouse to click each time. Here is an adb tool-input tool.
Using the input tool is actually very simple.
Previous: http://www.bkjia.com/kf/201204/127802.htmlThe view animation framework supports compensation animation and Frame Animation, which can be declared in XML. The following describes how to use these two methods:
Compensation Animation
An
Previous: http://www.bkjia.com/kf/201204/128273.htmlNine-Patch
The NinePatch resource is a PNG image that defines the stretch area. When the content of a View object exceeds the border of a normal image, Android scales the stretch area. Generally,
Android divides windows into multiple levels. To achieve the desktop lyrics, you only need to set the level of the Window to the level of the desktop Window, and also have the floating Window effect that can be freely moved. Let's take a look at the
1. Use of ContentProviderNotePad. java defines several fields and their attributes of the unique Notes table in the database. The Notes table implements the BaseColumns interface, that is, it has the _ id and _ count attributes. The naming rules for
First, let's take a look at the introduction of SurfaceView by the official API.Introduction to SurfaceView APIsProvides a dedicated drawing surface embedded inside of a view hierarchy. you can control the format of this surface and, if you like,
Body
I. Objectives
Note that the called APK has been installed in the Android system.
Previous Article: Android app development enhancement series (4) -- Android dynamic loading (on) -- loading classes in APK Not Installed
Call another installed APK
The WEBVIEW component may be used during ANDROID Application Development. WEBVIEWCLIENT and WEBCHROMECLIENT may be exposed during use. What are the differences between the two classes?WebViewClient mainly helps WebView process various notifications
1. All you need to do is listen to the broadcast from the system.
Public class FlorenceText extends BroadcastReceiver {
Public void onReceive (Context context, Intent intent ){If (Intent. ACTION_BOOT_COMPLETED.equals (intent. getAction ())){Start (
In the example Android RoboGuice User Guide (2): The first example is Hello World http://www.bkjia.com/kf/201205/130091.html, which introduces the basic steps for developing roboguice:
Create a RoboApplication subclass, GuiceApplication, and
The SharedPreferences provided by Android is similar to the INI files commonly used in Windows programs, and stores the Property setting information (data type differentiation) of applications in the form of Key-Value ). For example, it can be used
Permissions required in this example:Engineering source code download: http://www.bkjia.com/uploadfile/2012/0508/20120508021512712.rar In this example, GPRS is automatically enabled and disabled, and the system's Manual GPRS setting interface does
:There is only one button on the main interface and the file will not be available.The layout file content_view.xml used is displayed in the notification bar.
Android: layout_width = "fill_parent"Android: layout_height = "fill_parent"Android:
Android: multiprocessThis attribute is used to set whether the Activity instance can be loaded to the process where the component that starts the Activity is located. If it is set to true, yes; otherwise, no. The default value is false.Generally, a
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.