|
|
|
|
@ -22,7 +22,6 @@ import androidx.fragment.app.FragmentActivity; |
|
|
|
|
|
|
|
|
|
import com.fongmi.android.tv.App; |
|
|
|
|
import com.fongmi.android.tv.server.Server; |
|
|
|
|
import com.google.android.material.floatingactionbutton.FloatingActionButton; |
|
|
|
|
import com.permissionx.guolindev.PermissionX; |
|
|
|
|
|
|
|
|
|
import java.math.BigInteger; |
|
|
|
|
@ -84,26 +83,6 @@ public class Utils { |
|
|
|
|
window.getDecorView().setSystemUiVisibility(flags); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void toggleFab(int dy, FloatingActionButton fab) { |
|
|
|
|
if (Math.abs(dy) < 50) return; |
|
|
|
|
if (dy > 0) Utils.hideFab(fab); |
|
|
|
|
else Utils.showFab(fab); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void showFab(FloatingActionButton fab) { |
|
|
|
|
if (fab.getVisibility() == View.INVISIBLE) fab.show(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void hideFab(FloatingActionButton fab) { |
|
|
|
|
if (fab.getVisibility() != View.VISIBLE) return; |
|
|
|
|
fab.hide(new FloatingActionButton.OnVisibilityChangedListener() { |
|
|
|
|
@Override |
|
|
|
|
public void onHidden(FloatingActionButton fab) { |
|
|
|
|
fab.setVisibility(View.INVISIBLE); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static boolean hasPIP() { |
|
|
|
|
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && App.get().getPackageManager().hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE); |
|
|
|
|
} |
|
|
|
|
|