Example usage for android.graphics Color YELLOW

List of usage examples for android.graphics Color YELLOW

Introduction

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

Prototype

int YELLOW

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

Click Source Link

Usage

From source file:com.applivery.applvsdklib.ui.views.update.MustUpdateViewImpl.java

/**
 * Overrided in order to get fullScreen dialog
 * @param savedInstanceState//  w ww .j a v  a 2  s  . co m
 * @return
 */
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {

    final RelativeLayout root = new RelativeLayout(getActivity());
    root.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.MATCH_PARENT));

    final Dialog dialog = new Dialog(getActivity());
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setContentView(root);
    dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.YELLOW));
    dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);

    return dialog;
}

From source file:com.sxt.chat.utils.NotificationHelper.java

/**
 * ?/* w  w  w . j av a 2s. c  om*/
 * <p>
 * note : notify() ? ???,?? so, Create?
 */
public NotificationHelper(Context ctx) {
    super(ctx);
    context = ctx;
    soundUri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.notify_message);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        AudioAttributes att = new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_NOTIFICATION)
                .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH).build();
        NotificationChannel channel = new NotificationChannel(DEFAULT_CHANNEL, "Channel",
                NotificationManager.IMPORTANCE_HIGH);
        channel.setSound(soundUri, att);
        channel.setLightColor(Color.YELLOW);
        channel.setShowBadge(true);
        channel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
        getManager().createNotificationChannel(channel);

        NotificationChannel chanCustom = new NotificationChannel(CUSTOM_NOTIFY_CHANNEL, "Custom Layout Channel",
                NotificationManager.IMPORTANCE_HIGH);
        channel.setSound(soundUri, att);
        chanCustom.setLightColor(Color.RED);
        chanCustom.setShowBadge(true);
        chanCustom.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
        getManager().createNotificationChannel(chanCustom);
    }
}

From source file:com.google.example.dfp.manualimpressions.ManualImpressionsActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_manual_impressions);
    setFirstAdReceived(false);/*from  www.  jav a  2 s .c  o m*/
    setAdInViewPager(false);
    setManualImpressionAlreadyFired(false);

    dfpFragment = DfpFragment.newInstance(createDfpAdView());
    pagerAdapter = new MyPagerAdapter(getSupportFragmentManager());
    pagerAdapter.addColor(Color.BLUE);
    pagerAdapter.addColor(Color.RED);
    pagerAdapter.addColor(Color.YELLOW);
    pagerAdapter.addColor(Color.BLUE);
    pagerAdapter.addColor(Color.GREEN);
    pagerAdapter.addColor(Color.RED);

    ViewPager pager = (ViewPager) findViewById(R.id.viewpager);
    pager.setAdapter(pagerAdapter);
    pageChangeListener = new MyOnPageChangeListener();
    pager.setOnPageChangeListener(pageChangeListener);
}

From source file:com.esri.arcgisruntime.sample.symbolizeshapefile.MainActivity.java

private void symbolizeShapefile() {

    // create a shapefile feature table from the local data
    ShapefileFeatureTable shapefileFeatureTable = new ShapefileFeatureTable(
            Environment.getExternalStorageDirectory() + getString(R.string.shapefile_folder)
                    + getString(R.string.subdivisions_shp));

    // use the shapefile feature table to create a feature layer
    FeatureLayer featureLayer = new FeatureLayer(shapefileFeatureTable);

    // create the Symbol
    SimpleLineSymbol lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID, Color.RED, 1.0f);
    SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, Color.YELLOW, lineSymbol);

    // create the Renderer
    SimpleRenderer renderer = new SimpleRenderer(fillSymbol);

    // set the Renderer on the Layer
    featureLayer.setRenderer(renderer);/* w w w .  j av a 2s  .  c o m*/

    // add the feature layer to the map
    mMap.getOperationalLayers().add(featureLayer);
}

From source file:net.yanzm.mth.MaterialTabHost.java

