- 浏览: 3954648 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
hinuliba:
...
字体背景颜色的高度修改 -
KANGOD:
最后的 -createDialog() 私有方法是怎么回事,没 ...
简单的实现listView中item多个控件以及点击事件 -
sswangqiao:
呵呵,呵呵
onActivityResult传值的使用 -
yumeiqiao:
感觉你所的不清楚 lstView.setOnTouchLi ...
listview中viewflipper的问题 -
lizhou828:
果然是大神啊!!!
Animation动画效果的实现
1.从resources 里面的数组转化成代码:
int indicesInt[] = context.getResources().getIntArray(R.array.indices);
short indices[] = new short[indicesInt.length];
for (int i = 0; i < indicesInt.length; i++) { indices[i] = (short)indicesInt[i];}
2.intent-filter的用法,得到特定的网址后 自动响应intent
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="www.youtube.com" android:scheme="http"></data>
</intent-filter>
<uses-permission android:name="android.permission.INTERNET" />
<activity android:name=".activity.ExeReceiver">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:host=".*" />
<data android:mimeType="*/*"/>
</intent-filter>
</activity>
3. 得到后台运行的程序
ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> l = am.getRunningAppProcesses();
4.为程序添加一个“分享”发送到某个地方,只能在主xml实现目前,而不能用代码实现:
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter >
然后就可以启动代码了
Intent intent = new Intent(Intent.ACTION_SEND);
startActivity(Intent.createChooser(intent , "Send options"));
http://groups.google.com/group/android-developers/browse_thread/thread/62a514363c751464/feecc033d0265606?lnk=gst&q=intentfilter+share#feecc033d0265606
5.在代码中注册一个registerReceiver的方法:
public class MyActivity extends Activity {
private static final String TAG = "MyActivity";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_SEND);
intentFilter.addCategory(Intent.CATEGORY_DEFAULT);
try {
intentFilter.addDataType("image/*");
} catch (MalformedMimeTypeException e) {
Log.e(TAG, e.toString());
}
Intent x = registerReceiver(new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
Log.d(TAG, "Received intent "+intent);
intent.setComponent(new ComponentName(context,
Uploader.class));
startActivity(intent);
}
}, intentFilter);
if (x==null)
Log.i(TAG, "failed to regist a receiver");
else
Log.i(TAG, "registed a receiver successfully");
// ...
http://groups.google.com/group/android-developers/browse_thread/thread/ca183e0cbe0e1aec/34fa612bafd4c22f?lnk=gst&q=gallery#34fa612bafd4c22f
6.从CalendarProvider得到数据的方法:
ContentResolver contentResolver = context.getContentResolver();
Cursor cursor = contentResolver.query(Uri.parse("content://calendar/events"), null, null, null, null);
while(cursor.moveToNext()) {
String eventTitle = cursor.getString(cursor.getColumnIndex("title"));
Date eventStart = new Date(cursor.getLong(cursor.getColumnIndex("dtstart"))); // etc.}
让手机打不出电话解决办法
1) Create a BroadcastReceiver with a priority of 0. 2) In the BC intercept the ACTION_NEW_OUTGOING_CALL intent in its OnReceive method 3) call setResultData(null) in the same method
添加 an image icon in在expandable list view ,取代默认的图片
setGroupIndicator(Drawable)
int indicesInt[] = context.getResources().getIntArray(R.array.indices);
short indices[] = new short[indicesInt.length];
for (int i = 0; i < indicesInt.length; i++) { indices[i] = (short)indicesInt[i];}
2.intent-filter的用法,得到特定的网址后 自动响应intent
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="www.youtube.com" android:scheme="http"></data>
</intent-filter>
<uses-permission android:name="android.permission.INTERNET" />
<activity android:name=".activity.ExeReceiver">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:host=".*" />
<data android:mimeType="*/*"/>
</intent-filter>
</activity>
3. 得到后台运行的程序
ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> l = am.getRunningAppProcesses();
4.为程序添加一个“分享”发送到某个地方,只能在主xml实现目前,而不能用代码实现:
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter >
然后就可以启动代码了
Intent intent = new Intent(Intent.ACTION_SEND);
startActivity(Intent.createChooser(intent , "Send options"));
http://groups.google.com/group/android-developers/browse_thread/thread/62a514363c751464/feecc033d0265606?lnk=gst&q=intentfilter+share#feecc033d0265606
5.在代码中注册一个registerReceiver的方法:
public class MyActivity extends Activity {
private static final String TAG = "MyActivity";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_SEND);
intentFilter.addCategory(Intent.CATEGORY_DEFAULT);
try {
intentFilter.addDataType("image/*");
} catch (MalformedMimeTypeException e) {
Log.e(TAG, e.toString());
}
Intent x = registerReceiver(new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
Log.d(TAG, "Received intent "+intent);
intent.setComponent(new ComponentName(context,
Uploader.class));
startActivity(intent);
}
}, intentFilter);
if (x==null)
Log.i(TAG, "failed to regist a receiver");
else
Log.i(TAG, "registed a receiver successfully");
// ...
http://groups.google.com/group/android-developers/browse_thread/thread/ca183e0cbe0e1aec/34fa612bafd4c22f?lnk=gst&q=gallery#34fa612bafd4c22f
6.从CalendarProvider得到数据的方法:
ContentResolver contentResolver = context.getContentResolver();
Cursor cursor = contentResolver.query(Uri.parse("content://calendar/events"), null, null, null, null);
while(cursor.moveToNext()) {
String eventTitle = cursor.getString(cursor.getColumnIndex("title"));
Date eventStart = new Date(cursor.getLong(cursor.getColumnIndex("dtstart"))); // etc.}
让手机打不出电话解决办法
1) Create a BroadcastReceiver with a priority of 0. 2) In the BC intercept the ACTION_NEW_OUTGOING_CALL intent in its OnReceive method 3) call setResultData(null) in the same method
添加 an image icon in在expandable list view ,取代默认的图片
setGroupIndicator(Drawable)
发表评论
-
URI 转path
2019-06-26 10:41 1344转自知乎Matisse package com.zhihu ... -
权限申请
2017-09-22 13:25 1274public class PermissionActivit ... -
onPreviewFrame 相机输出格式转换yuv420p保存成图片
2015-11-25 15:59 7609在最近项目中,因为特殊需要,底层相机往外输出了i420 也 ... -
new Android's Runtime Permission
2015-11-03 21:05 1251targetSdkVersion 23 开始 使用运行时权 ... -
自定义listview 边缘效果
2015-02-28 10:58 1754static void ChangeEdgeEffect( ... -
发射打开wifi
2015-01-07 10:25 1450WifiManager wifiManager = (Wif ... -
RecyclerView
2014-11-05 13:08 1292http://www.grokkingandroid.com ... -
获取点击区域
2014-04-28 09:39 1593@Override public void getHitR ... -
speex 和libogg 编译
2014-04-03 16:17 6415下载: http://www.speex.org/down ... -
rsync 同步
2014-03-28 17:06 1846两台android 设备 进行rsy ... -
流转字符串
2014-03-11 09:49 1563public static String convertSt ... -
java simplexml 序列化
2014-03-06 13:22 5989<?xml version="1.0&quo ... -
获取其他程序的特定资源
2014-03-05 09:33 1701try { PackageManager man ... -
检测来电属于哪个sim卡
2014-02-07 10:41 1743public class IncomingCallInter ... -
使用 NDK r9 编译ffmpeg
2014-01-16 13:32 168611. 环境 ubuntu 我的是13.10 ndk r9 ... -
android h264含so
2014-01-13 11:24 1560http://download.csdn.net/downlo ... -
xml转义字符
2013-12-18 09:29 1605" " ' & ... -
字体背景颜色的高度修改
2013-12-11 10:31 4243当使用android:lineSpacingExtra= ... -
屏保的实现
2013-12-07 10:27 2831最近需要做一个屏保,开始以为很简单,因为系统本身就带了屏保功 ... -
PreferenceActivity下嵌套PreferenceScreen在其它布局中
2013-11-21 16:32 9189今天在修改系统代码的时候,系统代码用了PreferenceA ...
相关推荐
通过Utils_plugin-master,开发者可以便捷地生成和定制工具类,从而更专注于业务逻辑的实现,减少琐碎工作,提高开发速度。对于大型团队和频繁开发新功能的项目,这样的插件无疑是不可或缺的。因此,熟悉并熟练使用...
它从Android繁杂的源代码中抽取出了Android开发的“精华”和“要点”,剥离了大量琐碎的底层实现细节,进行了高度概括和总结,不仅能帮助开发者迅速从宏观上理解整个Android系统的设计理念,而且能帮助开发者迅速从...
总的来说,“android-studio-ide-202.7351085-windows”这个压缩包提供的Android Studio 4.2.1版本,是Windows平台上开发Android应用的利器,它集成了所有必要的工具,使得开发者能够专注于创新,而非被琐碎的配置...
使用“Android-Fragmentation”库,开发者能够将更多精力集中在业务逻辑上,而不是解决Fragment管理上的琐碎问题。在实际开发中,通过引入这个库,可以显著提升开发效率,减少bug,提高应用的稳定性和用户体验。 在...
它从Android繁杂的源代码中抽取出了Android开发的“精华”和“要点”,剥离了大量琐碎的底层实现细节,进行了高度概括和总结,不仅能帮助开发者迅速从宏观上理解整个Android系统的设计理念,而且能帮助开发者迅速从...
总的来说,Android Eclipse Plugin 12.0 是Android开发者不可或缺的工具,它极大地简化了开发流程,提升了开发效率,让开发者能够专注于创新和优化应用功能,而不是被琐碎的配置和构建问题困扰。
"Android记事本"就是这样一个应用,它允许用户在手机或平板电脑上轻松记录每天的点滴,无论是工作事项、生活琐碎还是灵感瞬间,都能随时随地保存下来。本文将深入探讨这款应用的功能特性、适用场景以及如何在Android...
这个框架结合了Android开发的最佳实践和Bootstrap的灵活性,使开发者可以更加专注于应用程序的功能实现,而不是琐碎的界面设计。 ### 一、Android-Bootstrap属性详解 `android-bootstrap`框架包含了一系列自定义的...
5. **编译和预览**:在完成内容编辑和布局后,用户可以编译成CHM文件,同时在编译前预览效果,确保内容的完整性和正确性。 "琐碎打包1.8.1"的版本号1.8.1可能表示该软件已经经过多次迭代,修复了之前的bug,增强了...
总之,\"Android Layout Converter\"是Android开发者的得力工具,通过它,我们能够更加高效、便捷地完成布局设计,专注于创造优秀的用户体验,而不被琐碎的代码编写所困扰。对于新手和经验丰富的开发者而言,这款...
在信息爆炸的数字化时代,...无论是一天中的琐碎日常,还是学习和工作中获得的宝贵经验,【魔法日记本】都能为用户提供一个安全、可靠且便利的平台,让每一个珍贵的瞬间都得到妥善保存,让记录生活变得轻松而富有乐趣。
如果你有许多小的文档、编程用的源代码、小图片等等琐碎的东西,弃之可惜,长期放在各个文件夹里又显零乱,偶而要用找起来也麻烦,琐碎打包工具可以帮助你将这些琐碎打包成一个chm文件,还可以加上说明页,既有目录...
许多人没有大量的时间在电脑上网游戏,于是,人们越来越乐意在琐碎的时间里在手机上玩一些小游戏。运行在安卓系统平台的小游戏逐渐收到大众的喜爱。 系统目标: 本系统以Android操作系统作为开发平台,Eclipse作为...
这些插件的使用能够显著提升Android开发者的生产力,使他们能够更专注于应用的功能和用户体验,而不是被琐碎的编码细节所拖累。为了安装这些插件,只需将压缩包解压后将插件文件放入Android Studio的plugins目录下,...
总之,Android Studio作为Android应用开发的主力工具,其丰富的功能和不断优化的用户体验,让开发者能专注于创新,而非琐碎的工具配置。无论是新手还是老手,都应掌握这个强大的IDE,以应对日益复杂的Android开发...
数据库表的琐碎知识5.sql
它从Android繁杂的源代码中抽取出了Android开发的“精华”和“要点”,剥离了大量琐碎的底层实现细节,进行了高度概括和总结,不仅能帮助开发者迅速从宏观上理解整个Android系统的设计理念,而且能帮助开发者迅速从...
在选择记录什么时,我们应该强调选择有感触、有意义的事件,而非面面俱到、琐碎无章。每篇日记都应有它的主题和焦点,这样才能够避免内容的杂乱无章,保证文章的深度和价值。 日记的格式也有其独特的规范。日记通常...
可以快速,简便清除C盘垃圾,并不留痕迹。
QMUI_Android_v2.0.0-alpha10是一款针对Android平台设计的高效UI开发框架,...通过深入研究和使用QMUI,开发者可以更加专注于业务逻辑,而不是被琐碎的界面细节所困扰,从而提高开发效率,打造出高质量的Android应用。