Example usage for android.graphics Color WHITE

List of usage examples for android.graphics Color WHITE

Introduction

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

Prototype

int WHITE

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

Click Source Link

Usage

From source file:com.ameron32.apps.tapnotes._trial.ui.CollapsingTitleLayout.java

public void setTextAppearance(int resId) {
    TypedArray atp = getContext().obtainStyledAttributes(resId, R.styleable.CollapsingTextAppearance);
    mTextPaint.setColor(atp.getColor(R.styleable.CollapsingTextAppearance_android_textColor, Color.WHITE));
    mCollapsedTitleTextSize = atp.getDimensionPixelSize(R.styleable.CollapsingTextAppearance_android_textSize,
            0);/*  ww  w.j av a2s  .c  om*/
    atp.recycle();

    recalculate();
}

From source file:com.dycode.jepretstory.mediachooser.activity.HomeFragmentActivity.java

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

    setContentView(R.layout.activity_item_media_chooser);

    FrameLayout mSelectedImagesContainerFrame = (FrameLayout) findViewById(R.id.selectedPhotosContainerFrame);
    if (MediaChooserConstants.MAX_MEDIA_LIMIT == 1) {
        mSelectedImagesContainerFrame.setVisibility(View.GONE);
    }/*www .  j a v a  2 s . c  o  m*/
    mSelectedImagesContainer = (LinearLayout) findViewById(R.id.selectedPhotosContainer);
    mSelectedImageEmptyMessage = (TextView) findViewById(R.id.selectedPhotosEmptyText);
    mViewPager = (ViewPager) findViewById(R.id.pager);

    if (getIntent() != null && (getIntent().getBooleanExtra("isFromBucket", false))) {

        if (getIntent().getBooleanExtra("image", false)) {

            mTabTitles.add(getResources().getString(R.string.image));
            setCurrentMode(MediaType.IMAGE);

        } else {

            mTabTitles.add(getResources().getString(R.string.video));
            setCurrentMode(MediaType.VIDEO);

        }

    } else {

        if (MediaChooserConstants.showImage) {
            mTabTitles.add(getResources().getString(R.string.image));
        }

        if (MediaChooserConstants.showVideo) {
            mTabTitles.add(getResources().getString(R.string.video));
        }

    }

    mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
    mViewPager.setAdapter(mSectionsPagerAdapter);

    mSlidingTabLayout = (SlidingTabLayout) findViewById(R.id.slidingTabs);
    mSlidingTabLayout.setCustomTabView(R.layout.tab_indicator, android.R.id.text1);
    //mSlidingTabLayout.setSelectedIndicatorColors(getResources().getColor(android.R.color.white));
    mSlidingTabLayout.setDistributeEvenly(true);
    mSlidingTabLayout.setViewPager(mViewPager);

    final android.app.ActionBar actionBar = getActionBar();
    if (actionBar != null) {

        materialMenu = new MaterialMenuIcon(this, Color.WHITE);
        materialMenu.setState(IconState.ARROW);

        if (mTabTitles.size() > 1) {
            mSlidingTabLayout.setVisibility(View.VISIBLE);
        } else {
            mSlidingTabLayout.setVisibility(View.GONE);
        }

        mSlidingTabLayout.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
            @Override
            public void onPageSelected(int position) {
                ActionBar ab = HomeFragmentActivity.this.getActionBar();
                ab.show();
                if (position == 0) {
                    setCurrentMode(MediaType.IMAGE);
                } else {
                    setCurrentMode(MediaType.VIDEO);
                }
            }
        });
    }

    mViewPager.setCurrentItem(0);

    //boolean isFromBucket = (getIntent() != null && (getIntent().getBooleanExtra("isFromBucket", false)));
    if (getIntent().getParcelableArrayListExtra("selectedImages") != null) {
        mCurrentSelectedImages = getIntent().getParcelableArrayListExtra("selectedImages");
        //mImageSelectedCount = mCurrentSelectedImages.size();
        if (mCurrentSelectedImages.size() > 0) {
            onImageSelectedCount(mCurrentSelectedImages.size());
            for (MediaModel selImage : mCurrentSelectedImages) {
                this.onImageSelected(selImage);
            }
        }
    }
    if (getIntent().getParcelableArrayListExtra("selectedVideos") != null) {
        mCurrentSelectedVideos = getIntent().getParcelableArrayListExtra("selectedVideos");
        //mImageSelectedCount = mCurrentSelectedImages.size();
        if (mCurrentSelectedVideos.size() > 0) {
            onVideoSelectedCount(mCurrentSelectedVideos.size());
            for (MediaModel selVideo : mCurrentSelectedVideos) {
                this.onVideoSelected(selVideo);
            }
        }
    }
}

