摘要: 控件:CheckBox android:background="@drawable/me_setting_switch_selector"这个表示替换默认控件的背景android:button="@drawable/me_setting_switch_selec... 阅读全文
posted @ 2014-06-27 10:18 sleepend 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 直接指向网页[InternetShortcut]URL=http://user.qzone.qq.com/2275471603Modified=F00F43B3A875C601D9ShowCommand=7IconIndex=1IconFile=C:\WINDOWS\SYSTEM\url.dllHo... 阅读全文
posted @ 2014-05-03 00:41 sleepend 阅读(534) 评论(0) 推荐(0) 编辑
摘要: //商家类Store 按距离进行排序public class ComparatorStore implements Comparator { @Override public int compare(Store lhs, Store rhs) { ... 阅读全文
posted @ 2014-04-21 19:31 sleepend 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Volley框架中%2B04-18 15:19:11.620: E/Volley(14908): [313376]BasicNetwork.performRequest: Unexpected response code 505 for http://121.199.20.10:8095/Mobil... 阅读全文
posted @ 2014-04-18 15:22 sleepend 阅读(2361) 评论(0) 推荐(0) 编辑
摘要: volley google提供的一个关于网络请求的框架参考:http://blog.csdn.net/t12x3456/article/details/9221611http://www.cnblogs.com/freexiaoyu/p/3446028.html代码:import org.json.JSONObject;import android.app.Activity;import android.graphics.Bitmap;import android.os.Bundle;import android.support.v4.util.LruCache;import android. 阅读全文
posted @ 2014-03-06 16:35 sleepend 阅读(1113) 评论(0) 推荐(0) 编辑
摘要: android手机定位,只有代码,已经实现locationListener接口 private String providerName; LocationManager lm; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); init(); } private void init() { ... 阅读全文
posted @ 2014-02-24 15:52 sleepend 阅读(378) 评论(0) 推荐(0) 编辑
摘要: 先是弹窗的样式0 1 然后是java代码 1 /** 2 * 弹出时间选择控件 3 * 4 * @Description:从右边弹出时间选择控件 5 * @author sleep 6 * @date create date 2013年12月24日 7 * @version V1.0 8 */ 9 public class PopDateWindow extends Dialog 10 { 11 private Window window = null; 12 private Context context = null; 13 private ListView list;... 阅读全文
posted @ 2013-12-25 15:18 sleepend 阅读(755) 评论(0) 推荐(0) 编辑
摘要: 如果一个应用想将私有的数据暴露给其它应用,则可以注册、实现ContentProvider,某今天才知道,以前还把这玩意当成只能访问数据库的用呢.... 阅读全文
posted @ 2013-11-19 11:52 sleepend 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 本方法用来监听ViewPager中的元素public Object instantiateItem(View view, int position){ View v = views[position]; ImageView image = v.findViewById(R.id.image); image.setOnClickListener(new .....你懂得); ((ViewPager) view).addView(v); return v;} 阅读全文
posted @ 2013-11-11 16:31 sleepend 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 只要在onCreate()中注册// 注册广播 receiver = new ShopDetailBroadcserReceiver(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction("com.szx.YYY"); this.registerReceiver(receiver, intentFilter);声明一个广播/* * 接收个数量改变广播 */ public class ShopDetailBroadcserReceiver extends BroadcastRecei 阅读全文
posted @ 2013-10-26 16:43 sleepend 阅读(267) 评论(0) 推荐(0) 编辑