转载
Android西红柿
CSDN内容合伙人、技术专家 , 从零开始做日活千万级APP。
专注于分享各领域原创系列文章 ,擅长java、移动开发、人工智能等 希望大家多多支持
展开
-
android shape的使用
android shape的使用 ,转发到自己的博客,方便翻阅shape用于设定形状,可以在selector,layout等里面使用,有6个子标签,各属性如下:xml version="1.0" encoding="utf-8"?>shape xmlns:android="http://schemas.android.com/apk/res/android" >转载 2016-03-30 11:03:05 · 250 阅读 · 0 评论 -
Android:windowIsTranslucent透明 导致activity退出动画无效
添加全局变量protected int activityCloseEnterAnimation;protected int activityCloseExitAnimation;在OnCreate里面添加如下代码:TypedArray activityStyle = getTheme().obtainStyledAttributes(new int[] {androi转载 2016-08-03 19:19:02 · 3094 阅读 · 1 评论 -
Android中AppCompat和Holo的一个问题
背景来自于知乎上邀请回答的一个问题Android中AppCompat和Holo的一个问题?, 看来很多人还是对这些兼容包搞不清楚,那么干脆写篇博客吧.Support Library我们都知道Android一些SDK比较分裂,为此google官方提供了Android Support Library package 系列的包来保证高版本sdk开发的向下兼容性, 所以你可能经常看转载 2016-05-09 15:26:05 · 553 阅读 · 0 评论 -
计算缓存大小并且清空缓存 && Android存储访问及目录
getCacheDir()方法用于获取/data/data//cache目录 (应用缓存)getFilesDir()方法用于获取/data/data//files目录//下面两个方法是否能够在程序被卸载时被删除与API的等级有关Context.getExternalFilesDir()方法可以获取到SDCard/Android/data/你的应用的包名/files/目录转载 2016-04-08 17:47:54 · 465 阅读 · 0 评论 -
abstract为什么不可以用static native或synchronized修饰
public abstract synchronized void m4();public abstract native void m2();public abstract static void m1();public static final void m3(){};abstract是抽象的,指的是方法只有声明而没有实现,他的实现要放入声明该类的子类中实现。sta转载 2016-02-01 18:10:49 · 1660 阅读 · 0 评论 -
getBackground().setAlpha所导致问题
我在一个地方设置了getBackground().setAlpha(0);在别的activity中有些控件也变成透明的了,让我百思不得其解,哦,现在是晚上十一点四十五,问题终于解决(解决不了睡不着觉啊),觉得挺有意思的,分享一下,先举个例子:?12345678910111转载 2016-03-16 19:16:49 · 1234 阅读 · 1 评论 -
status bar 、action bar、navigation bar height
android手机获取三个bar的高度// status bar height int statusBarHeight = 0; int resourceId = getResources().getIdentifier("status_bar_height","dimen","android");翻译 2016-03-25 19:58:40 · 1007 阅读 · 0 评论 -
Android常见分辨率(mdpi、hdpi 、xhdpi、xxhdpi )尺寸单位转换和屏幕适配相关
1 Android手机目前常见的分辨率1.1 手机常见分辨率:4:3VGA 640*480 (Video Graphics Array)QVGA 320*240 (Quarter VGA)HVGA 480*320 (Half-size VGA)SVGA 800*600 (Super VGA)5:3WVGA 800*480 (Wide VG转载 2016-03-28 18:04:17 · 65935 阅读 · 0 评论 -
AndroidBucket Android开发常用整理
Android开发常用整理(不断扩充中)包含各种工具类、线程池、日志、自定义的控件、程序崩溃捕捉处理、默认的Application配置、常用的Adapter等项目地址 https://github.com/wangjiegulu/AndroidBucket线程池、日志、程序崩溃捕捉处理等配置方法 新建MyApplication,继承ABApplic转载 2016-04-26 16:48:11 · 703 阅读 · 0 评论 -
获取scrollview中子view坐标
http://stackoverflow.com/questions/15540099/getting-coordinate-of-view-with-relative-to-parent-scrollview 0> 1> View 1/> View 2/> View转载 2016-04-12 20:22:40 · 4056 阅读 · 0 评论 -
[译]Android 性能典范:拯救计划
原文地址:http://mp.weixin.qq.com/s?__biz=MzA4MjU5NTY0NA==&mid=405608694&idx=1&sn=92940ebda7f7f7b53d22fbb79fc248f5&scene=0#wechat_redirect前言今天逛稀土时偶然看到hanks分享的一篇英文文章,粗略浏览便已觉得不错,因此翻译成中文,与君分享。转载 2016-04-07 09:25:33 · 326 阅读 · 0 评论 -
android popWindow 弹出时背景透明度渐变
网上有另外一种方式 设置背景的透明度 http://blog.csdn.net/ddxxll2008/article/details/49201925 // 设置屏幕透明度 public void backgroundAlpha(float bgAlpha) { WindowManager.LayoutParams lp = get转载 2016-03-30 10:53:50 · 5990 阅读 · 0 评论 -
dialog 全屏 记录一下
Window win = dialog.getWindow();win.getDecorView().setPadding(0, 0, 0, 0);WindowManager.LayoutParams lp = win.getAttributes(); lp.width = WindowManager.LayoutParams.FILL_PARENT;转载 2016-09-22 20:59:14 · 486 阅读 · 1 评论