In Android, the application is only used to save the application.ProgramContext, the core is activity. However, we can simply define public static variables in the application to call multiple activities for data sharing.CodeAs follows:
Public
1. Install JDK
Download and install. After windows is installed, you need to set three environment variables.
Java_home
Specifies the JDK installation path, which is the path c: \ Program Files \ Java \ jdk1.6.0
Simple use of tablelayout in Android
Add the tablelayout control to layout.
Code
Public class mainactivity extends activity {private final int WC = viewgroup. layoutparams. wrap_content; private final int fp = viewgroup. layoutparams.
Learning steps and key points
Ui Layout
Main UI elements
Main buttons and events
Screen jump
Dialog Box
I. Android UI Layout
This section mainly refers to this person's blog for a little bit of sorting. For the original text, see: Original
Is a special image format in the application software development of the andriod platform. The file extension is .9.png.
The smart phone has the automatic horizontal screen function. The same interface will change the display direction with the
1. C # code (sharpziplib needs to be called ):
Using system. io; using system. text; using icsharpcode. sharpziplib. zip. compression. streams; namespace consoleapplicationdemo {public class ziphelper {// // compress the string in Deflater mode,
Learning programming, all the languages can be figured out, as long as you learn one of them, everything else is cloudization ......
GIS development is typical of ArcGIS
ArcGIS will soon release the official version of ArcGIS for Android.
The
Original article address
InAndroidPeople in the group often ask me,Android logHow is it used? Today I willSDKLet's get started quickly. I hope to get started with you.Android logSome help.
Common android. util. Log methods include:5Items:Log. V ()
Assume that the application environment for Android development has been configured. If not, configure the environment first. Create a hello World app for Android,
Three methods to create a hello World Program are described as follows: Create a
In Android, broadcastreceiver is used to dynamically register broastcastreceiver and statically register broastcastreceiver.
1. dynamically register broastcastreceiver.
Define broadcastreceiver:
Private broadcastreceiver bcr1 = new broadcastreceiver
Use of Android expandablelistview
1. mainactivity must inherit expandablelistactivity. The result is that when the sub-item of the single-host listview is to display another listview.
public class MainActivity extends ExpandableListActivity {private
When operating an android file, you must grant the following permissions:
The following code writes text to a file:
Private Final Static string Path = "/sdcard/Lin"; private final static string filename = "/test.txt"; @ overrideprotected void
Android custom view is mycustomview. Drew a rect in mycustomview,
The color is green, and a red text.
public class MyCustomView extends View{ private Paint mPaint; private Context mContext; private static final String mString = "Hello
An image with higher resolution does not provide any visible benefit, but still takes up precious memory and incurs additional performance overhead due to additional on the fly scaling.
Given that you are working with limited memory, ideally you
First, create the colors. xml file under Res/Values and write:
#9000
This value sets the transparency of the entire interface. To see the effect, it is now set to about 56% (9/16.
Create styles. xml under Res/values/and set the program
During Android development today, I encountered a very strange problem. In a viewgroup, I dynamically created two custom views and then performed the setvisibility operation on them, the custom view does not respond at all.
The possible pseudocode
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