Files
MoGoEagleEye/libraries/map-usbcamera/src/main/java/com/serenegiant/usb/ParentPreviewConstraintLayout.java
donghongyu b10306fc45 [Change]
开始USB摄像头的功能集成,还无法获取usb连接广播需要调试

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
2022-02-10 18:47:07 +08:00

48 lines
1.3 KiB
Java

package com.serenegiant.usb;
import android.content.Context;
import android.util.AttributeSet;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
/**
* @author mogoauto
*/
public abstract class ParentPreviewConstraintLayout extends ConstraintLayout {
private boolean mDestroyed;
public ParentPreviewConstraintLayout(@NonNull Context context) {
super(context);
}
public ParentPreviewConstraintLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public ParentPreviewConstraintLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public ParentPreviewConstraintLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public boolean isDestroyed() {
return mDestroyed;
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mDestroyed = false;
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
mDestroyed = true;
}
}