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:org.cvasilak.jboss.mobile.admin.fragments.ProfileViewFragment.java

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

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

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

    if (getArguments() != null) {
        this.path = getArguments().getStringArrayList("path");
    }/*from www  . ja v a 2s. co  m*/

    MergeAdapter adapter = new MergeAdapter();

    TextView sectionHeader;

    // Section: Attributes
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    sectionHeader.setText(R.string.attributes);
    adapter.addView(sectionHeader);

    attributes = new ArrayList<Attribute>();
    adapter.addAdapter(new AttributeAdapter(attributes));

    //Section ChildTypes
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    sectionHeader.setText(R.string.child_types);
    adapter.addView(sectionHeader);

    childTypes = new ArrayList<ChildType>();
    adapter.addAdapter(new ChildTypeAdapter(childTypes));

    // Section Operations
    sectionHeader = new TextView(getActivity());
    sectionHeader.setBackgroundColor(Color.DKGRAY);
    sectionHeader.setPadding(15, 10, 0, 10);
    adapter.addView(sectionHeader);

    adapter.addAdapter(
            new IconTextRowAdapter(getActivity(), Arrays.asList("Operations"), R.drawable.ic_operations));

    setListAdapter(adapter);

    // inform runtime that we have action buttons
    setHasOptionsMenu(true);

    refresh();
}

From source file:org.projecthdata.weight.ui.ChartFragment.java

private XYMultipleSeriesRenderer getRenderer() {
    XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
    renderer.setAxisTitleTextSize(16);/*from  w w w. j  a  v a 2  s .co  m*/
    renderer.setChartTitleTextSize(16);
    renderer.setLabelsTextSize(14);
    renderer.setPointSize(5f);
    renderer.setMargins(new int[] { 10, 10, 0, 10 });

    renderer.setAxesColor(Color.DKGRAY);
    renderer.setLabelsColor(Color.LTGRAY);
    renderer.setBackgroundColor(Color.BLACK);
    renderer.setApplyBackgroundColor(true);
    renderer.setShowLegend(false);
    renderer.setAntialiasing(true);
    renderer.setShowGrid(true);
    renderer.setYAxisMin(0.0);

    XYSeriesRenderer r = new XYSeriesRenderer();
    r.setColor(Color.BLUE);
    r.setPointStyle(PointStyle.SQUARE);
    r.setFillPoints(true);
    renderer.addSeriesRenderer(r);

    return renderer;
}

From source file:com.bayapps.android.robophish.MediaNotificationManager.java

public MediaNotificationManager(MusicService service) throws RemoteException {
    mService = service;/*  w  ww.j a  v  a2s  . 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);

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

From source file:com.normalexception.app.rx8club.view.profile.ProfileViewArrayAdapter.java

public View getView(int position, View convertView, ViewGroup parent) {
    View vi = convertView;//from   w w w  . j  a  va 2 s. co m
    if (vi == null) {
        vi = new TextView(sourceFragment.getActivity());
    }

    TextView tv = (TextView) vi;
    final ProfileModel pm = data.get(position);
    String text = String.format("%s\n%s", pm.getName(), pm.getText());
    SpannableString spanString = new SpannableString(text);
    spanString.setSpan(new StyleSpan(Typeface.BOLD), 0, text.indexOf("\n"), 0);
    spanString.setSpan(new StyleSpan(Typeface.ITALIC), text.indexOf("\n") + 1, text.length(), 0);
    tv.setText(spanString);
    tv.setPadding(1, 10, 1, 10);
    tv.setBackgroundColor(Color.DKGRAY);
    tv.setTextColor(Color.WHITE);
    tv.setTextSize(10);
    tv.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View arg0) {
            Bundle args = new Bundle();
            args.putString("link", pm.getLink());
            args.putString("title", pm.getName());
            FragmentUtils.fragmentTransaction(sourceFragment.getActivity(), ThreadFragment.newInstance(), false,
                    true, args);
        }
    });

    return vi;
}

From source file:org.copticchurchlibrary.arabicreader.MediaNotificationManager.java

public MediaNotificationManager(MusicService service) throws RemoteException {
    mService = service;/*from ww  w  .j  a  va  2s. co m*/
    updateSessionToken();

    mNotificationColor = ResourceHelper.getThemeColor(mService,
            org.copticchurchlibrary.arabicreader.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);

    // 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.AttributeEditorFragment.java

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

    ActionBar bar = ((ActionBarActivity) getActivity()).getSupportActionBar();
    bar.setTitle(attr.getName());/*from w  ww  . java2  s .  c  o  m*/

    MergeAdapter adapter = new MergeAdapter();

    // Section: Attributes
    adapter.addAdapter(new ManagementModelRowAdapter(getActivity(), Arrays.asList(clonedAttr), this));

    // Section: Description
    TextView descrHeader = new TextView(getActivity());
    descrHeader.setBackgroundColor(Color.DKGRAY);
    descrHeader.setPadding(15, 10, 0, 10);
    descrHeader.setText(R.string.description);
    adapter.addView(descrHeader);

    TextView description = new TextView(getActivity());
    description.setText(attr.getDescr());

    adapter.addView(description);

    setListAdapter(adapter);
}