public MaterialTabHost(Context context, AttributeSet attrs) {
    super(context, attrs);

    inflater = LayoutInflater.from(context);

    TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.MaterialTabHost, 0, 0);
    int indicatorColor = a.getColor(R.styleable.MaterialTabHost_colorTabIndicator, Color.YELLOW);
    colorControlActivated = a.getColor(R.styleable.MaterialTabHost_colorBackground, Color.WHITE);

    setBackgroundColor(colorControlActivated);
    a.recycle();//w w  w  .ja v a  2  s  .c  o  m

    // ColorDrawable on 2.x does not use getBounds() so use ShapeDrawable
    indicator = new ShapeDrawable();
    indicator.setColorFilter(indicatorColor, PorterDuff.Mode.SRC_ATOP);

    Resources res = context.getResources();
    indicatorHeight = res.getDimensionPixelSize(R.dimen.mth_tab_indicator_height);
    leftOffset = res.getDimensionPixelSize(R.dimen.mth_tab_left_offset);
    int tabHeight = res.getDimensionPixelSize(R.dimen.mth_tab_height);

    tabWidget = new TabWidget(context);
    tabWidget.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, tabHeight));
    tabWidget.setId(android.R.id.tabs);
    tabWidget.setStripEnabled(false);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        tabWidget.setShowDividers(LinearLayout.SHOW_DIVIDER_NONE);
    }
    addView(tabWidget);

    FrameLayout fl = new FrameLayout(context);
    fl.setLayoutParams(new LayoutParams(0, 0));
    fl.setId(android.R.id.tabcontent);
    addView(fl);

    setup();

    setOnTabChangedListener(new TabHost.OnTabChangeListener() {
        @Override
        public void onTabChanged(String tabId) {
            if (listener != null) {
                listener.onTabSelected(Integer.valueOf(tabId));
            }
        }
    });

    float density = getResources().getDisplayMetrics().density;

    // set elevation for App bar
    // http://www.google.com/design/spec/what-is-material/objects-in-3d-space.html#objects-in-3d-space-elevation
    ViewCompat.setElevation(this, APP_TAB_ELEVATION * density);
}

From source file:org.schabi.newpipe.ErrorActivity.java

public static void reportError(final Context context, final List<Exception> el, final Class returnAcitivty,
        View rootView, final ErrorInfo errorInfo) {

    if (rootView != null) {
        Snackbar.make(rootView, R.string.error_snackbar_message, Snackbar.LENGTH_LONG)
                .setActionTextColor(Color.YELLOW)
                .setAction(R.string.error_snackbar_action, new View.OnClickListener() {
                    @Override//  w  w  w . jav  a 2s  . c o  m
                    public void onClick(View v) {
                        ActivityCommunicator ac = ActivityCommunicator.getCommunicator();
                        ac.errorList = el;
                        ac.returnActivity = returnAcitivty;
                        ac.errorInfo = errorInfo;
                        Intent intent = new Intent(context, ErrorActivity.class);
                        context.startActivity(intent);
                    }
                }).show();
    } else {
        ActivityCommunicator ac = ActivityCommunicator.getCommunicator();
        ac.errorList = el;
        ac.returnActivity = returnAcitivty;
        ac.errorInfo = errorInfo;
        Intent intent = new Intent(context, ErrorActivity.class);
        context.startActivity(intent);
    }
}

From source file:com.example.accessibility.FeedbackClickView.java

public FeedbackClickView(Context context) {

    super(context);

    paintWhite.setColor(Color.WHITE);

    paintWhite.setStrokeWidth(4);// ww  w .j  a v  a2 s .  c om
    paintWhite.setARGB(128, 255, 255, 255);
    paintWhite.setStyle(Paint.Style.FILL_AND_STROKE);
    paintWhite.setAntiAlias(true);

    paintBlack.setStrokeWidth(4);
    paintBlack.setARGB(128, 0, 0, 0);
    paintBlack.setStyle(Paint.Style.FILL_AND_STROKE);
    paintBlack.setAntiAlias(true);

    mGreen = new Paint(Paint.ANTI_ALIAS_FLAG);
    mGreen.setARGB(128, 0, 255, 0);
    mGreen.setStyle(Style.FILL);

    mYellow.setStyle(Style.FILL_AND_STROKE);
    mYellow.setStrokeWidth(3);
    mYellow.setColor(Color.YELLOW);

    mBlack.setStyle(Style.FILL_AND_STROKE);
    mBlack.setStrokeWidth(3);
    mBlack.setColor(Color.BLACK);

    mButton = "clear";
    oval = new RectF(50, 50, 150, 150);
    deg = 0;

}

