use of com.risenb.expand.floatwindow.interfaces.LayoutInitCallback in project AndroidFrame by tongxiaoyun.
the class MyApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
m.getInstance().setFloatView(LayoutInflater.from(this).inflate(R.layout.float_window, null));
m.getInstance().setCallback(new LayoutInitCallback() {
@Override
public void initView(View v, String path) {
VideoView vv = (VideoView) v.findViewById(R.id.vv);
vv.setVideoURI(Uri.parse(path));
vv.start();
}
@Override
public void reStart(View v, String path) {
VideoView vv = (VideoView) v.findViewById(R.id.vv);
vv.setVideoURI(Uri.parse(path));
vv.start();
}
@Override
public void stop(View v) {
VideoView vv = (VideoView) v.findViewById(R.id.vv);
vv.pause();
}
@Override
public void destory(View v) {
}
});
}
Aggregations