Example usage for android.graphics Color DKGRAY

List of usage examples for android.graphics Color DKGRAY

Introduction

In this page you can find the example usage for android.graphics Color DKGRAY.

Prototype

int DKGRAY

To view the source code for android.graphics Color DKGRAY.

Click Source Link

Usage

From source file:com.cssweb.android.base.QuoteGridActivity.java

public QuoteGridActivity() {
    Paint localPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    this.mPaint = localPaint;
    this.mPaint.setTextSize(this.mFontSize);
    textWeight = this.mPaint.measureText("?");
    int[] arrayOfInt1 = new int[3];
    this.residTitleScrollCol = arrayOfInt1;
    this.residTitleCol = 0;
    this.residCol = 0;
    int[] arrayOfInt2 = new int[3];
    this.residScrollCol = arrayOfInt2;
    this.residSelColor = Color.DKGRAY;
}

From source file:org.cvasilak.jboss.mobile.admin.fragments.ConfigurationViewFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Log.d(TAG, "@onCreate()");

    application = (JBossAdminApplication) getActivity().getApplication();

    // restore state in case of a configuration change (eg orientation)
    if (savedInstanceState != null) {
        confMetrics = savedInstanceState.getParcelableArrayList("confMetrics");
    }//from   ww w  .  ja v a  2 s.c o  m

    MergeAdapter adapter = new MergeAdapter();

    TextView sectionHeader;

    // Section: Server Information
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    sectionHeader.setText("Server Information");
    adapter.addView(sectionHeader);

    if (confMetrics == null) {
        confMetrics = new ArrayList<Metric>();

        confMetrics.add(new Metric("Code Name", "release-codename"));
        confMetrics.add(new Metric("Release Version", "release-version"));
        confMetrics.add(new Metric("Server State", "server-state"));
    }

    MetricsAdapter confMetricsAdapter = new MetricsAdapter(getSherlockActivity(), confMetrics);
    adapter.addAdapter(confMetricsAdapter);

    // Section: Server Configuration
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    sectionHeader.setText("Server Configuration");
    adapter.addView(sectionHeader);
    adapter.addAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1,
            new String[] { "Extensions", "Properties" }));

    setListAdapter(adapter);

    // inform runtime that we have an action button (refresh)
    setHasOptionsMenu(true);

    // refresh only if the fragment is created
    // for the first time (no previous state)
    if (savedInstanceState == null)
        refresh();

}

From source file:org.cvasilak.jboss.mobile.app.fragments.ConfigurationViewFragment.java

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    ActionBar bar = ((ActionBarActivity) getActivity()).getSupportActionBar();
    bar.setTitle(getString(R.string.configuration));

    MergeAdapter adapter = new MergeAdapter();

    TextView sectionHeader;/*from  w  ww  .  ja  v  a2 s . co  m*/

    // Section: Server Information
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    sectionHeader.setText("Server Information");
    adapter.addView(sectionHeader);

    MetricsAdapter confMetricsAdapter = new MetricsAdapter(getActivity(), confMetrics);
    adapter.addAdapter(confMetricsAdapter);

    // Section: Server Configuration
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    sectionHeader.setText("Server Configuration");
    adapter.addView(sectionHeader);
    adapter.addAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1,
            new String[] { "Extensions", "Properties" }));

    setListAdapter(adapter);
}

From source file:piuk.blockchain.android.util.ViewPagerTabs.java

