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
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
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
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
Use ResolveInfo
Public class ResolveInfoDemo extends Activity {private GridView; private PackageManager pManager; private List
GetAllApps. java
public class GetAllApps {private Context mContext;private PackageManager packageManager;private int mIconDpi;private String tag = "GetAllApps";private List
Here, getDrawableForDensity must be supported by sdks of version 15 or later. Launcher of all earlier ve
Android quick index (City list and contacts) and android Index
You need to quickly index a city list. Similar to a contact application, the quick indexing function is based on the first letter of the name.To implement this function, you only need to solve two problems:
1. G
Android interface component ---- List View, Android component ---- View
The ListView list view is the most common component in Android. It displays the list items to be displayed in a vertical
Catalogue
Android Studio first Run detects Android SDK and updates, and for well-known reasons we will "unable to access Android SDK add-on list", and everyone is generally configured in advance Androi D SDK, when you really need to update the SDK Manager to manually update it.Solution:In the
If you have multiple Android devices (including Android emulators) connected to your PC, you will need to use the Adb-s DeviceID shell when you enter the console. More trouble, this article has written a shell script file (need to be used under Linux or OS X, Windows needs to be newly written with bat or cmd).The basic idea is to use the ADB devices command to scan how many
all_apps_action: lists all available applications.
Input: none. "Android. Intent. Action. all_apps"
String alternative_category type: indicates that activity is an optional operation on the data you are browsing. "Android. Intent. Category. Alternative"
String answer_action: process the incoming call. "Android. Intent. Action. Answer"
String battery_changed_acti
applications.Input: none. "Android. intent. action. ALL_APPS"StringALTERNATIVE_CATEGORY category: indicates that activity is an optional operation for the data you are browsing. "Android. intent. category. ALTERNATIVE"StringANSWER_ACTION: process the incoming call. "Android. intent. action. ANSWER"StringBATTERY_CHANGED_ACTION broadcast: the charging status, or t
Download the album list and source code for android (4). Download the android source code
The functions of this project are as follows:Obtain the mobile phone album. Click each album to go to the image list page of the album. You can select multiple images on the image list
Enter the command:Lianxumacdemac-mini-2:hello-jni lianxumac$ Android list targetsAvailable Android Targets:----------Id:1 or "android-7"Name:android 2.1Type:platformAPI Level:7Revision:3SKINS:HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854Tag/abis:default/armeabi----------Id:2 or "
If you have multiple Android devices (including Android emulators) connected to your PC, you will need to use the Adb-s DeviceID shell when you enter the console. More trouble, this article has written a shell script file (need to be used under Linux or OS X, Windows needs to be newly written with bat or cmd).The basic idea is to use the ADB devices command to scan how many
The Android device selection list is displayed, and the Shell script of the specified Android device Console is displayed.
If a PC is connected to multiple Android devices (including Android simulators), you must use adb-s deviceid shell when entering the Console. This artic
Android-tipsThis is a awesome list of tips for Android.If You is a beginner, this list would be being the first choice for you, and you have a difficult time.welcomestar andfork , your support is my greatest affirmation.
Learning Android so far, big and small pits have not stepped on, fortunately, in the powerf
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.