
Android-samples-ApiDemos
文章平均质量分 77
zhizehan
这个作者很懒,什么都没留下…
展开
-
2E08-view-lists-Array(overlay)
介绍一个list滑动时通过一个text提示Array首字母位置的应用/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce原创 2014-05-21 15:48:55 · 942 阅读 · 0 评论 -
0703-APP-Notification-statue-bar
1.展示显示textTicker和只有icon的两种情况:当参数showTicker为true时显示否则不显示 // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(textId);原创 2014-05-12 19:05:15 · 898 阅读 · 0 评论 -
0904-APP-Remote-Sevice
介绍通过aidl连接远程的SeviceRemoteService.java/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file excep原创 2014-05-14 12:25:13 · 567 阅读 · 0 评论 -
2E07-view-lists-Collapsed
展示一个list item指示显示部分内容点击展开关闭的list原创 2014-05-21 14:56:43 · 715 阅读 · 0 评论 -
2E05-view-lists-cursor-people-phone
介绍是用Cursor和SimpleCursorAdapter实现listPeople list原创 2014-05-21 14:34:20 · 514 阅读 · 0 评论 -
2E01-View-Lists-single -choice-list
介绍一个可以单选列表原创 2014-05-21 13:46:18 · 457 阅读 · 0 评论 -
2C03-View-Layout-Animation-list-Reverse-Order
介绍list item倒序显示LayoutAnimation3.java/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file e原创 2014-05-20 14:27:21 · 558 阅读 · 0 评论 -
2C02-View-Layout-Animation-list-Cascade
描述list layout item有上倒下依次显示的代码实现形式LayoutAnimation2.java/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may no原创 2014-05-20 14:21:10 · 669 阅读 · 0 评论 -
2C01-View-Layout-Animation-Grid-Fade
介绍一个grid layout 顺序显示的代码LayoutAnimation1.java/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use th原创 2014-05-20 14:15:08 · 828 阅读 · 0 评论 -
0801-APP-Preferences-from-xml
展示从layout的文件读取生成PreferencesActivity,此此原创 2014-05-13 11:00:44 · 379 阅读 · 0 评论 -
0701-APP-Notification-IncommingMessage
1.Notification的生成 // look up the notification manager service NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); // The details of our fake原创 2014-05-12 18:35:05 · 471 阅读 · 0 评论 -
0803-APP-Preference-dependency
介绍android:dependency原创 2014-05-13 14:27:01 · 430 阅读 · 0 评论 -
0802-APP-launching-prefernces
这个例子展示了Activity在没有进去pre原创 2014-05-13 13:38:10 · 511 阅读 · 0 评论 -
0805-APP-Preferences-from-code
PreferencesActvity直接有代码生成/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complia原创 2014-05-13 14:29:15 · 567 阅读 · 0 评论 -
0804-APP-Preference-default-values
展示有默认值的Preferences,这个例子出列原创 2014-05-13 13:52:32 · 417 阅读 · 0 评论 -
0702-APP-notification-service
介绍用service不听的生成notification原创 2014-05-12 18:43:09 · 590 阅读 · 0 评论 -
0905-APP-Server-aruments
描述server启动传递以及线程的终止原创 2014-05-14 14:22:56 · 452 阅读 · 0 评论 -
0A01-APP-Text-to-Speech
描述把文本读出的API,在手机上测试知识支持英文,中文库应该没有所以不支持 /* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce原创 2014-05-14 14:32:39 · 719 阅读 · 0 评论 -
0901-APP-Service-foreground
介绍通过反射创建一个常驻状态栏的原创 2014-05-14 10:09:59 · 492 阅读 · 0 评论 -
2F03-view-progress-indeterminate-in-title-bar
介绍在在title bar上显示indeterminate progress/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file原创 2014-05-21 16:26:33 · 595 阅读 · 0 评论 -
2E03-view-lists-transcript
描述通过:mAdapter.add(text);为list原创 2014-05-21 14:03:39 · 488 阅读 · 0 评论 -
2H03-view-radio-group-rating-bar
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo原创 2014-05-21 17:06:57 · 698 阅读 · 0 评论 -
2G03-view-radio-group
注意两点1.通过android:checkedButton="@+id/lunch"而不是item中的 android:checked="true"设置的某人被选中状态 <RadioGroup android:layout_width="match_parent" android:layout_height="wrap_content" a原创 2014-05-21 16:41:42 · 663 阅读 · 1 评论 -
2D01-View-Layout-Table-Layout
android:layout_column="1" 控制Table View在第几列: <TextView android:layout_column="1" android:text="@string/table_layout_6_open" android:padding="3dip" /> android原创 2014-05-21 11:49:28 · 642 阅读 · 0 评论 -
2F01-view-progress-bar-incremental
是设置requestWindowFeature(Window.FEATURE_PROGRESS);title显示为progress原创 2014-05-21 16:11:08 · 515 阅读 · 0 评论 -
2E04-view-lists-slow-efficient-adapter
介绍自定一个的Adapter和list的监听注意1.原创 2014-05-21 14:18:25 · 1255 阅读 · 0 评论 -
1002-content-style-text
描述设置一个空格设置不同风格的文字1.通过标签在资源文件里设置 Plain, bold, italic, bold-italic2.在代码里直接对文字进行处理spannableStringBuilder 用法详解: SpannableString ss = new SpannableString("红色打电话斜体删除线绿色下划线图片:."); /转载 2014-05-14 15:23:37 · 488 阅读 · 0 评论 -
1003-content- external-storage
主要代码:/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License原创 2014-05-14 17:03:41 · 675 阅读 · 0 评论 -
2F02-view-progress-smooth
介绍不同大小的style原创 2014-05-21 16:20:13 · 396 阅读 · 0 评论 -
3001-os-morse-code
通过震动识别数字/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lice原创 2014-05-21 18:07:11 · 516 阅读 · 0 评论 -
2B01-View-Switcher
Gallery和swithcer联合使用/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complian原创 2014-05-19 13:46:25 · 737 阅读 · 0 评论 -
2E06-view-lists-separators
介绍通过方法 @Override public boolean areAllItemsEnabled() { return false; }@Overridepublic boolean isEnabled(int position) { return !mStrings[position].startsWith("-");}设置list的可以选和不可选注意有原创 2014-05-21 14:48:58 · 606 阅读 · 0 评论 -
0903-APP-Messenger-service
介绍通过Messenger实现远程service和本地的联系MessengerServiceActivities原创 2014-05-14 11:32:35 · 431 阅读 · 0 评论 -
0902-APP-Server-Binder-start
介绍bindService和startService的区别bindService原创 2014-05-14 10:32:22 · 434 阅读 · 0 评论 -
0005-APP-Activity-forwarding
根据mime type和chooser启动相应的Activity这转载 2014-05-09 17:31:23 · 332 阅读 · 0 评论 -
0401-APP--Intents
展示了intent设置Action和type(mime)以及创建Chooser的应用原创 2014-05-12 12:26:15 · 385 阅读 · 0 评论 -
2A01-View-Grid
描述网格包括手机上所有lunch icon/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance原创 2014-05-19 12:15:39 · 488 阅读 · 0 评论 -
2003-view-Animation-push
介绍ViewFlipperViewFlipperSimple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip betwee原创 2014-05-15 14:01:18 · 665 阅读 · 0 评论 -
2301-View-chronometer
介绍chronometer秒表/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with t原创 2014-05-15 18:07:57 · 304 阅读 · 0 评论 -
2201-View-button
展示一个大按钮、小按钮和原创 2014-05-15 17:51:02 · 407 阅读 · 0 评论