From source file:com.appeaser.sublimepicker.Sampler.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.sampler);//from ww w.j  av  a 2 s  .co m

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    if (getSupportActionBar() != null) {
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowHomeEnabled(true);
    }

    // Finish on navigation icon click
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            finish();
        }
    });

    ivLaunchPicker = (ImageView) findViewById(R.id.ivLaunchPicker);
    cbDatePicker = (CheckBox) findViewById(R.id.cbDatePicker);
    cbTimePicker = (CheckBox) findViewById(R.id.cbTimePicker);
    cbRecurrencePicker = (CheckBox) findViewById(R.id.cbRecurrencePicker);
    rbDatePicker = (RadioButton) findViewById(R.id.rbDatePicker);
    rbTimePicker = (RadioButton) findViewById(R.id.rbTimePicker);
    rbRecurrencePicker = (RadioButton) findViewById(R.id.rbRecurrencePicker);
    tvPickerToShow = (TextView) findViewById(R.id.tvPickerToShow);
    tvActivatedPickers = (TextView) findViewById(R.id.tvActivatedPickers);
    svMainContainer = (ScrollView) findViewById(R.id.svMainContainer);

    cbAllowDateRangeSelection = (CheckBox) findViewById(R.id.cbAllowDateRangeSelection);

    llDateHolder = (LinearLayout) findViewById(R.id.llDateHolder);
    llDateRangeHolder = (LinearLayout) findViewById(R.id.llDateRangeHolder);

    // Initialize views to display the chosen Date, Time & Recurrence options
    tvYear = ((TextView) findViewById(R.id.tvYear));
    tvMonth = ((TextView) findViewById(R.id.tvMonth));
    tvDay = ((TextView) findViewById(R.id.tvDay));

    tvStartDate = ((TextView) findViewById(R.id.tvStartDate));
    tvEndDate = ((TextView) findViewById(R.id.tvEndDate));

    tvHour = ((TextView) findViewById(R.id.tvHour));
    tvMinute = ((TextView) findViewById(R.id.tvMinute));

    tvRecurrenceOption = ((TextView) findViewById(R.id.tvRecurrenceOption));
    tvRecurrenceRule = ((TextView) findViewById(R.id.tvRecurrenceRule));

    rlDateTimeRecurrenceInfo = (RelativeLayout) findViewById(R.id.rlDateTimeRecurrenceInfo);

    ivLaunchPicker.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_IN);
    ivLaunchPicker.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            // DialogFragment to host SublimePicker
            SublimePickerFragment pickerFrag = new SublimePickerFragment();
            pickerFrag.setCallback(mFragmentCallback);

            // Options
            Pair<Boolean, SublimeOptions> optionsPair = getOptions();

            if (!optionsPair.first) { // If options are not valid
                Toast.makeText(Sampler.this, "No pickers activated", Toast.LENGTH_SHORT).show();
                return;
            }

            // Valid options
            Bundle bundle = new Bundle();
            bundle.putParcelable("SUBLIME_OPTIONS", optionsPair.second);
            pickerFrag.setArguments(bundle);

            pickerFrag.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
            pickerFrag.show(getSupportFragmentManager(), "SUBLIME_PICKER");
        }
    });

    // De/activates Date Picker
    cbDatePicker.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            rbDatePicker.setVisibility(cbDatePicker.isChecked() ? View.VISIBLE : View.GONE);
            onActivatedPickersChanged();
        }
    });

    // De/activates Time Picker
    cbTimePicker.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            rbTimePicker.setVisibility(cbTimePicker.isChecked() ? View.VISIBLE : View.GONE);
            onActivatedPickersChanged();
        }
    });

    // De/activates Recurrence Picker
    cbRecurrencePicker.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            rbRecurrencePicker.setVisibility(cbRecurrencePicker.isChecked() ? View.VISIBLE : View.GONE);
            onActivatedPickersChanged();
        }
    });

    cbAllowDateRangeSelection.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    });

    // restore state
    dealWithSavedInstanceState(savedInstanceState);
}

