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

Redo icon as adaptive icon

This commit is contained in:
Gregor Santner 2018-03-05 14:23:51 +01:00
parent dd0432f718
commit 07acb6bd02
34 changed files with 66 additions and 397 deletions

View file

@ -22,6 +22,7 @@ import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.content.pm.ActivityInfo;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
@ -69,15 +70,7 @@ public abstract class ThemedActivity extends AppCompatActivity {
*/
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void updateRecentAppColor() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
BitmapDrawable drawable = ((BitmapDrawable) getDrawable(R.drawable.ic_launcher));
if (drawable != null) {
setTaskDescription(new ActivityManager.TaskDescription(
getResources().getString(R.string.app_name),
drawable.getBitmap(),
getAppSettings().getPrimaryColor()));
}
}
}
protected void updateScreenRotation() {