上一页 1 ··· 6 7 8 9 10 11 下一页

2013年5月30日

android 之WindowManager.LayoutParams

摘要: 在代码里动态添加布局view文件private LayoutParams windowParams = null;private WindowManager windowManager = null;private void startDrag() {windowParams = new WindowManager.LayoutParams();windowParams.gravity = Gravity.TOP | Gravity.LEFT;windowParams.height = WindowManager.LayoutParams.WRAP_CONTENT;windowParams.w 阅读全文

posted @ 2013-05-30 14:02 yujian_bcq 阅读(523) 评论(0) 推荐(0) 编辑

2013年5月23日

android 实现左右上下震动的效果

摘要: 1:在acti里调用代码Animation shakeAnim = AnimationUtils.loadAnimation(mContext, R.anim.shake_y);passWd.startAnimation(shakeAnim);2:在anim目录下的shake_y.xml<?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android" android: 阅读全文

posted @ 2013-05-23 17:38 yujian_bcq 阅读(675) 评论(0) 推荐(0) 编辑

2013年5月21日

android EditText与Filterable接口之模糊查询

摘要: 对于模糊查询AutoCompleteTextView控件也是继承自EditText,并结合Filterable接口来实现模糊查询的效果代码如下:public class UserAdapter extends BaseAdapter implements Filterable { private ... 阅读全文

posted @ 2013-05-21 14:36 yujian_bcq 阅读(1761) 评论(0) 推荐(0) 编辑

2013年5月16日

android 之http网络请求之基本的GET,POST请求一

摘要: 首先封装一个方法获取httpclient对象public static HttpClient getHttpClient() {// 创建 HttpParams 以用来设置 HTTP 参数(这一部分不是必需的)httpParams = new BasicHttpParams();// 设置连接超时和 Socket 超时,以及 Socket 缓存大小HttpConnectionParams.setConnectionTimeout(httpParams, 20 * 1000);HttpConnectionParams.setSoTimeout(httpParams, 20 * 1000);Htt 阅读全文

posted @ 2013-05-16 18:01 yujian_bcq 阅读(337) 评论(0) 推荐(0) 编辑

2013年5月15日

java 基础之list,hashmap遍历取值

摘要: http://www.cnblogs.com/wing011203/archive/2013/05/13/3075467.html java基础学习/* * Collection 属性* •添加元素:add/addAll* •清空集合:clear * •删除元素:remove/removeAll*... 阅读全文

posted @ 2013-05-15 16:36 yujian_bcq 阅读(1063) 评论(0) 推荐(0) 编辑

android 弹出框总结二

摘要: 1:在基类里实现此方法,封装按钮监听实现protected AlertDialog showAlertDialog(String pTitle, String pMessage,DialogInterface.OnClickListener pOkClickListener,DialogInterface.OnClickListener pCancelClickListener,DialogInterface.OnDismissListener pDismissListener) {mAlertDialog = new AlertDialog.Builder(this).setTitle(pT 阅读全文

posted @ 2013-05-15 14:02 yujian_bcq 阅读(176) 评论(0) 推荐(0) 编辑

2013年5月13日

android 弹出框总结一

摘要: 方法1:在当前acti里获取(WindowManager) getSystemService(Context.WINDOW_SERVICE); 管理对象;然后获取WindowManager.LayoutParams 对象来对view的属性进行设置 ,各种现实的样式;然后 windowManager.addView(linear, lp); 在当前acti里去addview; 在acti中的onDestroy()windowManager.removeView(linear);(ViewGroup.LayoutParams http://www.eoeandroid.com/thread-849 阅读全文

posted @ 2013-05-13 15:21 yujian_bcq 阅读(493) 评论(0) 推荐(0) 编辑

android 之事件驱动一

摘要: MotionEvent事件在onInterceptTouchEvent()、onTouchEvent()中的传递顺序onInterceptTouchEvent():返回值为true时事件会传递给当前控件的onTouchEvent(),而不在传递给子控件,这就是所谓的Intercept(截断)。 决定... 阅读全文

posted @ 2013-05-13 14:22 yujian_bcq 阅读(227) 评论(0) 推荐(0) 编辑

android 地图之调用手机安装的地图软件

摘要: // 这个是调用谷歌地图应用的。Intent i = new Intent(Intent.ACTION_VIEW,Uri.parse("geo:39.922840,116.3543240?q=39.922840,116.3543240(北京市西城区阜外大街2号万通大厦)"));i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK& Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);i.setClassName("com.google.android.apps.maps"," 阅读全文

posted @ 2013-05-13 14:14 yujian_bcq 阅读(396) 评论(1) 推荐(0) 编辑

android fragment简单应用一

摘要: 通过FragmentManager fragmentManager = getFragmentManager();//碎片管理对象FragmentTransaction transaction = fragmentManager.beginTransaction();//碎片执行对象布局文件:<FrameLayout android:layout_width="wrap_content" android:layout_height="match_parent" ><fragment android:name="cn.sh.si 阅读全文

posted @ 2013-05-13 10:43 yujian_bcq 阅读(303) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 下一页

导航