@Override
protected void onDraw(final Canvas canvas) {
    super.onDraw(canvas);

    final int viewWidth = getWidth();
    final int viewHalfWidth = viewWidth / 2;
    final int viewBottom = getHeight();

    final float density = getResources().getDisplayMetrics().density;
    final float spacing = 32 * density;

    final Path path = new Path();
    path.moveTo(viewHalfWidth, viewBottom - 5 * density);
    path.lineTo(viewHalfWidth + 5 * density, viewBottom);
    path.lineTo(viewHalfWidth - 5 * density, viewBottom);
    path.close();/*from  w  w  w. j av a 2 s .  c o  m*/

    paint.setColor(Color.WHITE);
    canvas.drawPath(path, paint);

    paint.setTypeface(Typeface.DEFAULT_BOLD);
    final float y = getPaddingTop() + -paint.getFontMetrics().top;

    for (int i = 0; i < labels.size(); i++) {
        final String label = labels.get(i);

        paint.setTypeface(i == pagePosition ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
        paint.setColor(i == pagePosition ? Color.BLACK : Color.DKGRAY);

        final float x = viewHalfWidth + (maxWidth + spacing) * (i - pageOffset);
        final float labelWidth = paint.measureText(label);
        final float labelHalfWidth = labelWidth / 2;

        final float labelLeft = x - labelHalfWidth;
        final float labelVisibleLeft = labelLeft >= 0 ? 1f : 1f - (-labelLeft / labelWidth);

        final float labelRight = x + labelHalfWidth;
        final float labelVisibleRight = labelRight < viewWidth ? 1f
                : 1f - ((labelRight - viewWidth) / labelWidth);

        final float labelVisible = Math.min(labelVisibleLeft, labelVisibleRight);

        paint.setAlpha((int) (labelVisible * 255));

        canvas.drawText(label, labelLeft, y, paint);
    }
}

From source file:com.example.android.supportv4.media.MediaNotificationManager.java

public MediaNotificationManager(MediaBrowserServiceSupport service) {
    mService = service;//www  .ja  v a 2  s  .  c o  m
    updateSessionToken();

    mNotificationColor = ResourceHelper.getThemeColor(mService, android.R.attr.colorPrimary, Color.DKGRAY);

    mNotificationManager = NotificationManagerCompat.from(mService);

    String pkg = mService.getPackageName();
    mPauseIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_PAUSE).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mPlayIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_PLAY).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mPreviousIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE,
            new Intent(ACTION_PREV).setPackage(pkg), PendingIntent.FLAG_CANCEL_CURRENT);
    mNextIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_NEXT).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);

    // Cancel all notifications to handle the case where the Service was killed and
    // restarted by the system.
    mNotificationManager.cancelAll();
}

From source file:org.cvasilak.jboss.mobile.app.fragments.TransactionMetricsViewFragment.java

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    ActionBar bar = ((ActionBarActivity) getActivity()).getSupportActionBar();
    bar.setTitle(getString(R.string.transactions));

    MergeAdapter adapter = new MergeAdapter();

    TextView sectionHeader;//  w w  w. j av a2s.c om

    // Section: Success/Failure Ratio
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    sectionHeader.setText("Success/Failure Ratio");
    adapter.addView(sectionHeader);

    MetricsAdapter sucFailMetricsAdapter = new MetricsAdapter(getActivity(), sucFailMetrics);
    adapter.addAdapter(sucFailMetricsAdapter);

    // Section: Failure Origin
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    sectionHeader.setText("Failure Origin");
    adapter.addView(sectionHeader);

    MetricsAdapter failOriginMetricsAdapter = new MetricsAdapter(getActivity(), failOriginMetrics);
    adapter.addAdapter(failOriginMetricsAdapter);

    setListAdapter(adapter);
}

From source file:com.example.android.mediabrowserservice.MediaNotificationManager.java

public MediaNotificationManager(MusicService service) {
    mService = service;//from   w  w  w .  jav  a2 s.  c o m
    updateSessionToken();

    mNotificationColor = ResourceHelper.getThemeColor(mService, android.R.attr.colorPrimary, Color.DKGRAY);

    mNotificationManager = (NotificationManager) mService.getSystemService(Context.NOTIFICATION_SERVICE);

    String pkg = mService.getPackageName();
    mPauseIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_PAUSE).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mPlayIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_PLAY).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mPreviousIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE,
            new Intent(ACTION_PREV).setPackage(pkg), PendingIntent.FLAG_CANCEL_CURRENT);
    mNextIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_NEXT).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);

    // Cancel all notifications to handle the case where the Service was killed and
    // restarted by the system.
    mNotificationManager.cancelAll();
}

From source file:biz.wiz.android.wallet.util.ViewPagerTabs.java