From source file:me.lizheng.deckviewsample.DeckViewSampleActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_deck_view_sample);

    //noinspection unchecked
    mDeckView = (DeckView) findViewById(R.id.deckview);
    mDefaultThumbnail = BitmapFactory.decodeResource(getResources(), R.drawable.default_thumbnail);
    mDefaultHeaderIcon = ContextCompat.getDrawable(getApplicationContext(), R.drawable.default_header_icon);

    if (savedInstanceState != null) {
        if (savedInstanceState.containsKey(CURRENT_LIST)) {
            mEntries = savedInstanceState.getParcelableArrayList(CURRENT_LIST);
        }/* ww  w.j ava  2 s .com*/

        if (savedInstanceState.containsKey(CURRENT_SCROLL)) {
            scrollToChildIndex = savedInstanceState.getInt(CURRENT_SCROLL);
        }
    }

    if (mEntries == null) {
        mEntries = new ArrayList<>();

        for (int i = 1; i < 100; i++) {
            CardDataModel cardDataModel = new CardDataModel();
            cardDataModel.id = generateUniqueKey();
            cardDataModel.title = "Image ID " + cardDataModel.id;
            mEntries.add(cardDataModel);
        }
    }

    // Callback implementation
    DeckView.Callback<CardDataModel> deckViewCallback = new DeckView.Callback<CardDataModel>() {
        @Override
        public ArrayList<CardDataModel> getData() {
            return mEntries;
        }

        @Override
        public void loadViewData(WeakReference<DeckChildView<CardDataModel>> dcv, CardDataModel item) {
            if (dcv.get() != null) {
                dcv.get().onDataLoaded(item, mDefaultThumbnail, mDefaultHeaderIcon, item.title, Color.DKGRAY);
            }
        }

        @Override
        public void unloadViewData(CardDataModel item) {
        }

        @Override
        public void onViewDismissed(CardDataModel item) {
            mEntries.remove(item);
            mDeckView.notifyDataSetChanged();
        }

        @Override
        public void onItemClick(CardDataModel item) {
            Toast.makeText(DeckViewSampleActivity.this, "Item with title: '" + item.title + "' clicked",
                    Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onNoViewsToDeck() {
            Toast.makeText(DeckViewSampleActivity.this, "No views to show", Toast.LENGTH_SHORT).show();
        }
    };

    mDeckView.initialize(deckViewCallback);

    if (scrollToChildIndex != -1) {
        mDeckView.post(new Runnable() {
            @Override
            public void run() {
                // Restore scroll position
                mDeckView.scrollToChild(scrollToChildIndex);
            }
        });
    }
}

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

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

    ActionBar bar = ((ActionBarActivity) getActivity()).getSupportActionBar();
    bar.setTitle(connectorName);//  w  ww .  j a  va 2s . co m

    MergeAdapter adapter = new MergeAdapter();

    TextView sectionHeader;

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

    MetricsAdapter generalMetricsAdapter = new MetricsAdapter(getActivity(), generalMetrics);
    adapter.addAdapter(generalMetricsAdapter);

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

    MetricsAdapter reqPerConnectorMetricsAdapter = new MetricsAdapter(getActivity(), reqPerConnectorMetrics);
    adapter.addAdapter(reqPerConnectorMetricsAdapter);

    setListAdapter(adapter);
}

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

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

    ActionBar bar = ((ActionBarActivity) getActivity()).getSupportActionBar();
    bar.setTitle(queueName);//from w w w.  j a  v  a2 s.co m

    MergeAdapter adapter = new MergeAdapter();

    TextView sectionHeader;

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

    MetricsAdapter inFlightMetricsAdapter = new MetricsAdapter(getActivity(), inFlightMetrics);
    adapter.addAdapter(inFlightMetricsAdapter);

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

    MetricsAdapter msgProcessedMetricsAdapter = new MetricsAdapter(getActivity(), msgProcessedMetrics);
    adapter.addAdapter(msgProcessedMetricsAdapter);

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

    MetricsAdapter consumerMetricsAdapter = new MetricsAdapter(getActivity(), consumerMetrics);
    adapter.addAdapter(consumerMetricsAdapter);

    setListAdapter(adapter);
}

From source file:com.amazonaws.mobile.auth.userpools.SignUpView.java

/**
 * Constructs the SignUp View./*from ww  w .  j a  va2 s. c  o m*/
 * @param context The activity context.
 * @param attrs The Attribute Set for the view from which the resources can be accessed.
 * @param defStyleAttr The resource identifier for the default style attribute.
 */
public SignUpView(final Context context, final AttributeSet attrs, final int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    setOrientation(VERTICAL);

    final int backgroundColor;
    if (isInEditMode()) {
        backgroundColor = Color.DKGRAY;
    } else {
        final TypedArray styledAttributes = context.obtainStyledAttributes(attrs, R.styleable.SignUpView);
        backgroundColor = styledAttributes.getInt(R.styleable.SignUpView_signUpViewBackgroundColor,
                Color.DKGRAY);
        styledAttributes.recycle();
    }

    this.fontFamily = CognitoUserPoolsSignInProvider.getFontFamily();
    this.typeFace = Typeface.create(this.fontFamily, Typeface.NORMAL);
    this.fullScreenBackgroundColor = CognitoUserPoolsSignInProvider.isBackgroundColorFullScreen();
    this.backgroundColor = CognitoUserPoolsSignInProvider.getBackgroundColor();

    if (this.fullScreenBackgroundColor) {
        this.backgroundDrawable = new BackgroundDrawable(this.backgroundColor);
    } else {
        this.splitBackgroundDrawable = new SplitBackgroundDrawable(0, this.backgroundColor);
    }
}