摘要: 转自http://blog.csdn.net/fzh0803/article/details/7971391由于scrollview和listview不能直接共存,在scrollview中直接使用lsitview的话只会显示一个条目,要使他们共存,据我所知,有三种方法:1。如果listview的高度是一定的话,可以重写一个listview在onmesure方法里设定固定高度,如下代码:@Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeas 阅读全文
posted @ 2013-08-08 16:44 邪天殇 阅读(1528) 评论(0) 推荐(0) 编辑
摘要: 转自http://blog.csdn.net/fzh0803/article/details/9474359listview的父亲要求滑动,在点击listview区域时要求在滑动的只是只滑动listview,但一般做法无法满足要求,listview无法兼顾点击事件与滑动。解决的办法是,给item设置一个rootview,重写rootview的onTouchEvent@Overridepublic boolean onTouchEvent(MotionEvent event) {final int action = event.getAction();if(action == MotionEve 阅读全文
posted @ 2013-08-08 16:43 邪天殇 阅读(7881) 评论(0) 推荐(0) 编辑
摘要: 转自http://www.open-open.com/lib/view/open1328069449468.htmlAndroid横竖屏要解决的问题应该就两个:一.布局问题二.重新载入问题1.布局问题:如果不想让软件在横竖屏之间切换,最简单的办法就是在项目的AndroidManifest.xml中找到你所指定的activity中加上android:screenOrientation属性,他有以下几个参数:"unspecified":默认值 由系统来判断显示方向.判定的策略是和设备相关的,所以不同的设备会有不同的显示方向."landscape":横屏显示( 阅读全文
posted @ 2013-08-08 15:53 邪天殇 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 主要类 TelephonyManager: telephonyManager.getCellLocation();//获得服务区 telephonyManager.getCellId();//获得服务小区ID /*获取Sim卡运营商*/ IMSI=telephonyManager.getSubscriberId(); //IMSI号前面3位460是国家,紧接着后面2位0002是中国移动,01是中国联通,03是中国电信。 阅读全文
posted @ 2013-08-08 11:41 邪天殇 阅读(324) 评论(0) 推荐(0) 编辑
摘要: private final void updateDataNetType(int slotId) { int tempDataNetType; NetworkType tempDataNetType3G = NetworkType.Type_G; if (slotId == Phone.GEMINI_SIM_1) { tempDataNetType = mDataNetType; } else { tempDataNetType = mDataNetTypeGemini; } ... 阅读全文
posted @ 2013-08-08 10:19 邪天殇 阅读(2113) 评论(0) 推荐(0) 编辑