Build an android Development Environment (android4.0.3)
1. First download the relevant software
1). JDK 6 or above
2). Eclipse (version 3.6.2 or higher) Click to download
3). The SDK (android-sdk_r18-windows) is currently the latestClick to
Previously, the option menu was described in details in "android menu details (II) -- create and respond to option Menus" and "android menu details (iii) -- submenu and iconmenu, sub-menu and Icon menu. Next, let's talk about another widely used
Preface
Today, I read the menu in pro Android 3 and have a better understanding of the entire menu system of Android. So I will take some notes to share with you.
PS: strongly recommendedPro Android 3It is the best Android book I have seen so far.
In the previous article, "android menu details (1) -- Understanding menu in Android" briefly introduces the menu of Android, today, let's take a look at how to create and respond to the most common options menu through code ).Create Options Menu
As
Starting from Android 2.3 Gingerbread, native supports front cameras. Next we will look at how to call the front camera in the program.
The first method is to use mediastore to call the system's native camera.
Intent intent = new intent
In Android, we often use the resource file ID to replace this resource, such as R. drawable .***,
The following describes how to obtain the resource ID through the file name:
1. Use the getidentifier (string name, string deftype, string defpackage)
I. server side:
First, build the struts2 environment and import necessary class libraries.
Web. xml file:
xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemalocation =
Twolinelistitem inherits Android. widget. relativelayout. It is composed of two subviews and is usually used in listview.
It requires two textviews (the id value is text1 and text2), and an optional third view (the id value is selectedicon)
Fragment is a part of the activity interface or an action. You can combine multiple fragment members into an activity to create a multi-faceted interface, and you can reuse one fragment in multiple activities. You can think of fragment as a
Handle system configuration changes
Many devices can change system configurations during operation, such as screen orientation, keyboard layout, and language. When similar changes occur, the system will restart the running activity (call ondestroy ()
Asynctask allows you to execute asynchronous work on your interface. It executes time-consuming operations in a work thread and sends the results to the interface thread. You do not need to manage the thread and handle yourself.
To use it, you must
I recently learned about Android. I have seen few articles on context, so I can check it online.
Context literally indicates the context, which is located in the android. content. in context, this type is actually long, similar to the handle in Win32
Modify main. Java and call the previous class to obtain the RSS list from intentert and display it on the UI:
Public final string rss_url = "http://blog.sina.com.cn/rss/1267454277.xml"; // get the RSS address from the networkPublic final string tag =
In Android, the position of popupwindow is usually determined by the showasdropdown function. This function has two overload functions, which are defined as follows:
Public void showasdropdown (view anchor) { showasdropdown (anchor, 0, 0); }
I recently wrote a project and encountered it. Record it here ....
Import Java. io. bytearrayoutputstream; Import Java. io. inputstream; Import android. app. activity; Import android. app. alertdialog; Import android. content. contentresolver;
What about Android and iOS?
Which one should I invest in first?
I have been asked this kind of question many times. I just need to consider the IOS version for my project. I simply did some research, so I had this article (this article does not
I recently learned about the network when I was playing Android. I wrote a computer as a server and the simulator as a socket communication program for the client. However, the mobile phone simulator client cannot connect to the computer server, run
1. Use layout_weight to implement adaptive screen
I. Details about layout_weight's most recommended Android multi-screen adaptive solution. This attribute determines the display weight of the control in its parent layout. It is generally used in
When you see the button on the main interface of Budweiser beer client, it looks novelty. First, watch the film:
Pay attention to the arrow I drew in the figure. At that time, the black circle of the mouse was clicked, and then the button was
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