随机碎点

2017-07-21  本文已影响18人  小白猿

2017-08-15
dialogFragment 设置背景透明度

1.在DialogFragment的onCreateView里面设置,可以将对话框内部的背景设为透明

getDialog().getWindow().setBackgroundDrawable(newColorDrawable(Color.TRANSPARENT));  

2.在DialogFragment的onstart里面设置,可以将对话框外部的背景设为透明

@Override  
    public void onStart() {  
        // TODO Auto-generated method stub  
        super.onStart();  
          
        Window window = getDialog().getWindow();  
        WindowManager.LayoutParams windowParams = window.getAttributes();  
        windowParams.dimAmount = 0.0f;  
          
        window.setAttributes(windowParams);  
    } 

2017-08-14
枚举类尽量大写,外部使用静态变量时,最好加上类名

2017-08-08
动画 ViewAnimator
2017-08-07

2016-07-27

2016-07-24

2016-07-21

上一篇 下一篇

猜你喜欢

热点阅读