2015年8月4日

摘要: 做Android的进新公司后安排做微信公众号开发,这基本是后台和前端的活都要由小白的我来做,这两天基本成鸭子了,被填的满满的,却还是不够,博文仅作记录,希望能给后来的小白一点参考吧今天做的是如何配置使用SecureCRT连接服务器,刚开始接触服务器的童鞋肯定和我一样困惑,1.如何把写好的程序部署到服... 阅读全文
posted @ 2015-08-04 18:42 奔向编程的路上 阅读(398) 评论(0) 推荐(0)

2014年5月28日

摘要: 目前项目中最多用的模式就是观察者模式了。。。该模式是当有数据状态变化需要及时通知的时候使用的项目中其中之一的应用场景: 当网络状态发生变化时影视下载界面提示当前是使用免费的wifi还是机主自己的流量1.首先定义被观察者的实体类public class NetworkTypeNotifier e... 阅读全文
posted @ 2014-05-28 10:47 奔向编程的路上 阅读(318) 评论(0) 推荐(0)

2013年9月3日

摘要: package com.hztbc.android.HorizontalListView;/** HorizontalListView.java v1.5** * The MIT License* Copyright (c) 2011 Paul Soucy (paul@dev-smart.com)* * Permission is hereby granted, free of charge, to any person obtaining a copy* of this software and associated documentation files (the "Softwa 阅读全文
posted @ 2013-09-03 16:13 奔向编程的路上 阅读(363) 评论(0) 推荐(0)

2013年9月2日

摘要: 打印的工具类:public class PrintLine { String TAG = "xxl";static String PRINT_IP = "192.168.1.206";static int PRINT_PORT = 9100;OutputStream socketOut = null;OutputStreamWriter writer = null;String[] Colum_Name = new String[] { "ID", "菜名", "份数", "小计金额& 阅读全文
posted @ 2013-09-02 15:59 奔向编程的路上 阅读(2550) 评论(2) 推荐(0)
 
摘要: 由于ListView,GridView本身都继承于ScrollView,一旦在ScrollView中嵌套ScrollView,在ScrollView中嵌套使用ListView或者GridView,ListView只会显示一行多一点。两者进行嵌套,即会发生冲突。那么里面的ScrollView高度计算就会出现问题。我们也就无法得到想要的效果。核心解决方案: 重写ListView或者GridView的OnMesure 方法。public class MyListView extends ListView { public MyListView(Context context) { sup... 阅读全文
posted @ 2013-09-02 15:08 奔向编程的路上 阅读(592) 评论(0) 推荐(0)

2013年7月30日

摘要: 自定义了gallary和ImageView:gallary:public class MyGallery extends Gallery {/** * GestureDetector类 在onTouch()方法中,我们调用GestureDetector的onTouchEvent()方法, * 将捕捉到的MotionEvent交给GestureDetector 来分析是否有合适的callback函数来处理用户的手势 */private GestureDetector gestureScanner;private MyPicImageView imageView;public MyGallery( 阅读全文
posted @ 2013-07-30 11:07 奔向编程的路上 阅读(442) 评论(0) 推荐(0)

2013年7月12日

摘要: public static int getStatusBarHeight(Resources resources) { Class c = null; Object obj = null; java.lang.reflect.Field field = null; int x = 0; int statusBarHeight = 0; try{ c = Class.forName("com.android.internal.R$dimen"); obj = c.newInstance(); field =c.getField("status_bar_height& 阅读全文
posted @ 2013-07-12 09:47 奔向编程的路上 阅读(150) 评论(0) 推荐(0)