This post focuses on some of the things that emoticons send.Reference: Android XMPP-based Instant Messaging 1-basic conversation1. Prepare the resource file.Using the emoji expression, I packed it,: http://files.cnblogs.com/files/pear-lemon/drawable.zip2. Expression layout file Layout_send_emotion.xmlXML version= "1.0" encoding= "Utf-8"?>Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/
) {return false;} if (event.getaction () = = motionevent.action_up) {float x = Event.getx (); Float y = Event.gety (); Boolean flag = Cancelcurinfo (x, y), if the coordinates of the IF (flag) {return false;//up are no longer in the link object recorded when down, the}if (Clicklink (titlelist, x, Y, motionevent.action_up) is returned directly {//log.i ("Curinfo", "action_up"); return true;}} else if (event.getaction () = = Motionevent.action_down) {float x = Event.getx (); Float y = Event.gety ()
Android components ------ list selection box, Android components ------ list
The list selection box provided by Android is equivalent to the selection drop-down box for web terminal user registration, such as the province and city
Recently began to learn the Android UI, a few related examples, the follow-up will be updated.
Copy Code code as follows:
Import android.app.ListActivity;
Import Android.os.Bundle;
Import Android.widget.ArrayAdapter;
/**
* A List View example where the
* Data for the "list comes from" an array of strings.
*/
public class List1 extends Lista
. Permission. FlashlightWhen you access the flashlight, the android Development Network prompts that HTC Dream does not contain the flashlight (allows access to the flashlight)
Android. Permission. force_backAllow the program to forcibly perform a back operation on activities (allows an application to force a back operation on whatever is the top activity .)
Android
Today, the boss has a requirement to add our applications to the sharing list. I can't do it on Android. Well, let's not say anything. Find information.
First, the following steps should be taken based on multiple experiences.
1. Search for logs. logcat is a good thing that can help you quickly locateProgramNot only can we find bugs, but some prompts can help you find some entry points to solve the p
I recently started to learn about the android ui. First, I will give several related examples, and there will be some updates later.
Copy codeThe Code is as follows: import android. app. ListActivity;
Import android. OS. Bundle;
Import android. widget. ArrayAdapter;
/*** A list
Decompress the android list and expand the QQ-like friend list (very detailed, with source code ).
Original works of Lin bingwen Evankaka. Reprinted please indicate the source http://blog.csdn.net/evankaka
ExpandableListView is a view that shows two levels of list items vertically. Unlike ListView, ExpandableListView c
?? Android uses Intent to pass the object, list, List
, Object>
Method 1:
If you simply pass the List
Or List
Then you can directly use
Java code
Intent. putStringArrayListExtra (name, value)
Intent. putIntegerArrayListExtra (name, value)
Method
first is the layout file:
The first two controls use the Android spinner Drop-down list style, and the red part is the value I set in the Res->values->strings file:
Main Activity code:
public class Activityone extends activity {private Spinner spin1;//default Spinner, display private Spinner below the button spin2;//default Spinn Er, in the form of dialog for the user to show th
Lin Bingwen Evankaka Original works. Reprint please specify the source Http://blog.csdn.net/evankakaExpandablelistview is a vertical scrolling view of level two list items, and unlike a ListView, it can have two layers: each layer can be expanded independently and display its children. Friends QQ list, you can expand, can be put up, in Android, used to be more th
Copy Code code as follows:
Import android.app.ListActivity;
Import Android.database.Cursor;
Import Android.os.Bundle;
Import Android.provider.Contacts.Phones;
Import Android.widget.ListAdapter;
Import Android.widget.SimpleCursorAdapter;
/**
* A List View example where the
* Data comes from a cursor, and a
* Simplecursorlistadapter is used to map all item to a two-line
* Display.
*/
public class List3 extends Listactivity {
@Overr
Mactiondownx and Mactiondowny, and then action_move the incident, we first have to judge, this judgment is two steps, the first step, judge this action_move event, The position of the current event CurX and Cury whether the distance recorded on the x axis and on the y-axis and Action_down has exceeded the Touch_slop value, which is the threshold that Android uses to determine if a slide should be made, and the second step, We want to further determin
Expandablelistview is a view with a vertical scrolling display of level two list items, unlike ListView, which can have two layers: each layer can be expanded independently and displayed with its subkeys.Friends QQ list, you can expand, you can put up, in Android, the past is more than ListView, although you can implement the display of the
Document directory
Solution:
Solution:
Http://my.oschina.net/haquanwen/blog/54394
Listview is a commonly used display control. The default background is the same transparent color as the system window. If a background image or background color is added to listview, The listview will be black when scrolling, because, during scrolling, when the view in the list is re-painted, the system still uses the default transparent color. The color value is # f
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.