- 博客(8)
- 资源 (1)
- 收藏
- 关注
转载 不用获得焦点也能实现跑马灯效果的textView
/** * 这是一个不用获得焦点也能实现跑马灯效果的textView * @author Chenzt * */public class MarqueeTextView extends TextView { public MarqueeTextView(Context con) { super(con); } public MarqueeTextView(Context co
2011-10-26 15:34:37 1253
原创 获取某service是否在运行
/** * 判断sevice是否运行着 * * @param serviceName * @return */ public boolean isServiceRunning(String serviceName) { ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVIT
2011-10-26 15:32:04 749
原创 获取Spinner当前显示的文本内容
String selectText = mSpinner_type.getSelectedItem().toString().
2011-10-26 15:29:43 12054 5
原创 android的activity或dialog位置大小动态显示
WindowManager.LayoutParams layoutParams = getWindow().window.getAttributes();layoutParams.width = WINDOW_WIDTH; //修改窗体宽高layoutParams.height = WINDOW_HEIGHT;layoutParams.alpha = WINDOW_ALPHA; //修改窗
2011-10-26 15:27:48 2590 2
原创 java时间转换
/** * 将"20111013080000"类型的时间字符串转化成"2011年10月13日"格式的字符串 * * @param time * 需要转化的时间字符串 * @return 如果time为正常的时间格式,则转化成相应格式的时间, 否则返回null */ public static String parseTime1(String tim
2011-10-26 15:21:54 589
转载 android处理图片的函数(转载)
// 放大缩小图片 public static Bitmap zoomBitmap(Bitmap bitmap, int w, int h) { int width = bitmap.getWidth(); int height = bitmap.getHeight(); Matrix matrix = new Matrix(); float scaleWidht = ((flo
2011-10-26 15:21:00 1020
原创 mapView,GPS需要用到的方法
// Get the Location by GPS or WIFI public Location getLocation(Context context) { LocationManager locMan = (LocationManager) context .getSystemService(Context.LOCATION_SERVICE); Location loca
2011-10-26 15:19:50 1039 1
原创 android中用java代码动态控制activity的大小,位置,透明度
Display display = getWindowManager().getDefaultDisplay(); // 为获取屏幕宽、高 Window window = getWindow();LayoutParams windowLayoutParams = window.getAttributes(); // 获取对话框当前的参数值windowLayoutParams.width =
2011-10-21 12:35:01 6204
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人