mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
Use right colors in snackbars and logs
This commit is contained in:
parent
04740121a5
commit
e46fa777ab
@ -153,11 +153,11 @@ public class LogDisplayFragment extends ListFragment implements OnItemClickListe
|
||||
switch (subEntry.mType.mLevel) {
|
||||
case DEBUG: ih.mSecondImg.setBackgroundColor(Color.GRAY); break;
|
||||
case INFO: ih.mSecondImg.setBackgroundColor(Color.BLACK); break;
|
||||
case WARN: ih.mSecondImg.setBackgroundColor(Color.YELLOW); break;
|
||||
case ERROR: ih.mSecondImg.setBackgroundColor(Color.RED); break;
|
||||
case START: ih.mSecondImg.setBackgroundColor(getResources().getColor(R.color.emphasis)); break;
|
||||
case OK: ih.mSecondImg.setBackgroundColor(Color.GREEN); break;
|
||||
case CANCELLED: ih.mSecondImg.setBackgroundColor(Color.RED); break;
|
||||
case WARN: ih.mSecondImg.setBackgroundColor(getResources().getColor(R.color.android_orange_light)); break;
|
||||
case ERROR: ih.mSecondImg.setBackgroundColor(getResources().getColor(R.color.android_red_light)); break;
|
||||
case START: ih.mSecondImg.setBackgroundColor(Color.BLACK); break;
|
||||
case OK: ih.mSecondImg.setBackgroundColor(getResources().getColor(R.color.android_green_light)); break;
|
||||
case CANCELLED: ih.mSecondImg.setBackgroundColor(getResources().getColor(R.color.android_red_light)); break;
|
||||
}
|
||||
} else {
|
||||
ih.mSecond.setVisibility(View.GONE);
|
||||
@ -184,11 +184,11 @@ public class LogDisplayFragment extends ListFragment implements OnItemClickListe
|
||||
switch (entry.mType.mLevel) {
|
||||
case DEBUG: ih.mImg.setBackgroundColor(Color.GRAY); break;
|
||||
case INFO: ih.mImg.setBackgroundColor(Color.BLACK); break;
|
||||
case WARN: ih.mImg.setBackgroundColor(Color.YELLOW); break;
|
||||
case ERROR: ih.mImg.setBackgroundColor(Color.RED); break;
|
||||
case START: ih.mImg.setBackgroundColor(getResources().getColor(R.color.emphasis)); break;
|
||||
case OK: ih.mImg.setBackgroundColor(Color.GREEN); break;
|
||||
case CANCELLED: ih.mImg.setBackgroundColor(Color.RED); break;
|
||||
case WARN: ih.mImg.setBackgroundColor(getResources().getColor(R.color.android_orange_light)); break;
|
||||
case ERROR: ih.mImg.setBackgroundColor(getResources().getColor(R.color.android_red_light)); break;
|
||||
case START: ih.mImg.setBackgroundColor(Color.BLACK); break;
|
||||
case OK: ih.mImg.setBackgroundColor(getResources().getColor(R.color.android_green_light)); break;
|
||||
case CANCELLED: ih.mImg.setBackgroundColor(getResources().getColor(R.color.android_red_light)); break;
|
||||
}
|
||||
|
||||
return convertView;
|
||||
|
@ -26,6 +26,8 @@ import com.nispok.snackbar.Snackbar.SnackbarDuration;
|
||||
import com.nispok.snackbar.SnackbarManager;
|
||||
import com.nispok.snackbar.listeners.ActionClickListener;
|
||||
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
|
||||
/**
|
||||
* Notify wrapper which allows a more easy use of different notification libraries
|
||||
*/
|
||||
@ -52,10 +54,10 @@ public class Notify {
|
||||
case OK:
|
||||
break;
|
||||
case WARN:
|
||||
bar.textColor(Color.YELLOW);
|
||||
bar.textColor(activity.getResources().getColor(R.color.android_orange_light));
|
||||
break;
|
||||
case ERROR:
|
||||
bar.textColor(Color.RED);
|
||||
bar.textColor(activity.getResources().getColor(R.color.android_red_light));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -74,13 +76,13 @@ public class Notify {
|
||||
|
||||
switch (style) {
|
||||
case OK:
|
||||
bar.actionColor(Color.GREEN);
|
||||
bar.actionColor(activity.getResources().getColor(R.color.android_green_light));
|
||||
break;
|
||||
case WARN:
|
||||
bar.textColor(Color.YELLOW);
|
||||
bar.textColor(activity.getResources().getColor(R.color.android_orange_light));
|
||||
break;
|
||||
case ERROR:
|
||||
bar.textColor(Color.RED);
|
||||
bar.textColor(activity.getResources().getColor(R.color.android_red_light));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -116,13 +118,13 @@ public class Notify {
|
||||
|
||||
switch (style) {
|
||||
case OK:
|
||||
bar.actionColor(Color.GREEN);
|
||||
bar.actionColor(activity.getResources().getColor(R.color.android_green_light));
|
||||
break;
|
||||
case WARN:
|
||||
bar.textColor(Color.YELLOW);
|
||||
bar.textColor(activity.getResources().getColor(R.color.android_orange_light));
|
||||
break;
|
||||
case ERROR:
|
||||
bar.textColor(Color.RED);
|
||||
bar.textColor(activity.getResources().getColor(R.color.android_red_light));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user