- 博客(7)
- 资源 (3)
- 收藏
- 关注
转载 Android Fragment
Fragment是activity的界面中的一部分或一种行为。你可以把多个Fragment们组合到一个activity中来创建一个多面界面并且你可以在多个activity中重用一个Fragment。你可以把Fragment认为模块化的一段activity,它具有自己的生命周期,接收它自己的事件,并可以在activity运行时被添加或删除。Fragment不能独立存在,它必须嵌入到activ
2013-10-28 09:25:37 1111
原创 计算listview高度
/** * 计算listview高度 * * @param pull */ public void setPullLvHeight(ListView pull) { int totalHeight = 0; ListAdapter adapter = pull.getAdapter();
2013-10-15 10:57:05 816
原创 获取状态栏高度
/** * 获取状态栏高度 * * @return */ public int getStatusBarHeight() { Class c = null; Object obj = null; java.lang.reflect.Field field = null;
2013-10-14 15:14:51 765
转载 Android Framework---styles.xml
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http
2013-10-09 20:23:07 2225
原创 Android Activity加入半透明蒙板,实现夜间模式
public void night() { if (mNightView == null) { mNightView = new TextView(this); mNightView.setBackgroundColor(Color.BLACK); windowLayout.addView(mNight
2013-10-09 20:07:41 5694 1
转载 android 状态栏、标题栏、屏幕高度
1.获取状态栏高度: decorView是window中的最顶层view,可以从window中获取到decorView,然后decorView有个getWindowVisibleDisplayFrame方法可以获取到程序显示的区域,包括标题栏,但不包括状态栏。于是,我们就可以算出状态栏的高度了。 Java代码 Rect frame = new Rect()
2013-10-09 17:13:04 2421
viewpager左右循环导航控制跳转
2013-05-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人