From source file:me.piruin.quickaction.sample.SampleActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sample);
    ButterKnife.bind(this);

    //Config default color
    QuickAction.setDefaultColor(ResourcesCompat.getColor(getResources(), R.color.teal, null));
    QuickAction.setDefaultTextColor(Color.BLACK);

    ActionItem nextItem = new ActionItem(ID_DOWN, "Next", R.drawable.ic_arrow_downward);
    ActionItem prevItem = new ActionItem(ID_UP, "Prev", R.drawable.ic_arrow_upward);
    ActionItem searchItem = new ActionItem(ID_SEARCH, "Find", R.drawable.ic_search);
    ActionItem infoItem = new ActionItem(ID_INFO, "Info", R.drawable.ic_info);
    ActionItem eraseItem = new ActionItem(ID_ERASE, "Clear", R.drawable.ic_clear);
    ActionItem okItem = new ActionItem(ID_OK, "OK", R.drawable.ic_ok);

    //use setSticky(true) to disable QuickAction dialog being dismissed after an item is clicked
    prevItem.setSticky(true);/*from w  ww.  j  a v a2s . c  o m*/
    nextItem.setSticky(true);

    //create QuickAction. Use QuickAction.VERTICAL or QuickAction.HORIZONTAL param to define layout
    //orientation
    quickAction = new QuickAction(this, QuickAction.HORIZONTAL);
    quickAction.setColorRes(R.color.pink);
    quickAction.setTextColorRes(R.color.white);

    //set divider with color
    //quickAction.setDividerColor(ContextCompat.getColor(this, R.color.white));
    //

    //set enable divider default is disable for vertical
    //quickAction.setEnabledDivider(true);
    //Note this must be called before addActionItem()

    //add action items into QuickAction
    quickAction.addActionItem(nextItem, prevItem);
    quickAction.setTextColor(Color.YELLOW);
    quickAction.addActionItem(searchItem);
    quickAction.addActionItem(infoItem);
    quickAction.addActionItem(eraseItem);
    quickAction.addActionItem(okItem);

    //Set listener for action item clicked
    quickAction.setOnActionItemClickListener(new QuickAction.OnActionItemClickListener() {
        @Override
        public void onItemClick(ActionItem item) {
            //here we can filter which action item was clicked with pos or actionId parameter
            String title = item.getTitle();
            Toast.makeText(SampleActivity.this, title + " selected", Toast.LENGTH_SHORT).show();
            if (!item.isSticky())
                quickAction.remove(item);
        }
    });

    //set listener for on dismiss event, this listener will be called only if QuickAction dialog
    // was dismissed
    //by clicking the area outside the dialog.
    quickAction.setOnDismissListener(new QuickAction.OnDismissListener() {
        @Override
        public void onDismiss() {
            Toast.makeText(SampleActivity.this, "Dismissed", Toast.LENGTH_SHORT).show();
        }
    });

    //Quick and Easy intent selector in tooltip styles
    Intent sendIntent = new Intent();
    sendIntent.setAction(Intent.ACTION_SEND);
    sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
    sendIntent.setType("text/plain");

    quickIntent = new QuickIntentAction(this).setActivityIntent(sendIntent).create();
    quickIntent.setAnimStyle(QuickAction.Animation.REFLECT);
}

From source file:com.jjoe64.graphview_demos.fragments.PointsGraph.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_main, container, false);

    GraphView graph = (GraphView) rootView.findViewById(R.id.graph);
    PointsGraphSeries<DataPoint> series = new PointsGraphSeries<DataPoint>(
            new DataPoint[] { new DataPoint(0, -2), new DataPoint(1, 5), new DataPoint(2, 3),
                    new DataPoint(3, 2), new DataPoint(4, 6) });
    graph.addSeries(series);/*w  ww  . java 2  s . c  o m*/
    series.setShape(PointsGraphSeries.Shape.POINT);

    PointsGraphSeries<DataPoint> series2 = new PointsGraphSeries<DataPoint>(
            new DataPoint[] { new DataPoint(0, -1), new DataPoint(1, 4), new DataPoint(2, 2),
                    new DataPoint(3, 1), new DataPoint(4, 5) });
    graph.addSeries(series2);
    series2.setShape(PointsGraphSeries.Shape.RECTANGLE);
    series2.setColor(Color.RED);

    PointsGraphSeries<DataPoint> series3 = new PointsGraphSeries<DataPoint>(
            new DataPoint[] { new DataPoint(0, 0), new DataPoint(1, 3), new DataPoint(2, 1),
                    new DataPoint(3, 0), new DataPoint(4, 4) });
    graph.addSeries(series3);
    series3.setShape(PointsGraphSeries.Shape.TRIANGLE);
    series3.setColor(Color.YELLOW);

    PointsGraphSeries<DataPoint> series4 = new PointsGraphSeries<DataPoint>(
            new DataPoint[] { new DataPoint(0, 1), new DataPoint(1, 2), new DataPoint(2, 0),
                    new DataPoint(3, -1), new DataPoint(4, 3) });
    graph.addSeries(series4);
    series4.setColor(Color.GREEN);
    series4.setCustomShape(new PointsGraphSeries.CustomShape() {
        @Override
        public void draw(Canvas canvas, Paint paint, float x, float y, DataPointInterface dataPoint) {
            paint.setStrokeWidth(10);
            canvas.drawLine(x - 20, y - 20, x + 20, y + 20, paint);
            canvas.drawLine(x + 20, y - 20, x - 20, y + 20, paint);
        }
    });

    return rootView;
}

From source file:co.mindquake.nester.pushNoti.GcmIntentService.java

private void sendNotification(String msg, Bundle extras) {
    mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);

    PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
            new Intent(this, MainActivity.class).putExtra("notification", "true")
                    .putExtra("uuid", extras.getString("uuid")).putExtra("title", extras.getString("title")),
            PendingIntent.FLAG_UPDATE_CURRENT);

    long[] vibrate = { 0, 100, 200, 300 };

    NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
            .setSmallIcon(R.drawable.push_icon).setContentTitle(extras.getString("title"))
            .setStyle(new NotificationCompat.BigTextStyle().bigText(msg)).setContentText(msg)
            .setVibrate(vibrate).setLights(Color.YELLOW, 500, 500).setAutoCancel(true);

    mBuilder.setContentIntent(contentIntent);
    mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());

}