mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-28 16:40:53 +01:00
Small fix/improvement
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user