List of usage examples for android.graphics Color GRAY
int GRAY
To view the source code for android.graphics Color GRAY.
Click Source Link
From source file:com.github.vase4kin.teamcityapp.artifact.view.ArtifactViewImpl.java
/** * {@inheritDoc}//from w ww . j a v a2 s . c om */ @Override public void showPermissionsDeniedDialog() { new MaterialDialog.Builder(mActivity).title(R.string.permissions_dialog_title) .content(R.string.permissions_dialog_text_no_permissions).widgetColor(Color.GRAY) .positiveText(R.string.dialog_ok_title).show(); }
From source file:ca.liquidlabs.android.speedtestvisualizer.fragments.GraphViewMasterFragment.java
private void addSingleSeriesGraph(final GraphViewDataInterface[] data) { // init graph data GraphViewSeries downloadSeries = new GraphViewSeries(data); GraphView graphView;// w w w . j av a 2 s . c o m graphView = new BarGraphView(getActivity().getApplicationContext() // context , mGraphType.getGraphTitle() // heading ); // override styles graphView.getGraphViewStyle().setHorizontalLabelsColor(Color.GRAY); graphView.getGraphViewStyle().setVerticalLabelsColor(Color.GRAY); graphView.setCustomLabelFormatter(mGraphDateLabelFormatter); // add data graphView.addSeries(downloadSeries); // add graph to the view mGraphViewContainer.addView(graphView); }
From source file:cs.umass.edu.prepare.view.custom.CalendarAdapter.java
public View getView(int position, View convertView, ViewGroup parent) { View v = convertView;/* ww w . j a v a 2 s. c o m*/ TextView dayView; if (convertView == null) { // if it's not recycled, initialize some attributes v = View.inflate(context, R.layout.calendar_item, null); } ViewGroup insertPoint = (ViewGroup) v.findViewById(R.id.layout_calendar_item); insertPoint.removeAllViews(); dayView = (TextView) View.inflate(context, R.layout.textview_date, null); insertPoint.addView(dayView); // disable empty days from the beginning if (dateStrings[position].equals("")) { dayView.setClickable(false); dayView.setFocusable(false); } else { v.setBackgroundResource(R.drawable.list_item_background); Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, month.get(Calendar.YEAR)); cal.set(Calendar.MONTH, month.get(Calendar.MONTH)); cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(dateStrings[position])); int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); if (month.get(Calendar.YEAR) == selectedDate.get(Calendar.YEAR) && month.get(Calendar.MONTH) == selectedDate.get(Calendar.MONTH) && dateStrings[position].equals("" + selectedDate.get(Calendar.DAY_OF_MONTH))) { int selectedColor = ContextCompat.getColor(context, R.color.color_calendar_item_background_selected); v.setBackgroundColor(selectedColor); } else if (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) { dayView.setTextColor(Color.GRAY); } } dayView.setText(dateStrings[position]); // create date string for comparison String dateStr = dateStrings[position]; if (displayType == DisplayType.BASIC) { v.setMinimumHeight(0); return v; // do not populate cells } v.setMinimumHeight(325); // TODO: not device independent if (medications == null || adherenceData == null) { Log.w(TAG, "Warning : No adherenceData found."); return v; // do not populate cells } if (dateStr.equals("")) return v; Calendar dateKey = Utils.getDateKey(month.get(Calendar.YEAR), month.get(Calendar.MONTH), Integer.parseInt(dateStr)); if (adherenceData.containsKey(dateKey)) { populateCell(dateKey, insertPoint); } return v; }
From source file:com.github.vase4kin.teamcityapp.artifact.view.ArtifactViewImpl.java
/** * {@inheritDoc}/* w ww.j a v a 2s . c om*/ */ @Override public void showPermissionsInfoDialog(final OnPermissionsDialogListener onPermissionsDialogListener) { new MaterialDialog.Builder(mActivity).title(R.string.permissions_dialog_title) .content(R.string.permissions_dialog_content).widgetColor(Color.GRAY) .positiveText(R.string.dialog_ok_title).onPositive(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { onPermissionsDialogListener.onAllow(); } }).show(); }
From source file:org.croudtrip.fragments.join.JoinDrivingFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Register local broadcasts LocalBroadcastManager.getInstance(getActivity()).registerReceiver(joinRequestExpiredReceiver, new IntentFilter(Constants.EVENT_JOIN_REQUEST_EXPIRED)); LocalBroadcastManager.getInstance(getActivity()).registerReceiver(nfcScannedReceiver, new IntentFilter(Constants.EVENT_NFC_TAG_SCANNED)); IntentFilter filter = new IntentFilter(); filter.addAction(Constants.EVENT_SECONDARY_DRIVER_ACCEPTED); filter.addAction(Constants.EVENT_SECONDARY_DRIVER_DECLINED); LocalBroadcastManager.getInstance(getActivity()).registerReceiver(secondaryDriverAcceptedDeclinedReceiver, filter);// www . ja v a 2s . co m //Register nfc adapter nfcAdapter = NfcAdapter.getDefaultAdapter(getActivity()); if (nfcAdapter != null) { nfcPendingIntent = PendingIntent.getActivity(getActivity(), 0, new Intent(getActivity(), getActivity().getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); } //Initialize colors for different routes on the map colors = new ArrayList<>(); colors.add(Color.BLUE); colors.add(Color.GREEN); colors.add(Color.RED); colors.add(Color.YELLOW); shadesOfGray = new ArrayList<>(); shadesOfGray.add(Color.GRAY); shadesOfGray.add(Color.DKGRAY); shadesOfGray.add(Color.LTGRAY); }
From source file:com.testpush.notification.GcmIntentService.java
private void sendNotification(String titre, String message, String image, String id) { mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE); Log.d("GCM", "NOTIFICATION"); //afficher la notif try {/*from www . j av a 2 s. co m*/ //Vibrator v = (Vibrator) this.getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE); // Vibrate for 500 milliseconds //v.vibrate(new long[]{0,100,300,200},-1); } catch (Exception e) { } PackageManager pm = getPackageManager(); Intent lancement = new Intent(this.getApplicationContext(), MainActivity.class); lancement.putExtra("LAUNCH_NOTIFICATION", true); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, lancement, 0); Bitmap bitmap = getBitmapFromURL(image); Notification notif; { notif = new NotificationCompat.Builder(this).setSmallIcon(R.mipmap.ic_launcher).setLargeIcon(bitmap) .setColor(Color.GRAY).setContentTitle(titre).setContentText(message) .setContentIntent(contentIntent).build(); notif.ledARGB = Color.GRAY; notif.flags = Notification.FLAG_SHOW_LIGHTS; notif.ledOnMS = 750; notif.ledOffMS = 2000; } //TODO mettre le nombre et un id diffrent notif.flags |= Notification.FLAG_AUTO_CANCEL; if (id == null) id = ""; mNotificationManager.notify(id, id.hashCode(), notif); }
From source file:com.freshdigitable.udonroad.StatusViewBase.java
@CallSuper public void reset() { setBackgroundColor(Color.TRANSPARENT); setRtCountVisibility(GONE);/* ww w. java 2s . c o m*/ setFavCountVisibility(GONE); setTextColor(Color.GRAY); setTint(rtIcon, R.color.twitter_action_normal); setTint(favIcon, R.color.twitter_action_normal); icon.setImageDrawable(null); icon.setImageResource(android.R.color.transparent); icon.setOnClickListener(null); setOnClickListener(null); setUserIconClickListener(null); mediaContainer.reset(); mediaContainer.setOnMediaClickListener(null); }
From source file:org.openbitcoinwidget.WidgetProvider.java
private static int getColor(ColorMode colorMode, WidgetColor widgetColor) { if (colorMode.equals(ColorMode.Default)) { switch (widgetColor) { case Warning: return Color.parseColor("#ff3030"); case StartValue: return Color.YELLOW; case Normal: return Color.LTGRAY; case Increase: return Color.GREEN; case Decrease: return Color.parseColor("#ff3030"); default://from w ww . j av a 2s . c o m throw new IllegalArgumentException("No color defined for " + widgetColor); } } else if (colorMode.equals(ColorMode.Grayscale)) { switch (widgetColor) { case Warning: return Color.WHITE; case StartValue: return Color.LTGRAY; case Normal: return Color.LTGRAY; case Increase: return Color.WHITE; case Decrease: return Color.GRAY; default: throw new IllegalArgumentException("No color defined for " + widgetColor); } } else { throw new IllegalArgumentException("No color mode defined for " + colorMode); } }
From source file:edu.vuum.mocca.ui.tags.CreateTagsFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.tags_creation_fragment, container, false); container.setBackgroundColor(Color.GRAY); return view;//from ww w. j ava2 s . co m }
From source file:fr.kwiatkowski.apktrack.ui.AppViewHolder.java
/** * Sets the last check date of the application and its update source on the third line. * @param app The app whose information is to be displayed. * @param ctx The context of the application *//*from w ww . jav a 2 s . c om*/ private void _set_date(InstalledApp app, Context ctx) { String update_source = app.get_update_source(); if (app.get_last_check_date() == null) { _check_date.setText(String.format(update_source == null ? "%s %s." : "[" + update_source + "] %s %s.", ctx.getResources().getString(R.string.last_check), ctx.getResources().getString(R.string.never))); _check_date.setTextColor(Color.GRAY); } else { DateFormat sdf = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); _check_date.setText(String.format(update_source == null ? "%s %s." : "[" + update_source + "] %s %s.", ctx.getResources().getString(R.string.last_check), sdf.format(app.get_last_check_date()))); _check_date.setTextColor(_default_color); } }