Because the case is relatively simple, so simply use Androidapplication-> Game-> Stage Build the frameworkfirst, the main entrance, no special
Copy Code code as follows:
public class App extends Androidapplication {
@Override
Phenomenon :
Java:1801:method does not override-a method of the from-its superclass @Override ...
reason :
Eclipse is defaulting to Java 1.5 and your have classes implementing interface methods (which in Java 1.6 can be annotated With @Override,
In a project, as soon as you enter a page, EditText automatically gets the focus by default.
So how do you cancel this default behavior?
Looking for a long time on the internet, a bit of listening to soft keyboard events, a bit called Clearfouse
Today, I saw EoE question and answer there is this "[Android interface]notificationmanager How to use bitmap to do the icon" such a problem, in the forum search there is no good case
Feature a simple demo for everyone to refer to
Today,
Previously found in the EoE forum to crop the picture as a circular picture method, but the effect is not very ideal, these days because of the company's business requirements, the need to cut the head to a round way to display, this method is based
Effect chart
First, draw the ring
The first one to draw is the ring
1: Ring Drawing function
Ring API
public void DrawArc (RECTF oval, float startangle, float sweepangle, Boolean usecenter, Paint Paint)
Parameter description
Oval:
Android Custom Round progress bar
Today stumbled on a circular progress, think of yourself to achieve one, the following figure:
The basic idea is this:
1. Draw a solid circle first
2. Draw a white solid square, covering the solid circle
3.
First look at the effect:
Now a lot of applications need to do more dazzle, such as UC, and listen every day, the effect is very cool, the source code has been opened to the outside, interested can go to study the
On the source
Main.xml
The popupwindow is one of our frequent customers, and it is easy to use. wrote the simplest custom Popupwindow, recorded, easy to use later on the above changes can be.
/** * @param * @author LDM * @description Custom Popupwindow * @time
A few months ago wrote a blog "xUtils3.0 Framework Learning Notes", there are records through the xutils implementation of File upload method, the code is as follows:
private void Uploadonclick (View v) {
String upurl =
In Android development, we often need to pop up some dialog boxes on the Android interface, such as asking the user or letting the user choose. These features we call it the Android Dialog dialog box, Alertdialog implementation method for Builder
In the development process, sometimes the icon is slightly larger, such as 48x48, the text will be superimposed with the icon, the solution is as follows:
Copy Code code as follows:
Tabwidget tw = Tabhost.gettabwidget ();
for (int i = 0; i
It is necessary to give a hint before the user exits the application. Because the user may not really want to quit, but only accidentally pressed the return key, most of the application is in the application to quit before giving a dialog, I think
1. Realize that all activity in the application is full screen
Join directly in the manifest
Copy Code code as follows:
Android:theme= "@android: Style/theme.notitlebar.fullscreen"
2. Achieve a single activity full screen
Test environment for adnroid more than 2.1.
The first step: Androidmanifest.xml permission configuration:
To add shortcut permissions:
Copy Code code as follows:
Verify that the shortcut has permissions:
Copy Code code
First of all, we need to introduce the following layoutanimationcontroller:
* 1.LayoutAnimationController is used for a layout inside the control, or a viewgroup* Inside the control set animation effect (that is, the entire layout)* 2. Each control
Just like the button control has the listener, the animation effect also has the listener, only then realizes the Animationlistener to be able to realize to the animation effect listens, in which needs to overload three functions, is the following
In sections 5.2.1 and 5.2.2, the tags and TextView special text (URLs, phone numbers, emails, etc.) are introduced, which can be clicked to trigger different actions. Although these click Actions already meet most of the needs, the contents of this
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