final ImageView icon = new ImageView(mContext);
icon.setId(android.R.id.icon);
icon.setScaleType(ScaleType.CENTER_INSIDE);
- icon.setImageTintList(ColorStateList.valueOf(getContext().getColor(android.R.color.white)));
return icon;
}
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.content.pm.ServiceInfo;
+import android.graphics.drawable.Drawable;
import android.os.IBinder;
import android.os.UserHandle;
import android.service.quicksettings.IQSTileService;
@Override
protected void handleUpdateState(State state, Object arg) {
state.visible = true;
- state.icon = new DrawableIcon(mTile.getIcon().loadDrawable(mContext));
+ Drawable drawable = mTile.getIcon().loadDrawable(mContext);
+ drawable.setTint(mContext.getColor(android.R.color.white));
+ state.icon = new DrawableIcon(drawable);
state.label = mTile.getLabel();
if (mTile.getContentDescription() != null) {
state.contentDescription = mTile.getContentDescription();