Refactoring

This commit is contained in:
M66B
2019-05-13 14:29:52 +02:00
parent 35c7993d92
commit 7f0de48d0e
3 changed files with 9 additions and 9 deletions

View File

@@ -36,6 +36,7 @@ import android.text.Spannable;
import android.text.Spanned;
import android.text.format.DateUtils;
import android.text.format.Time;
import android.util.TypedValue;
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
@@ -280,6 +281,12 @@ public class Helper {
}
}
static boolean isDarkTheme(Context context) {
TypedValue tv = new TypedValue();
context.getTheme().resolveAttribute(R.attr.themeName, tv, true);
return (tv.string != null && !"light".contentEquals(tv.string));
}
// Formatting
static String humanReadableByteCount(long bytes, boolean si) {