摘要: android:screenOrientation="landscape"是限制此页面横屏显示, android:screenOrientation="portrait"是限制此页面数竖屏显示。 android:screenOrientation设定该活动的方向,该值可以是任何一个下面的字符串: " 阅读全文
posted @ 2016-02-25 10:13 老鸟博客 阅读(295) 评论(0) 推荐(0) 编辑
摘要: <EditText id="@+id/text" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0" android:paddingBottom="4"> 阅读全文
posted @ 2016-02-24 10:12 老鸟博客 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 前言 众所周知,每个Android应用程序在运行时都有一定的内存限制,限制大小一般为16MB或24MB(视平台而定)。因此在开发应用时需要特别关注自身的内存使用量,而一般最耗内存量的资源,一般是图片、音频文件、视频文件等多媒体资源;由于Android系统对音频、视频等资源做了边解析便播放的处理,使用 阅读全文
posted @ 2016-02-19 10:45 老鸟博客 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 查看 res/values/styles.xml 下的报错点。 <style name="AppBaseTheme" parent="Theme.AppCompat.Light"> 把这个改成 <style name="AppBaseTheme" parent="android:Theme.Ligh 阅读全文
posted @ 2016-02-19 10:13 老鸟博客 阅读(422) 评论(0) 推荐(0) 编辑
摘要: Android中ListView获得焦点的项默认是黄色的(模拟器上) 现在因为需求想要自己定义被选中项的背景能实现吗?最佳答案完全可以实现,这用到了Android的Selector(根据组件的状态显示该状态对应的图片,并以此图片作为背景显示)。 把下面的XML文件保存成你自己命名的.xml文件(比如... 阅读全文
posted @ 2016-01-22 10:03 老鸟博客 阅读(653) 评论(0) 推荐(0) 编辑
摘要: 1. Parcelable接口Interface for classes whose instances can be written to and restored from a Parcel。 Classes implementing the Parcelable interface must ... 阅读全文
posted @ 2016-01-21 09:55 老鸟博客 阅读(163) 评论(0) 推荐(0) 编辑
摘要: android view setVisibility():有三个参数:Parameters:visibility One of VISIBLE, INVISIBLE, or GONE,想对应的三个常量值:0、4、8VISIBLE:0 意思是可见的INVISIBILITY:4 意思是不可见的,但还占着... 阅读全文
posted @ 2015-12-17 19:40 老鸟博客 阅读(447) 评论(0) 推荐(0) 编辑