Android 如何在应用程序页面中实现飘雪效果?
如何在已完成的活动中添加浮雪效果 我使用画布和2D制作浮雪效果。但我在主页中使用main.xml。我用Android 如何在应用程序页面中实现飘雪效果?,android,2d,Android,2d,如何在已完成的活动中添加浮雪效果 我使用画布和2D制作浮雪效果。但我在主页中使用main.xml。我用 http://ask.csdn.net/questions/1246 但我在网上查代码是 PetalView pv = new PetalView(this); setContentView(pv); 如何将这两个视图混合在一起 如何在顶部产生效果并且不影响此活动页面的操作?从框架布局开始(它允许您堆叠视图): 添加您的xml: LayoutInflater inflater =
http://ask.csdn.net/questions/1246
但我在网上查代码是
PetalView pv = new PetalView(this);
setContentView(pv);
如何将这两个视图混合在一起
如何在顶部产生效果并且不影响此活动页面的操作?从
框架布局开始(它允许您堆叠视图):
添加您的xml:
LayoutInflater inflater = LayoutInflater.from(this);
View mainView = inflater.inflate(R.layout.main, null);
fl.addView(mainView);
添加具有透明背景的动态视图:
PetalView pv = new PetalView(this);
pv.setBackgroundColor(0x00000000);
fl.addView(pv);
setContentView(fl);
从一个框架布局开始(它允许您堆叠视图):
添加您的xml:
LayoutInflater inflater = LayoutInflater.from(this);
View mainView = inflater.inflate(R.layout.main, null);
fl.addView(mainView);
添加具有透明背景的动态视图:
PetalView pv = new PetalView(this);
pv.setBackgroundColor(0x00000000);
fl.addView(pv);
setContentView(fl);