@Override
protected void onDraw(final Canvas canvas) {
    super.onDraw(canvas);

    final int viewWidth = getWidth();
    final int viewHalfWidth = viewWidth / 2;
    final int viewBottom = getHeight();

    final float density = getResources().getDisplayMetrics().density;
    final float spacing = 32 * density;

    path.reset();//from   ww  w .j a  va 2 s .co  m
    path.moveTo(viewHalfWidth, viewBottom - 5 * density);
    path.lineTo(viewHalfWidth + 5 * density, viewBottom);
    path.lineTo(viewHalfWidth - 5 * density, viewBottom);
    path.close();

    paint.setColor(Color.WHITE);
    canvas.drawPath(path, paint);

    paint.setTypeface(Typeface.DEFAULT_BOLD);
    final float y = getPaddingTop() + -paint.getFontMetrics().top;

    for (int i = 0; i < labels.size(); i++) {
        final String label = labels.get(i);

        paint.setTypeface(i == pagePosition ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
        paint.setColor(i == pagePosition ? Color.BLACK : Color.DKGRAY);

        final float x = viewHalfWidth + (maxWidth + spacing) * (i - pageOffset);
        final float labelWidth = paint.measureText(label);
        final float labelHalfWidth = labelWidth / 2;

        final float labelLeft = x - labelHalfWidth;
        final float labelVisibleLeft = labelLeft >= 0 ? 1f : 1f - (-labelLeft / labelWidth);

        final float labelRight = x + labelHalfWidth;
        final float labelVisibleRight = labelRight < viewWidth ? 1f
                : 1f - ((labelRight - viewWidth) / labelWidth);

        final float labelVisible = Math.min(labelVisibleLeft, labelVisibleRight);

        paint.setAlpha((int) (labelVisible * 255));

        canvas.drawText(label, labelLeft, y, paint);
    }
}

From source file:com.classiqo.nativeandroid_32bitz.MediaNotificationManager.java

public MediaNotificationManager(MusicService service) throws RemoteException {
    mService = service;//from w ww  .  j av  a2 s.  c  om
    updateSessionToken();

    mNotificationColor = ResourceHelper.getThemeColor(mService, R.attr.colorPrimary, Color.DKGRAY);

    mNotificationManager = NotificationManagerCompat.from(service);

    String pkg = mService.getPackageName();
    mPauseIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_PAUSE).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mPlayIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_PLAY).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mPreviousIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE,
            new Intent(ACTION_PREV).setPackage(pkg), PendingIntent.FLAG_CANCEL_CURRENT);
    mNextIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_NEXT).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mStopCastIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE,
            new Intent(ACTION_STOP_CASTING).setPackage(pkg), PendingIntent.FLAG_CANCEL_CURRENT);

    mNotificationManager.cancelAll();
}

From source file:com.torrenttunes.android.MediaNotificationManager.java

public MediaNotificationManager(MusicService service) {
    mService = service;//from   w w  w .j  a v  a 2s  . c  o  m
    updateSessionToken();

    mNotificationColor = ResourceHelper.getThemeColor(mService, android.R.attr.colorPrimary, Color.DKGRAY);

    mNotificationManager = (NotificationManager) mService.getSystemService(Context.NOTIFICATION_SERVICE);

    String pkg = mService.getPackageName();
    mPauseIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_PAUSE).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mPlayIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_PLAY).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mPreviousIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE,
            new Intent(ACTION_PREV).setPackage(pkg), PendingIntent.FLAG_CANCEL_CURRENT);
    mNextIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE, new Intent(ACTION_NEXT).setPackage(pkg),
            PendingIntent.FLAG_CANCEL_CURRENT);
    mStopCastIntent = PendingIntent.getBroadcast(mService, REQUEST_CODE,
            new Intent(ACTION_STOP_CASTING).setPackage(pkg), PendingIntent.FLAG_CANCEL_CURRENT);

    // Cancel all notifications to handle the case where the Service was killed and
    // restarted by the system.
    mNotificationManager.cancelAll();
}