recyclerview 代替 listview
http://blog.csdn.net/lmj623565791/article/details/45059587
Android 点击Home键后再点击APP图标,APP重启而不是回到原来界面
http://blog.csdn.net/guozikai/article/details/54932467
解决在onCreate()过程中获取View的width和Height为0的4种方法
监听Draw/Layout事件:ViewTreeObserver
将一个runnable添加到Layout队列中:View.post()
http://www.cnblogs.com/kissazi2/p/4133927.html
PopupWindow点击事件
我工程中需要支持内外点击事件都能响应,是这么设置的:
this.setTouchable(true); this.setFocusable(false); this.setOutsideTouchable(false); this.setTouchInterceptor(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { return false; } });
http://blog.csdn.net/liuhe688/article/details/6754323/
addview 添加动画
https://stackoverflow.com/questions/23455462/cant-animate-view-that-create-from-getwindowmanager-addview
After you call WindowManager.addView
you can attach a ViewTreeObserver.OnGlobalLayoutListener
to the View
and use that to get the height, then use an ObjectAnimator
to perform the translation. Here's an example:
mMessage.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
// Get the height of the view
final int h = mMessage.getHeight();
// Remove the OnGlobalLayoutListener callback
mMessage.getViewTreeObserver().removeOnGlobalLayoutListener(this);
// Slide down from the top
final ObjectAnimator oa = ObjectAnimator.ofFloat(mMessage, "translationY", -h, 0f);
oa.setDuration(250);
oa.start();
}
});
java 内部静态类用法
http://www.cnblogs.com/Alex--Yang/p/3386863.html