List of usage examples for android.graphics Color LTGRAY
int LTGRAY
To view the source code for android.graphics Color LTGRAY.
Click Source Link
From source file:org.gnucash.android.ui.account.AccountFormFragment.java
/** * Initializes the preview of the color picker (color square) to the specified color * @param colorHex Color of the format #rgb or #rrggbb *///from w w w . j a v a2s. co m private void initializeColorSquarePreview(String colorHex) { if (colorHex != null) mColorSquare.setBackgroundColor(Color.parseColor(colorHex)); else mColorSquare.setBackgroundColor(Color.LTGRAY); }
From source file:com.example.damerap_ver1.IntroVideoActivity.java
/** * Create the view in which the video will be rendered. *//*from ww w.j a v a 2 s . c om*/ private void setupView() { LinearLayout lLinLayout = new LinearLayout(this); lLinLayout.setId(1); lLinLayout.setOrientation(LinearLayout.VERTICAL); lLinLayout.setGravity(Gravity.CENTER); lLinLayout.setBackgroundColor(Color.BLACK); LayoutParams lLinLayoutParms = new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT); lLinLayout.setLayoutParams(lLinLayoutParms); this.setContentView(lLinLayout); RelativeLayout lRelLayout = new RelativeLayout(this); lRelLayout.setId(2); lRelLayout.setGravity(Gravity.CENTER); lRelLayout.setBackgroundColor(Color.BLACK); android.widget.RelativeLayout.LayoutParams lRelLayoutParms = new android.widget.RelativeLayout.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT); lRelLayout.setLayoutParams(lRelLayoutParms); lLinLayout.addView(lRelLayout); mVideoView = new VideoView(this); mVideoView.setId(3); android.widget.RelativeLayout.LayoutParams lVidViewLayoutParams = new android.widget.RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); lVidViewLayoutParams.addRule(RelativeLayout.CENTER_IN_PARENT); mVideoView.setLayoutParams(lVidViewLayoutParams); lRelLayout.addView(mVideoView); mProgressBar = new ProgressBar(this); mProgressBar.setId(4); android.widget.RelativeLayout.LayoutParams lProgressBarLayoutParms = new android.widget.RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); lProgressBarLayoutParms.addRule(RelativeLayout.CENTER_IN_PARENT); mProgressBar.setLayoutParams(lProgressBarLayoutParms); lRelLayout.addView(mProgressBar); mProgressMessage = new TextView(this); mProgressMessage.setId(5); android.widget.RelativeLayout.LayoutParams lProgressMsgLayoutParms = new android.widget.RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); lProgressMsgLayoutParms.addRule(RelativeLayout.CENTER_HORIZONTAL); lProgressMsgLayoutParms.addRule(RelativeLayout.BELOW, 4); mProgressMessage.setLayoutParams(lProgressMsgLayoutParms); mProgressMessage.setTextColor(Color.LTGRAY); mProgressMessage.setTextSize(TypedValue.COMPLEX_UNIT_PT, 8); mProgressMessage.setText("..."); lRelLayout.addView(mProgressMessage); }
From source file:net.networksaremadeofstring.rhybudd.RhybuddDock.java
private void drawGaugeTitle(Canvas canvas, String Title) { Paint titlePaint = new Paint(); titlePaint.setStyle(Paint.Style.FILL_AND_STROKE); titlePaint.setColor(Color.LTGRAY);//0x9f004d0f titlePaint.setStrokeWidth(1);//0.005f titlePaint.setAntiAlias(true);/*from www. j ava 2s .c om*/ titlePaint.setTextSize(14); titlePaint.setTypeface(Typeface.createFromAsset(this.getAssets(), "fonts/chivo.ttf")); /*Path titlePath = new Path(); titlePath.addArc(new RectF(40, 90, 196, 155), -180.0f, -180.0f); canvas.drawTextOnPath(Title, titlePath, 0.0f,0.0f, titlePaint);*/ canvas.drawText(Title, 60, 160, titlePaint); }
From source file:org.sensapp.android.sensappdroid.activities.GraphDisplayerActivity.java
static public int getColorFromString(String color) { if (color.equals("Blue")) return Color.BLUE; if (color.equals("Cyan")) return Color.CYAN; if (color.equals("Dark gray")) return Color.DKGRAY; if (color.equals("Gray")) return Color.GRAY; if (color.equals("Green")) return Color.GREEN; if (color.equals("Light gray")) return Color.LTGRAY; if (color.equals("Magenta")) return Color.MAGENTA; if (color.equals("Red")) return Color.RED; if (color.equals("Yellow")) return Color.YELLOW; return -1;/*w w w .jav a 2 s. c o m*/ }
From source file:me.albertonicoletti.latex.activities.EditorActivity.java
private void setSaveButtonEnabled(boolean enable) { if (saveButton != null) { Drawable resIcon = ContextCompat.getDrawable(getApplicationContext(), R.drawable.ic_save_white_24dp); if (!enable) resIcon.mutate().setColorFilter(Color.LTGRAY, PorterDuff.Mode.SRC_IN); saveButton.setEnabled(enable);//from ww w.j a v a 2s. c o m saveButton.setIcon(resIcon); } }
From source file:com.saulcintero.moveon.fragments.Summary3.java
private XYMultipleSeriesRenderer getRenderer_type1() { XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer(2); XYSeriesRenderer r = new XYSeriesRenderer(); r.setLineWidth(2f);/*from ww w . jav a 2 s.c o m*/ r.setColor(Color.rgb(0, 0, 188)); r.setFillBelowLine(true); r.setFillPoints(true); renderer.addSeriesRenderer(r); TypedValue outValue1 = new TypedValue(); TypedValue outValue2 = new TypedValue(); TypedValue outValue3 = new TypedValue(); TypedValue outValue4 = new TypedValue(); mContext.getResources().getValue(R.dimen.xy_chart_text_size_value, outValue1, true); mContext.getResources().getValue(R.dimen.xy_labels_text_size_value, outValue2, true); mContext.getResources().getValue(R.dimen.xy_axis_title_text_size_value, outValue3, true); mContext.getResources().getValue(R.dimen.xy_legend_text_size_value, outValue4, true); float xyChartTextSizeValue = outValue1.getFloat(); float xyLabelsTextSizeValue = outValue1.getFloat(); float xyAxisTitleTextSizeValue = outValue1.getFloat(); float xyLegendTextSizeValue = outValue1.getFloat(); r = new XYSeriesRenderer(); r.setColor(Color.rgb(255, 124, 0)); r.setFillPoints(true); r.setLineWidth(2.5f); r.setDisplayChartValues(false); r.setChartValuesTextSize(xyChartTextSizeValue); renderer.addSeriesRenderer(r); renderer.setAxesColor(Color.WHITE); renderer.setLabelsColor(Color.LTGRAY); renderer.setBackgroundColor(Color.TRANSPARENT); renderer.setTextTypeface("sans_serif", Typeface.BOLD); renderer.setLabelsTextSize(xyLabelsTextSizeValue); renderer.setAxisTitleTextSize(xyAxisTitleTextSizeValue); renderer.setLegendTextSize(xyLegendTextSizeValue); renderer.setXTitle(FunctionUtils.capitalizeFirtsLetter(getString(R.string.minutes))); renderer.setYTitle( isMetric ? getString(R.string.long_unit1_detail_7) : getString(R.string.long_unit2_detail_7)); renderer.setYTitle(FunctionUtils.capitalizeFirtsLetter( isMetric ? getString(R.string.long_unit1_detail_10) : getString(R.string.long_unit2_detail_10)), 1); renderer.setYAxisAlign(Align.RIGHT, 1); renderer.setYLabelsAlign(Align.RIGHT, 1); renderer.setYAxisMin(min_altitude, 1); renderer.setYAxisMax(max_altitude); renderer.setXLabels(20); renderer.setYLabels(20); renderer.setYLabelsAlign(Align.LEFT); renderer.setShowGrid(false); float smallest = 0; if (0 > min_altitude) smallest = min_altitude; float highest = max_speed; if (max_speed < max_altitude) highest = max_altitude; renderer.setXAxisMin(0); renderer.setXAxisMax((float) ((float) timeList.get(timeList.size() - 1) / 60)); renderer.setYAxisMin(smallest); renderer.setYAxisMax(highest); return renderer; }
From source file:uf.edu.encDetailActivity.java
public Intent barchartIntent(ArrayList<Integer> timeStamp, String mac, String macname) { int time;/* w w w . j a v a2s. c o m*/ int HOUR = 3600; int DAY = HOUR * 24; int WEEK = DAY * 7; int MONTH = DAY * 30; int YEAR = WEEK * 52; int numBins; SimpleDateFormat format; String timeUnit; double[] set1, set2; int first; //to get the range int diff = timeStamp.get(timeStamp.size() - 1) - timeStamp.get(0); if (diff / YEAR > 1) { time = YEAR; timeUnit = "Year"; format = new SimpleDateFormat("yyyy"); first = (int) ((float) timeStamp.get(0) / (float) (86400.0F * (float) 365.25F)) * (int) (86400.0F * 365.25F); } else if (diff / MONTH > 1) { time = MONTH; timeUnit = "Month"; format = new SimpleDateFormat("MMM-yyyy"); first = (int) ((float) timeStamp.get(0) / (float) (86400.0F * (float) 365.25F / 12.0F)) * (int) (86400.0F * 365.25F / 12.0F); } else if (diff / WEEK > 1) { time = WEEK; timeUnit = "Week"; format = new SimpleDateFormat("W 'Week' MMM-yyyy"); first = ((int) ((float) timeStamp.get(0) / (float) (86400.0F * (float) 365.25F / 52.0F))) * (int) (86400.0F * 365.25F / 52.0F); } else if (diff / DAY > 1) { time = DAY; timeUnit = "Day"; format = new SimpleDateFormat("EEE dd-MMM-yyyy"); first = (int) ((float) timeStamp.get(0) / (float) (86400.0F)) * (int) (86400.0F); } else { time = HOUR; timeUnit = "Hour"; format = new SimpleDateFormat("HH dd-MMM-yyyy"); first = (int) ((float) timeStamp.get(0) / (float) (3600.0F)) * (int) (3600.0F); } numBins = (timeStamp.get(timeStamp.size() - 1) - first) / time + 1; set1 = new double[numBins]; set2 = new double[numBins]; for (int i = 0; i < numBins; i++) { set2[i] = 0.0; } //now Iterate over the arrayList and do bining for (int i : timeStamp) { int tmp = (i - first) / time; set1[tmp]++; //Log.e(TAG,Integer.toString(i)); } //find the max value to set xMax double yMax = 0.0; for (double k : set1) { if (k > yMax) yMax = k; } //increase the xmax by 10% to improve visibility yMax = yMax + 2; String[] titles = new String[] { "Encounters per " + timeUnit, " " }; List<double[]> values = new ArrayList<double[]>(); values.add(set1); values.add(set2); int[] colors = new int[] { Color.GREEN, Color.BLACK }; XYMultipleSeriesRenderer renderer = buildBarRenderer(colors); renderer.setOrientation(Orientation.HORIZONTAL); renderer.setBackgroundColor(Color.TRANSPARENT); setChartSettings(renderer, "Previous Encounters with \n" + mac + "(" + macname + ")", "Time in " + timeUnit + "s", " No. of Encounters ", 0, numBins + 1, 0, yMax, Color.GRAY, Color.LTGRAY); renderer.setXLabels(0); renderer.setYLabels(10); renderer.setXLabelsAngle(35.0F); //depending on the unit show the labels - year should show year, month should show month Date date; String prev = null; for (int i = 0; i < numBins; i++) { date = new Date((long) (first + time * (i + 1)) * 1000); renderer.addXTextLabel(i + 0.75, format.format(date)); //dirty hack :( if (prev != null && prev.compareTo(format.format(date)) == 0) { renderer.addXTextLabel(i + 0.75 - 1, format.format(new Date((long) (first + (i - 1) * time) * 1000))); } prev = format.format(date); } int length = renderer.getSeriesRendererCount(); for (int i = 0; i < length; i++) { SimpleSeriesRenderer seriesRenderer = renderer.getSeriesRendererAt(i); seriesRenderer.setDisplayChartValues(true); } return ChartFactory.getBarChartIntent(this, buildBarDataset(titles, values), renderer, Type.DEFAULT); }
From source file:com.bluekai.sdk.BlueKai.java
private void addBlueKaiWebView(Context context) { try {/*from w w w. ja v a 2 s . com*/ blueKaiView = new BlueKaiWebView(context, this); blueKaiView.setWebClient(); WebSettings webSettings = blueKaiView.getSettings(); webSettings.setJavaScriptEnabled(true); int height = 1, width = 1; if (devMode) { height = width = RelativeLayout.LayoutParams.MATCH_PARENT; } RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(width, height); params.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE); params.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE); params.setMargins(10, 10, 10, 10); blueKaiView.setBackgroundColor(Color.LTGRAY); if (activity != null) { activity.addContentView(blueKaiView, params); } else { Logger.warn(TAG, "Activity is null. Cannot add webview"); } } catch (Exception ex) { Logger.error(TAG, "Error while adding BlueKai webview", ex); } }
From source file:com.secbro.qark.filebrowser.FileBrowserFragment.java
private void createFileListAdapter() { adapter = new ArrayAdapter<Item>(getActivity(), android.R.layout.select_dialog_item, android.R.id.text1, fileList) {//w ww . j a va 2 s. com @Override public View getView(int position, View convertView, ViewGroup parent) { // creates view View view = super.getView(position, convertView, parent); TextView textView = (TextView) view.findViewById(android.R.id.text1); // put the image on the text view int drawableID = 0; if (fileList.get(position).icon != -1) { // If icon == -1, then directory is empty drawableID = fileList.get(position).icon; } textView.setCompoundDrawablesWithIntrinsicBounds(drawableID, 0, 0, 0); textView.setEllipsize(null); // add margin between image and text (support various screen // densities) // int dp5 = (int) (5 * // getResources().getDisplayMetrics().density + 0.5f); int dp3 = (int) (3 * getResources().getDisplayMetrics().density + 0.5f); // TODO: change next line for empty directory, so text will be // centered textView.setCompoundDrawablePadding(dp3); textView.setBackgroundColor(Color.LTGRAY); return view; }// public View getView(int position, View convertView, ViewGroup };// adapter = new ArrayAdapter<Item>(this, }
From source file:com.spoiledmilk.ibikecph.favorites.EditFavoriteFragment.java
protected int getUnSelectedTextColor() { return Color.LTGRAY; }