Answer the question
In order to leave comments, you need to log in
How to detect power saving mode on MIUI, Android devices?
Hello, I noticed that in Android 6 on MIUI (xiaomi redmi) devices (I think in Android 7 too) power saving mode is not detected.
Now I do it like this:
PowerManager powerManager = (PowerManager) getActivity().getSystemService(Context.POWER_SERVICE);
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && powerManager.isPowerSaveMode())
{
//power saving mode
}
Answer the question
In order to leave comments, you need to log in
The first one is a radial gradient from something like rgba(0,0,0,0.25)
to transparent
on :after
with half of the element stuffed under the main one.
The second - :before
and :after
with shadows, a small rotate transform left / right and "pushing" under the main element + apparently :after
from some additional element to draw the central part of the shadow. True, in the second case it is better that the background under the element is uniform, and the shadows are opaque. otherwise there will be visible artifacts at their intersections.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question