diff --git a/app/src/main/java/com/javiersantos/mlmanager/adapters/AppAdapter.java b/app/src/main/java/com/javiersantos/mlmanager/adapters/AppAdapter.java index ce46d5d..338ac56 100644 --- a/app/src/main/java/com/javiersantos/mlmanager/adapters/AppAdapter.java +++ b/app/src/main/java/com/javiersantos/mlmanager/adapters/AppAdapter.java @@ -18,6 +18,7 @@ import com.javiersantos.mlmanager.AppActivity; import com.javiersantos.mlmanager.AppInfo; import com.javiersantos.mlmanager.R; +import com.javiersantos.mlmanager.utils.AppPreferences; import com.javiersantos.mlmanager.utils.UtilsApp; import com.javiersantos.mlmanager.utils.UtilsDialog; @@ -25,12 +26,17 @@ import java.util.List; public class AppAdapter extends RecyclerView.Adapter { + // Load Settings + private AppPreferences appPreferences; + + // AppAdater variables private List appList; private Context context; public AppAdapter(List appList, Context context) { this.appList = appList; this.context = context; + this.appPreferences = new AppPreferences(context); } @Override @@ -54,6 +60,9 @@ private void setButtonEvents(AppViewHolder appViewHolder, final AppInfo appInfo) ButtonFlat appShare = appViewHolder.vShare; CardView cardView = appViewHolder.vCard; + appExtract.setBackgroundColor(appPreferences.getPrimaryColorPref()); + appShare.setBackgroundColor(appPreferences.getPrimaryColorPref()); + appExtract.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -92,6 +101,7 @@ public void onClick(View view) { intent.putExtra("app_data", appInfo.getData()); Bitmap bitmap = ((BitmapDrawable)appInfo.getIcon()).getBitmap(); intent.putExtra("app_icon", bitmap); + intent.putExtra("app_isSystem", appInfo.isSystem()); context.startActivity(intent); activity.overridePendingTransition(R.anim.slide_in_right, R.anim.fade_back);