Android 技术笔记
ending0421
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Android drawText 纵向居中
protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); Paint textPaint = new Paint(); textPaint.setARGB(200, 254, 0, 0); textPaint.setTextA原创 2014-11-06 13:24:57 · 1026 阅读 · 0 评论 -
Android LinearLayout layout_weight的几点解释
http://www.2cto.com/kf/201402/280721.html 原作地址:转载 2014-11-24 15:15:24 · 570 阅读 · 0 评论 -
Android DialogFragment fullscreen 解决方法
关键代码@Override public Dialog onCreateDialog( Bundle savedInstanceState ) {final Dialog dialog = new Dialog( getActivity() ); dialog.requestWindowFeature( Window.FEATURE_NO_TITLE );d原创 2014-12-03 17:33:16 · 994 阅读 · 0 评论 -
ListView 滑动边界的模糊效果
android 2.3 版本之前 设置listView 或者expandableListView 的滚动边界模糊效果使用android:fadingEage="" (none | horizontal | vertical )有效;android 2.3 版本之后 上述属性无效,需改为android:overScrollMode=""(never | always | ifC原创 2015-01-28 10:18:41 · 750 阅读 · 0 评论 -
自定义Android TextView onDraw 死循环问题
这几天一直在做一个自定义TextView 基本逻辑是在onDraw里实现的,但是通过打印出来的Log发现onDraw一直在死循环的调用 坑爹的调试的半天,发现问题在于onDraw里使用了TextView的setTextColor 方法 。TextView 中自带的setTextColor方法会在一定情况下调用invalidate()方法通知该View刷新 这也就是造成了onDraw原创 2015-04-07 16:00:57 · 2775 阅读 · 0 评论 -
scroll view 中嵌套listview gridview 时,listview gridview match_parent 无效
scroll view 中嵌套一个listview 或者gridview 时 listview(gridview) 沾满全部屏幕空间,一般表现状态为只显示一个item 的高度。 这时可以在scroll view xml 节点中配置attribute android:fillViewport="true"该属性的作用为允许scrollview 的child view 修改scroll view原创 2016-03-09 09:59:51 · 1166 阅读 · 0 评论 -
Android Environment 常量含义
String MEDIA_BAD_REMOVALStorage state if the media was removed before it was unmounted.String MEDIA_CHECKING Storage state if the media is present and being disk-checked.String MEDIA_EJ原创 2016-04-06 09:04:43 · 545 阅读 · 0 评论 -
Mediaplayer State Diagram
State DiagramPlayback control of audio/video files and streams is managed as a state machine. The following diagram shows the life cycle and the states of a MediaPlayer object driven by the suppor原创 2016-04-15 16:10:11 · 934 阅读 · 0 评论 -
Fragment 中的onConfigurationChanged 在切换语言的情况下不被回调的解决办法
原文链接:http://stackoverflow.com/questions/18725396/onconfigurationchange-not-called-after-changing-locale在Fragment依附的Activity的manifest android:configChange="" 不能只加locale (android:configChange="loc原创 2016-05-03 16:20:09 · 4311 阅读 · 0 评论
分享