1, JNI does not repeat. Look at the previous blog 2, directly on the code 1) Java layer, directly added to the Appactivity.javapublic class Appactivity extends cocos2dxactivity{public static Activity acty;protected void OnCreate (Bundle Savedinstancestate) {super.oncreate (savedinstancestate); acty = this;} static {system.loadlibrary ("Cocos2dcpp");} public static void Share () {New Thread (new Runnable () {@Overridepublic void Run () {//TODO
Eclipse, an online installation package that downloads the eclipse itself directly (http://www.eclipse.org/downloads/)4. Download ADT, install ADT, in Help-install new Softword, select the downloaded ADT (ADT can auto-Associate SDK) to update the SDK5. View ADT and SDK version http://jingyan.baidu.com/article/b0b63dbfc5f49b4a4830700a.html6. Install offline ADT When the network is broken, otherwise the opportunity does not move.Note ADT and SDK incomp
Android has an article about how to use a GIF file and play it before it plays GIF. Here's a way to learn about playing GIF.
If you know a friend in front of you knows it's a bit of a hassle, again to break down the picture, and write all kinds of trouble XML file, a bit depressed, but also bring the direct result is a more action of GIF pictures may be the size of the project will be larger, this point many friends can not accept. But it's also obvi
Android Layout View initialization code is automatically generated, androidview
In the process of android development, the interface layout is important, but also complicated. Sometimes we are eager to run and view the layout effect. However, I really don't want to talk about the compilation speed of android, especiall
This article describes the Android programming implementation of WebView Full-screen playback method. Share to everyone for your reference, specific as follows:
Recently because the project to use WebView load HTML5 video, start not full screen, did a long time to make! Then according to my understanding of how to achieve full screen bar.
First write the layout file Activity_main.xml:
Principle: Full screen when the video in the WebVie
1. Set the code hint function of Java file Open Eclipse Select Window > Preferences > Java > Editor-content Assist > Auto activation triggers for Java , the default is a point in the Settings box,now change it to:. ABCDEFGHIJKLMNOPQRSTUVWXYZ (, 2. Set the code hint function of XML file Open Eclipse Select Window > Preferences > XML > XML Files > Editor > Co
action_battery_low---"); else if (Action.equalsignorecase (Intent.action_battery_okay)) {//indicates that the current battery has been restored from low battery to normal System.out. println ("
Batterychangedreceiver action_battery_okay---"); }
}
}
}
Get apk and version information
private int Getvercode (context context) {
int vercode =-1;
try {
Vercode = Context.getpackagemanager (). Getpackageinfo (
"Com.example.charginganimation", 0). Versioncode;
} catch (Namenotfoundexception
press the code prompt shortcut key, if the match to the hint content only one, then whether to auto-complete.Zone 3: This is about the automatic code hint list of the collation, sorting there are two ways, lexical and relevance, you point in the lower right corner of π can be selected in the order of sorting, do not care about it, the personal feel very useful.A
paramsensor, int paramint) {TODO auto-generated Method Stub}};}First use the superimposed two pictures, one as the pointer, the other as the background four directions LXML file:Android:layout_width= "Match_parent"android:layout_height= "Match_parent" >Android:id= "@+id/compass_img"Android:layout_width= "Wrap_content"android:layout_height= "Wrap_content"Android:layout_centerinparent= "true"android:src= "@drawable/compass"/>Android:id= "@+id/arrow_img
In Level5 above (included), the method in the Activity class: Publicvoid Onattachedtowindow () captures the home key.
The specific code is as follows:
Mainactivity.java
package com.lingdududu.test;
Import android.app.Activity;
Import Android.os.Bundle;
Import android.view.KeyEvent;
Import Android.view.WindowManager;
Import Android.widget.Toast; The public class Mainactivity extends activity {/** called the ' when ' is the ' The activity
);
Mpulllistview.setpullloadenabled (FALSE) is not available on pull load;
Scroll in the end to automatically load available mpulllistview.setscrollloadenabled (true);
Mcurindex = Mloaddatacount;
Mlistitems = new linkedlist
This is the layout that initializes a drop-down refresh and calls Setcontentview to set to the activity.
After the Drop-down refresh is complete, we can call the Onpulldownrefreshcomplete () and Onpulluprefreshcomplete () methods to stop the refr
, new object, The new fixed object is set to the Changequickredirect static variable of the specified class using reflection. In fact, this fix is similar to the static proxy for design patterns in Java. third, Case practiceKnow the general principle, the following is a simple case to run, see the effect, here we need to create three new projects, direct copy of the project before the development of plug-ins, you can read this article: Android plug-in
A project has a lot of Activity, but how do you jump from one interface to another?I searched the internet for a way to:Assume that the current page activity name is a, to jump to the name of BWrite an OnClick method in a with intent class links A and B Public voidonClick01 (View v) {//TODO auto-generated Method StubIntent Intent =NewIntent (); Intent.setclass (mainactivity. This, Jggmainactivity.class ); StartActivity (Intent); } Public voido
();
Returntrue; }//user long touch screen, triggered by multiple Motioneventaction_down publicvoidonlongpress (motionevent e) {log.i ("mygesture", "ONLONGPR
ESS ");
Toast.maketext (This, "onlongpress", Toast.length_long). Show ();
}
}
2 A new Gesturedetector object in view.
In the constructor function
Gesturedetector = new Gesturedetector (Newhahagesturedetectorlistener ());
Then you can write your own code in the ontouchevent
Today talk about the current mobile domain is a very common technology-QR code. Now the streets, the major sites have two-dimensional code traces, whether it is iOS, Android, WP have relevant support software. Before I wanted to know how the QR code works, recently because the work needs to use the relevant technology,
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.