|
|
|
@ -50,6 +50,7 @@ import android.widget.Toast;
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.browser.customtabs.CustomTabsIntent;
|
|
|
|
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
|
|
|
|
import androidx.core.content.ContextCompat;
|
|
|
|
|
import androidx.lifecycle.Lifecycle;
|
|
|
|
|
import androidx.lifecycle.LifecycleOwner;
|
|
|
|
@ -281,6 +282,17 @@ public class Helper {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void hide(View view) {
|
|
|
|
|
view.setPadding(0, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
ViewGroup.LayoutParams lparam = view.getLayoutParams();
|
|
|
|
|
lparam.width = 0;
|
|
|
|
|
lparam.height = 0;
|
|
|
|
|
if (lparam instanceof ConstraintLayout.LayoutParams)
|
|
|
|
|
((ConstraintLayout.LayoutParams) lparam).setMargins(0, 0, 0, 0);
|
|
|
|
|
view.setLayoutParams(lparam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static boolean isDarkTheme(Context context) {
|
|
|
|
|
TypedValue tv = new TypedValue();
|
|
|
|
|
context.getTheme().resolveAttribute(R.attr.themeName, tv, true);
|
|
|
|
|