- 博客(10)
- 收藏
- 关注
原创 android禁止上下拉菜单
android禁止上下拉菜单,即上下滑会出现通知中心等只需在activity onCreate()使用:getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_GESTURE_ISOLATED);
2016-11-02 11:29:07
2182
原创 TextView中字符串string部分指定字符变色、加重点色
仅仅提供变色方法,返回结果直接设置到TextView即可/** * 标记String中指定字符串颜色 * @param srcString 源字符串 * @param markStr 需要标记的部分字符串 * @return 标记完的字符串,切不可对结果toString操作,否则可能导致标记失效 */ private
2015-12-03 16:25:34
868
1
转载 Android Loader加载器使用详解
onLoadFinished这个方法是在前面已创建的装载器已经完成其加载过程后被调用.这个方法保证会在应用到装载器上的数据被释放之前被调用.在此方法中,你必须删除所有对旧数据的使用(因为它将很快会被删除),但是不要自己去释放它们,因为它们的装载器会做这些事情.装载器一旦了解到应用不再使用数据时,将马上释放这些数据.例如,如果数据是一个从CursorLoader来的游标,你不应调用游标的cl
2014-08-14 16:31:33
426
原创 安卓从网络获取图片
/**********************??*/ //httpGet连接对象 HttpGet httpRequest = new HttpGet(imageUrl); //取得HttpClient 对象 HttpClient httpclient = new DefaultHttpClient();
2014-08-14 16:00:07
535
1
原创 初学安卓平分空间排列相同内嵌布局
<LinearLayout android:id="@+id/buttonmenu" android:layout_below="@id/recent_add" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_
2014-07-22 11:00:38
565
原创 安卓GridView实现监听手势滑屏翻页
addbooksGridGesture = new GestureDetector(context, new AddBooksGestureListener()); addbooksGrid.setOnItemClickListener(new BookLauncher()); addbooksGrid.setOnTouchListener(new OnTouchListener() {
2014-07-21 16:22:10
1523
1
原创 根据安卓应用包名获取应用的详细信息
ApplicationInfo appInfo = null; try { appInfo = context.getPackageManager().getApplicationInfo(name, 0); } catch (NameNotFoundException e) { e.printStackTrace(); } if (appInfo !=
2014-07-21 15:37:01
1202
1
原创 判断安卓Intent或Action在系统中是否能被启动
/** * @param context The application's environment. * @param intent The Intent to check for availability. * @return True if an Intent with the specified action can be sent and * resp
2014-07-21 15:22:21
903
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人