List of usage examples for android.graphics Color DKGRAY
int DKGRAY
To view the source code for android.graphics Color DKGRAY.
Click Source Link
From source file:org.akvo.caddisfly.sensor.colorimetry.strip.camera.InstructionFragment.java
private void showInstruction(@NonNull LinearLayout linearLayout, @NonNull String instruction, int style) { TextView textView = new TextView(getActivity()); textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimension(R.dimen.mediumTextSize)); textView.setPadding((int) getResources().getDimension(R.dimen.activity_vertical_margin), 0, (int) getResources().getDimension(R.dimen.activity_vertical_margin), (int) getResources().getDimension(R.dimen.activity_vertical_margin)); String text = instruction;//from ww w. j a va 2s .c o m if (instruction.contains("<!>")) { text = instruction.replaceAll("<!>", ""); textView.setTextColor(Color.RED); } else { textView.setTextColor(Color.DKGRAY); } if (instruction.contains("<b>") || style == BOLD) { text = text.replaceAll("<b>", "").replaceAll("</b>", ""); textView.setTypeface(null, Typeface.BOLD); textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimension(R.dimen.titleTextSize)); } else { textView.setTextColor(Color.DKGRAY); } textView.setLineSpacing( TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5.0f, getResources().getDisplayMetrics()), 1.0f); Spanned spanned = StringUtil.getStringResourceByName(getContext(), text); if (!text.isEmpty()) { textView.append(spanned); linearLayout.addView(textView); } }
From source file:org.ounl.noisenotifier.SubjectsActivity.java
private XYMultipleSeriesRenderer getDemoRenderer() { XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer(); renderer.setAxisTitleTextSize(16);// w ww . j a va2 s. c om renderer.setChartTitleTextSize(20); renderer.setLabelsTextSize(15); renderer.setLegendTextSize(15); renderer.setPointSize(5f); renderer.setMargins(new int[] { 20, 30, 15, 0 }); XYSeriesRenderer r = new XYSeriesRenderer(); r.setColor(Color.BLUE); r.setPointStyle(PointStyle.SQUARE); r.setFillBelowLine(true); r.setFillBelowLineColor(Color.WHITE); r.setFillPoints(true); renderer.addSeriesRenderer(r); r = new XYSeriesRenderer(); r.setPointStyle(PointStyle.CIRCLE); r.setColor(Color.GREEN); r.setFillPoints(true); renderer.addSeriesRenderer(r); renderer.setAxesColor(Color.DKGRAY); renderer.setLabelsColor(Color.LTGRAY); return renderer; }
From source file:com.duy.pascal.ui.view.console.ConsoleView.java
private void init(Context context) { mContext = context;// ww w .jav a2s .c o m mGestureDetector = new GestureDetectorCompat(getContext(), this); mGestureDetector.setOnDoubleTapListener(this); mPascalPreferences = new PascalPreferences(context); mAntiAlias = mPascalPreferences.useAntiAlias(); mGraphScreen = new GraphScreen(context, this); mGraphScreen.setAntiAlias(mAntiAlias); mConsoleScreen = new ConsoleScreen(mPascalPreferences); mConsoleScreen.setBackgroundColor(Color.BLACK); mTextRenderer = new TextRenderer( getTextSize(TypedValue.COMPLEX_UNIT_SP, mPascalPreferences.getConsoleTextSize())); mTextRenderer.setTypeface(mPascalPreferences.getConsoleFont()); mTextRenderer.setTextColor(Color.WHITE); mTextRenderer.setAntiAlias(mAntiAlias); firstLine = 0; mScreenBufferData.firstIndex = 0; mScreenBufferData.textConsole = null; mCursor = new ConsoleCursor(0, 0, Color.DKGRAY); mCursor.setCoordinate(0, 0); mCursor.setCursorBlink(true); mCursor.setVisible(true); }
From source file:io.plaidapp.core.ui.FeedAdapter.java
public FeedAdapter(Activity hostActivity, @Nullable DataLoadingSubject dataLoading, int columns, boolean pocketInstalled, ViewPreloadSizeProvider<Shot> shotPreloadSizeProvider) { this.host = hostActivity; this.dataLoading = dataLoading; if (dataLoading != null) { dataLoading.registerCallback(this); }//from w ww . jav a 2s .co m this.columns = columns; this.pocketIsInstalled = pocketInstalled; this.shotPreloadSizeProvider = shotPreloadSizeProvider; layoutInflater = LayoutInflater.from(host); comparator = new PlaidItemSorting.PlaidItemComparator(); items = new ArrayList<>(); setHasStableIds(true); // get the dribbble shot placeholder colors & badge color from the theme final TypedArray a = host.obtainStyledAttributes(R.styleable.DribbbleFeed); final int loadingColorArrayId = a.getResourceId(R.styleable.DribbbleFeed_shotLoadingPlaceholderColors, 0); if (loadingColorArrayId != 0) { int[] placeholderColors = host.getResources().getIntArray(loadingColorArrayId); shotLoadingPlaceholders = new ColorDrawable[placeholderColors.length]; for (int i = 0; i < placeholderColors.length; i++) { shotLoadingPlaceholders[i] = new ColorDrawable(placeholderColors[i]); } } else { shotLoadingPlaceholders = new ColorDrawable[] { new ColorDrawable(Color.DKGRAY) }; } final int initialGifBadgeColorId = a.getResourceId(R.styleable.DribbbleFeed_initialBadgeColor, 0); initialGifBadgeColor = initialGifBadgeColorId != 0 ? ContextCompat.getColor(host, initialGifBadgeColorId) : 0x40ffffff; a.recycle(); }
From source file:com.normalexception.app.rx8club.view.category.CategoryView.java
/** * Set the mode of the category line//from www.ja va 2s. co m * @param vi The view line * @param isTitle If we are going to represent a title */ private void setMode(View vi, boolean isTitle) { int showMode = isTitle ? View.GONE : View.VISIBLE; int colorMode = isTitle ? Color.DKGRAY : Color.GRAY; int textColor = isTitle ? Color.WHITE : Color.BLACK; postCount.setVisibility(showMode); postCountLabel.setVisibility(showMode); threadCount.setVisibility(showMode); threadCountLabel.setVisibility(showMode); subCount.setVisibility(showMode); subCountLabel.setVisibility(showMode); image.setVisibility(showMode); vi.setBackgroundColor(colorMode); title.setTextColor(textColor); }
From source file:com.gbozza.android.stockhawk.ui.DetailFragment.java
@Override public void onLoadFinished(Loader<Cursor> loader, Cursor data) { if (data != null && data.moveToFirst()) { mDetailSymbol.setText(mSymbol);/*from w w w . j a va2 s. c o m*/ mDetailPrice.setText(DecimalFormatUtils.getDollarFormat(data.getString(POSITION_PRICE))); float rawAbsoluteChange = Float.parseFloat(data.getString(POSITION_ABSOLUTE_CHANGE)); float percentageChange = Float.parseFloat(data.getString(POSITION_PERCENTAGE_CHANGE)); mDetailAbsChange.setBackgroundResource(R.drawable.percent_change_pill_red); if (rawAbsoluteChange > 0) { mDetailAbsChange.setBackgroundResource(R.drawable.percent_change_pill_green); } mDetailPercChange.setBackgroundResource(R.drawable.percent_change_pill_red); if (percentageChange > 0) { mDetailPercChange.setBackgroundResource(R.drawable.percent_change_pill_green); } mDetailAbsChange.setText(DecimalFormatUtils.getDollarFormatWithPlus(rawAbsoluteChange)); mDetailPercChange.setText(DecimalFormatUtils.getPercentage(percentageChange)); try { CSVReader reader = new CSVReader(new StringReader(data.getString(POSITION_HISTORY))); List<String[]> history = reader.readAll(); Collections.reverse(history); String[] xValues = new String[history.size()]; List<Entry> entries = new ArrayList<>(); for (int i = 0; i < history.size(); i++) { entries.add(new Entry(i, Float.parseFloat(history.get(i)[1]))); xValues[i] = history.get(i)[0]; } XAxis xAxis = mLineChart.getXAxis(); xAxis.setValueFormatter( new XAxisDateValueFormatter(xValues, getActivity().getApplicationContext())); LineDataSet dataSet = new LineDataSet(entries, mSymbol); dataSet.setColor(Color.RED); dataSet.setCircleColor(Color.BLACK); dataSet.setValueTextColor(Color.BLACK); LineData lineData = new LineData(dataSet); Description chartDesc = new Description(); chartDesc.setText(getString(R.string.chart_description)); mLineChart.setDescription(chartDesc); mLineChart.setData(lineData); mLineChart.setBackgroundColor(Color.WHITE); mLineChart.invalidate(); mDetailError.setVisibility(View.GONE); mDetailSymbol.setVisibility(View.VISIBLE); mDetailData.setVisibility(View.VISIBLE); } catch (IOException exception) { Timber.e(exception, "Error parsing stock history"); } } else { mDetailError.setText(getString(R.string.error_no_detail)); mDetailError.setVisibility(View.VISIBLE); mDetailSymbol.setVisibility(View.INVISIBLE); mDetailData.setVisibility(View.INVISIBLE); mLineChart.clear(); mLineChart.setBackgroundColor(Color.DKGRAY); } }
From source file:org.csploit.android.plugins.LoginCracker.java
private void setStartedState() { int min = Integer.parseInt((String) mMinSpinner.getSelectedItem()), max = Integer.parseInt((String) mMaxSpinner.getSelectedItem()); if (min > max) max = min + 1;/*from w w w . j a v a 2 s . co m*/ mAccountFound = false; try { mStartButton.setImageDrawable(ContextCompat.getDrawable(getBaseContext(), R.drawable.ic_stop_24dp)); mProcess = System.getTools().hydra.crack(System.getCurrentTarget(), Integer.parseInt((String) mPortSpinner.getSelectedItem()), (String) mProtocolSpinner.getSelectedItem(), mCustomCharset == null ? CHARSETS_MAPPING[mCharsetSpinner.getSelectedItemPosition()] : mCustomCharset, min, max, (String) mUserSpinner.getSelectedItem(), mUserWordlist, mPassWordlist, mReceiver); mActivity.setVisibility(View.VISIBLE); mStatusText.setTextColor(Color.DKGRAY); mStatusText.setText(getString(R.string.starting_dots)); mRunning = true; } catch (ChildManager.ChildNotStartedException e) { setStoppedState(); } }
From source file:net.lp.actionbarpoirot.helpers.ActivityHelperHoneycomb.java
/** {@inheritDoc} */ @Override//from www. j a va 2s . c om public void setupActionBar(CharSequence title, int color) { if (UiUtilities.isGoogleTV(mActivity)) { // Left Nav Bar actionBar = leftNavBar = (LeftNavBarService.instance()).getLeftNavBar(mActivity); leftNavBar.setDisplayOptions(LeftNavBar.DISPLAY_USE_LOGO_WHEN_EXPANDED); leftNavBar.setDisplayOptions(LeftNavBar.DISPLAY_AUTO_EXPAND); actionBar.setBackgroundDrawable(new ColorDrawable(Color.DKGRAY)); // TODO: set proper background for left nav bar. // Hide the title bar (like empty action bar at top for GoogleTV). actionBar.setDisplayShowTitleEnabled(false); // Hide the native >Honeycomb action bar in favor of the left nav // bar. final ActionBar nativeActionBar = mActivity.getActionBar(); nativeActionBar.hide(); } else { actionBar = mActivity.getActionBar(); } actionBar.setTitle(title); actionBar.setDisplayHomeAsUpEnabled(true); enableActionBarTitleMarquee(); }
From source file:org.cvasilak.jboss.mobile.app.fragments.RuntimeViewFragment.java
private void buildTable() { Map<String, List<String>> table = new HashMap<String, List<String>>(); table.put("Server Status", Arrays.asList("Configuration", "JVM")); List<String> metrics = new ArrayList<String>( Arrays.asList("Data Sources", "JMS Destinations", "Transactions")); // 'Web' section metrics is compatible (for now) only with MANAGEMENT_VERSION_1 // TODO ('Undertow' subsystem metrics can possible replace) if (application.getOperationsManager() .getVersion() == JBossOperationsManager.ManagementVersion.MANAGEMENT_VERSION_1) { metrics.add("Web"); }/* w w w . j ava 2 s . c om*/ table.put("Subsystem Metrics", metrics); if (application.getOperationsManager().isDomainController()) { table.put("Deployments", Arrays.asList("Deployment Content", "Server Groups")); } else { table.put("Deployments", Arrays.asList("Manage Deployments")); } MergeAdapter adapter = new MergeAdapter(); // cater for domain mode and display a button // for the user to change the active server if (application.getOperationsManager().isDomainController()) { chooseServer = new Button(getActivity()); chooseServer.setText(application.getOperationsManager().getDomainHost() + ":" + application.getOperationsManager().getDomainServer()); chooseServer.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_servers_selection, 0); chooseServer.setTypeface(null, Typeface.ITALIC); chooseServer.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showDomainHostChooser(); } }); adapter.addView(chooseServer); } for (Map.Entry<String, List<String>> entry : table.entrySet()) { // add section header TextView section = new TextView(getActivity()); section.setBackgroundColor(Color.DKGRAY); section.setPadding(15, 10, 0, 10); section.setText(entry.getKey()); adapter.addView(section); // add section data adapter.addAdapter( new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, entry.getValue())); } setListAdapter(adapter); }
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);/*from w ww .j a v a 2 s . 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); }