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