1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2025-09-10 02:39:43 +02:00

Update opoc

This commit is contained in:
Gregor Santner 2018-05-21 14:57:41 +02:00
parent 65ba10712f
commit 957573ea83
12 changed files with 161 additions and 12 deletions

View file

@ -18,6 +18,7 @@ import android.net.Uri;
import android.os.Build;
import android.support.annotation.StringRes;
import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.AppCompatTextView;
import android.text.Html;
@ -163,4 +164,14 @@ public class ActivityUtils extends net.gsantner.opoc.util.ContextUtils {
Uri.parse("http://play.google.com/store/apps/" + pkgId)));
}
}
public void setStatusbarColor(int color, boolean... fromRes) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (fromRes != null && fromRes.length > 0 && fromRes[0]) {
color = ContextCompat.getColor(_context, color);
}
_activity.getWindow().setStatusBarColor(color);
}
}
}