From source file:au.com.zacher.popularmovies.activity.layout.CollapsingTitleLayout.java

public void setTextAppearance(int resId) {
    TypedArray atp = this.getContext().obtainStyledAttributes(resId, R.styleable.CollapsingTextAppearance);
    this.mTextPaint.setColor(atp.getColor(R.styleable.CollapsingTextAppearance_android_textColor, Color.WHITE));
    this.mCollapsedTitleTextSize = atp
            .getDimensionPixelSize(R.styleable.CollapsingTextAppearance_android_textSize, 0);

    // added shadow so the text shows better on top of bright images
    this.mTextPaint.setShadowLayer(5, 0, 0, Color.rgb(0, 0, 0));

    atp.recycle();/*from  ww w  .j av a 2s.c  o m*/

    this.recalculate();
}

From source file:android.support.design.widget.FloatingActionButtonImpl.java

GradientDrawable createShapeDrawable() {
    GradientDrawable d = newGradientDrawableForShape();
    d.setShape(GradientDrawable.OVAL);
    d.setColor(Color.WHITE);
    return d;
}

From source file:com.bluros.music.subfragments.QuickControlsFragment.java

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

    mPlayPause = (PlayPauseButton) rootView.findViewById(R.id.play_pause);
    mPlayPauseExpanded = (PlayPauseButton) rootView.findViewById(R.id.playpause);
    playPauseWrapper = rootView.findViewById(R.id.play_pause_wrapper);
    playPauseWrapperExpanded = rootView.findViewById(R.id.playpausewrapper);
    playPauseWrapper.setOnClickListener(mPlayPauseListener);
    playPauseWrapperExpanded.setOnClickListener(mPlayPauseExpandedListener);
    mProgress = (ProgressBar) rootView.findViewById(R.id.song_progress_normal);
    mSeekBar = (SeekBar) rootView.findViewById(R.id.song_progress);
    mTitle = (TextView) rootView.findViewById(R.id.title);
    mArtist = (TextView) rootView.findViewById(R.id.artist);
    mTitleExpanded = (TextView) rootView.findViewById(R.id.song_title);
    mArtistExpanded = (TextView) rootView.findViewById(R.id.song_artist);
    mAlbumArt = (ImageView) rootView.findViewById(R.id.album_art_nowplayingcard);
    mBlurredArt = (ImageView) rootView.findViewById(R.id.blurredAlbumart);
    next = (MaterialIconView) rootView.findViewById(R.id.next);
    previous = (MaterialIconView) rootView.findViewById(R.id.previous);
    topContainer = rootView.findViewById(R.id.topContainer);

    LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) mProgress.getLayoutParams();
    mProgress.measure(0, 0);//from w w  w  .ja v  a 2  s  .co  m
    layoutParams.setMargins(0, -(mProgress.getMeasuredHeight() / 2), 0, 0);
    mProgress.setLayoutParams(layoutParams);

    mPlayPause.setColor(Config.accentColor(getActivity(), Helpers.getATEKey(getActivity())));
    mPlayPauseExpanded.setColor(Color.WHITE);

    mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
        @Override
        public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
            if (b) {
                MusicPlayer.seek((long) i);
            }
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    });

    next.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Handler handler = new Handler();
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    MusicPlayer.next();
                }
            }, 200);

        }
    });

    previous.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Handler handler = new Handler();
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    MusicPlayer.previous(getActivity(), false);
                }
            }, 200);

        }
    });

    ((BaseActivity) getActivity()).setMusicStateListenerListener(this);

    return rootView;
}

From source file:com.eeda123.gsell.order.AmazonOrderFragment.java

private void initRefresh() {
    //SwipeRefreshLayout
    mSwipeLayout = (SwipeRefreshLayout) getView().findViewById(R.id.swipeLayout);

    mSwipeLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.YELLOW, Color.RED);

    // ???/*from w  ww .ja  va 2 s .c  o m*/
    mSwipeLayout.setDistanceToTriggerSync(300);
    // 
    mSwipeLayout.setProgressBackgroundColorSchemeColor(Color.WHITE);
    // ?
    mSwipeLayout.setSize(SwipeRefreshLayout.LARGE);

    //?
    mSwipeLayout.setOnRefreshListener(this);
}

From source file:com.cosmicsubspace.nerdyaudio.visuals.PlayControlsView.java

public PlayControlsView(Context context, AttributeSet attrs) {
    super(context, attrs);
    pt = new Paint(Paint.ANTI_ALIAS_FLAG);
    density = getResources().getDisplayMetrics().density;
    qm = QueueManager.getInstance();/*from   w ww . j  a va2  s .c  om*/
    ap = AudioPlayer.getInstance();

    Resources res = getResources();
    menuColor = getResources().getColor(R.color.colorPrimary);
    buttonColor = Color.WHITE;
    textPrimary = getResources().getColor(R.color.colorLightPrimaryText);
    textSecondary = getResources().getColor(R.color.colorLightSecondaryText);

    playedColor = ColorFiddler.setAlpha(res.getColor(R.color.colorPrimary), 200);
    //Log2.log(2,this,Color.alpha(playedColor),Color.red(playedColor),Color.blue(playedColor),Color.green(playedColor));
    remainingColor = ColorFiddler.setAlpha(res.getColor(R.color.colorPrimary), 100);

    playedColorEX = ColorFiddler.setAlpha(res.getColor(R.color.colorAccentFallbackDark), 255);
    remainingColorEX = ColorFiddler.setAlpha(res.getColor(R.color.colorAccent), 255);
    //We need to disable hardware acceleration for this layer,
    //since we need to fiddle with blending and shader combining
    //for the marquee text effect.
    //It also takes care of a bug with Paths.
    setLayerType(View.LAYER_TYPE_SOFTWARE, null);

    prepareLayout();

    inst = this;

    refreshPlaying();
}

From source file:com.carver.paul.truesight.Ui.widget.SlidingTabLayout.java

/**
 * Create a default view to be used for tabs. This is called if a custom tab view is not set via
 * {@link #setCustomTabView(int, int)}./* ww  w .j a v  a2 s  .c o m*/
 */
protected TextView createDefaultTabView(Context context) {
    TextView textView = new TextView(context);
    textView.setGravity(Gravity.CENTER);
    textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, TAB_VIEW_TEXT_SIZE_SP);
    textView.setTypeface(Typeface.DEFAULT_BOLD);
    textView.setTextColor(Color.WHITE);
    textView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
            ViewGroup.LayoutParams.WRAP_CONTENT));

    TypedValue outValue = new TypedValue();
    getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true);
    textView.setBackgroundResource(outValue.resourceId);
    textView.setAllCaps(true);

    int padding = (int) (TAB_VIEW_PADDING_DIPS * getResources().getDisplayMetrics().density);
    textView.setPadding(padding, padding, padding, padding);

    return textView;
}

From source file:com.bitants.wally.activities.MainActivity.java

@Override
protected void handleReceivedIntent(Context context, Intent intent) {
    long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, 0L);
    if (WallyApplication.getDownloadIDs().containsKey(id)) {
        WallyApplication.getDownloadIDs().remove(id);
        if (fileReceiver != null) {
            Intent fileChangeIntent = new Intent(FileReceiver.GET_FILES);
            fileReceiver.onReceive(context, fileChangeIntent);
        }//from  w  w  w. ja v a 2 s .  co  m
        View heartTabImageView = tabBarView.getTab(4).getImageView();
        startHeartPopoutAnimation(heartTabImageView, Color.WHITE);
    }
}