List of usage examples for android.graphics Color WHITE
int WHITE
To view the source code for android.graphics Color WHITE.
Click Source Link
From source file:com.amaze.filemanager.ui.views.drawer.Drawer.java
public Drawer(MainActivity mainActivity) { this.mainActivity = mainActivity; resources = mainActivity.getResources(); dataUtils = DataUtils.getInstance(); drawerHeaderLayout = mainActivity.getLayoutInflater().inflate(R.layout.drawerheader, null); drawerHeaderParent = drawerHeaderLayout.findViewById(R.id.drawer_header_parent); drawerHeaderView = drawerHeaderLayout.findViewById(R.id.drawer_header); drawerHeaderView.setOnLongClickListener(v -> { Intent intent1;/*w w w . ja va 2 s.co m*/ if (SDK_INT < Build.VERSION_CODES.KITKAT) { intent1 = new Intent(); intent1.setAction(Intent.ACTION_GET_CONTENT); } else { intent1 = new Intent(Intent.ACTION_OPEN_DOCUMENT); } intent1.addCategory(Intent.CATEGORY_OPENABLE); intent1.setType("image/*"); mainActivity.startActivityForResult(intent1, image_selector_request_code); return false; }); mImageLoader = AppConfig.getInstance().getImageLoader(); navView = mainActivity.findViewById(R.id.navigation); //set width of drawer in portrait to follow material guidelines /*if(!Utils.isDeviceInLandScape(mainActivity)){ setNavViewDimension(navView); }*/ navView.setNavigationItemSelectedListener(this); int accentColor = mainActivity.getAccent(), idleColor; if (mainActivity.getAppTheme().equals(AppTheme.LIGHT)) { idleColor = mainActivity.getResources().getColor(R.color.item_light_theme); } else { idleColor = Color.WHITE; } actionViewStateManager = new ActionViewStateManager(navView, idleColor, accentColor); ColorStateList drawerColors = new ColorStateList( new int[][] { new int[] { android.R.attr.state_checked }, new int[] { android.R.attr.state_enabled }, new int[] { android.R.attr.state_pressed }, new int[] { android.R.attr.state_focused }, new int[] { android.R.attr.state_pressed } }, new int[] { accentColor, idleColor, idleColor, idleColor, idleColor }); navView.setItemTextColor(drawerColors); navView.setItemIconTintList(drawerColors); if (mainActivity.getAppTheme().equals(AppTheme.DARK)) { navView.setBackgroundColor(Utils.getColor(mainActivity, R.color.holo_dark_background)); } else if (mainActivity.getAppTheme().equals(AppTheme.BLACK)) { navView.setBackgroundColor(Utils.getColor(mainActivity, android.R.color.black)); } else { navView.setBackgroundColor(Color.WHITE); } mDrawerLayout = mainActivity.findViewById(R.id.drawer_layout); //mDrawerLayout.setStatusBarBackgroundColor(Color.parseColor((currentTab==1 ? skinTwo : skin))); drawerHeaderView.setBackgroundResource(R.drawable.amaze_header); //drawerHeaderParent.setBackgroundColor(Color.parseColor((currentTab==1 ? skinTwo : skin))); if (mainActivity.findViewById(R.id.tab_frame) != null) { lock(DrawerLayout.LOCK_MODE_LOCKED_OPEN); open(); mDrawerLayout.setScrimColor(Color.TRANSPARENT); mDrawerLayout.post(this::open); } else if (mainActivity.findViewById(R.id.tab_frame) == null) { unlock(); close(); mDrawerLayout.post(this::close); } navView.addHeaderView(drawerHeaderLayout); if (!isDrawerLocked) { mDrawerToggle = new ActionBarDrawerToggle(mainActivity, /* host Activity */ mDrawerLayout, /* DrawerLayout object */ R.drawable.ic_drawer_l, /* nav drawer image to replace 'Up' caret */ R.string.drawer_open, /* "open drawer" description for accessibility */ R.string.drawer_close /* "close drawer" description for accessibility */ ) { public void onDrawerClosed(View view) { Drawer.this.onDrawerClosed(); } public void onDrawerOpened(View drawerView) { //title.setText("Amaze File Manager"); // creates call to onPrepareOptionsMenu() } }; mDrawerLayout.setDrawerListener(mDrawerToggle); mainActivity.getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_drawer_l); mainActivity.getSupportActionBar().setDisplayHomeAsUpEnabled(true); mainActivity.getSupportActionBar().setHomeButtonEnabled(true); mDrawerToggle.syncState(); } }
From source file:com.doodle.android.chips.ChipsView.java
private void initAttr(Context context, AttributeSet attrs) { TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.ChipsView, 0, 0); try {// ww w .j a v a 2 s. c om mMaxHeight = a.getDimensionPixelSize(R.styleable.ChipsView_cv_max_height, DEFAULT_MAX_HEIGHT); mVerticalSpacing = a.getDimensionPixelSize(R.styleable.ChipsView_cv_vertical_spacing, (int) (DEFAULT_VERTICAL_SPACING * mDensity)); mChipsColor = a.getColor(R.styleable.ChipsView_cv_color, ContextCompat.getColor(context, R.color.base30)); mChipsColorClicked = a.getColor(R.styleable.ChipsView_cv_color_clicked, ContextCompat.getColor(context, R.color.colorPrimaryDark)); mChipsColorErrorClicked = a.getColor(R.styleable.ChipsView_cv_color_error_clicked, ContextCompat.getColor(context, R.color.color_error)); mChipsBgColor = a.getColor(R.styleable.ChipsView_cv_bg_color, ContextCompat.getColor(context, R.color.base10)); mChipsBgColorClicked = a.getColor(R.styleable.ChipsView_cv_bg_color_clicked, ContextCompat.getColor(context, R.color.blue)); mChipsBgColorIndelible = a.getColor(R.styleable.ChipsView_cv_bg_color_indelible, mChipsBgColor); mChipsBgColorErrorClicked = a.getColor(R.styleable.ChipsView_cv_bg_color_clicked, ContextCompat.getColor(context, R.color.color_error)); mChipsTextColor = a.getColor(R.styleable.ChipsView_cv_text_color, Color.BLACK); mChipsTextColorClicked = a.getColor(R.styleable.ChipsView_cv_text_color_clicked, Color.WHITE); mChipsTextColorErrorClicked = a.getColor(R.styleable.ChipsView_cv_text_color_clicked, Color.WHITE); mChipsTextColorIndelible = a.getColor(R.styleable.ChipsView_cv_text_color_indelible, mChipsTextColor); mChipsPlaceholderResId = a.getResourceId(R.styleable.ChipsView_cv_icon_placeholder, R.drawable.ic_person_24dp); mChipsPlaceholderTint = a.getColor(R.styleable.ChipsView_cv_icon_placeholder_tint, 0); mChipsDeleteResId = a.getResourceId(R.styleable.ChipsView_cv_icon_delete, R.drawable.ic_close_24dp); mChipsHintText = a.getString(R.styleable.ChipsView_cv_text_hint); mChipsMargin = a.getDimensionPixelSize(R.styleable.ChipsView_cv_chips_margin, 0); } finally { a.recycle(); } }
From source file:au.com.wallaceit.reddinator.MainActivity.java
private void setThemeColors() { int themenum = Integer.parseInt(PreferenceManager.getDefaultSharedPreferences(context) .getString(context.getString(R.string.widget_theme_pref), "1")); switch (themenum) { case 1://from w w w .ja v a2 s . c o m actionBar.getCustomView().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#CEE3F8"))); appView.setBackgroundColor(Color.WHITE); configbutton.setBackgroundColor(Color.parseColor("#CEE3F8")); refreshbutton.setBackgroundColor(Color.parseColor("#CEE3F8")); errorIcon.setBackgroundColor(Color.parseColor("#CEE3F8")); srtext.setTextColor(Color.parseColor("#000000")); break; case 3: case 5: Drawable header = getResources().getDrawable(android.R.drawable.dark_header); actionBar.getCustomView().setBackgroundDrawable(header); appView.setBackgroundColor(Color.BLACK); configbutton.setBackgroundDrawable(null); refreshbutton.setBackgroundDrawable(null); errorIcon.setBackgroundDrawable(header); srtext.setTextColor(Color.parseColor("#FFFFFF")); break; case 4: case 2: actionBar.getCustomView().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#5F99CF"))); appView.setBackgroundColor(Color.BLACK); configbutton.setBackgroundColor(Color.parseColor("#5F99CF")); refreshbutton.setBackgroundColor(Color.parseColor("#5F99CF")); errorIcon.setBackgroundColor(Color.parseColor("#5F99CF")); srtext.setTextColor(Color.parseColor("#000000")); break; } }
From source file:com.spoiledmilk.cykelsuperstier.navigation.SMRouteNavigationActivity.java
public void onPatchContainerClick(View v) { v.setBackgroundColor(isPathSelected ? Color.rgb(255, 255, 255) : Color.rgb(236, 104, 0)); ((ImageView) findViewById(R.id.imgCheckbox1)) .setImageResource(isPathSelected ? R.drawable.check_field : R.drawable.check_in_orange); ((ImageView) findViewById(R.id.imgPath)) .setImageResource(isPathSelected ? R.drawable.bike_icon_gray : R.drawable.bike_icon_white); textPath.setTextColor(isPathSelected ? getResources().getColor(R.color.DarkGrey) : Color.WHITE); if (isPathSelected) getMapFragment().overlaysManager.removeBikeRoutes(); else/*ww w . j a v a2s . c om*/ getMapFragment().overlaysManager.drawBikeRoutes(this); isPathSelected = !isPathSelected; }
From source file:com.apache.fastandroid.novel.view.readview.PageFactory.java
/** * ?//w w w. j a v a 2s . c o m * * @param canvas */ public synchronized void onDraw(Canvas canvas) { if (mLines.size() == 0) { curEndPos = curBeginPos; mLines = pageDown(); } if (mLines.size() > 0) { int y = marginHeight + (mLineSpace << 1); // if (mBookPageBg != null) { canvas.drawBitmap(mBookPageBg, null, rectF, null); } else { canvas.drawColor(Color.WHITE); } // canvas.drawText(chaptersList.get(currentChapter - 1).title, marginWidth, y, mTitlePaint); y += mLineSpace + mNumFontSize; // ? for (String line : mLines) { y += mLineSpace; if (line.endsWith("@")) { canvas.drawText(line.substring(0, line.length() - 1), marginWidth, y, mPaint); y += mLineSpace; } else { canvas.drawText(line, marginWidth, y, mPaint); } y += mFontSize; } // ?? if (batteryBitmap != null) { canvas.drawBitmap(batteryBitmap, marginWidth + 2, mHeight - marginHeight - DimensUtil.dp2px(mContext, 12), mTitlePaint); } float percent = (float) currentChapter * 100 / chapterSize; canvas.drawText(decimalFormat.format(percent) + "%", (mWidth - percentLen) / 2, mHeight - marginHeight, mTitlePaint); String mTime = dateFormat.format(new Date()); canvas.drawText(mTime, mWidth - marginWidth - timeLen, mHeight - marginHeight, mTitlePaint); // ? SettingManager.getInstance().saveReadProgress(bookId, currentChapter, curBeginPos, curEndPos); } }
From source file:net.networksaremadeofstring.rhybudd.ZenossWidgetGraph.java
private Bitmap RenderBarGraph(int CritCount, int ErrCount, int WarnCount) { //Log.i("Counts", Integer.toString(CritCount) + " / " + Integer.toString(ErrCount) + " / " + Integer.toString(WarnCount)); Bitmap emptyBmap = Bitmap.createBitmap(290, 150, Config.ARGB_8888); int width = emptyBmap.getWidth(); int height = emptyBmap.getHeight(); Bitmap charty = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(charty); //final int color = 0xff0B0B61; final Paint paint = new Paint(); paint.setStyle(Paint.Style.FILL); paint.setColor(Color.WHITE); //y/*from ww w . j a va 2 s .c o m*/ canvas.drawLine(25, 0, 25, 289, paint); //x canvas.drawLine(25, 149, 289, 149, paint); paint.setAntiAlias(true); int Max = 0; if (CritCount > ErrCount && CritCount > WarnCount) Max = CritCount; else if (ErrCount > CritCount && ErrCount > WarnCount) Max = ErrCount; else if (WarnCount > CritCount && WarnCount > ErrCount) Max = WarnCount; else Max = CritCount; if (Max > 0) canvas.drawText(Integer.toString(Max), 0, 10, paint); if (Max > 1) canvas.drawText(Integer.toString(Max / 2), 0, 75, paint); canvas.drawText("0", 0, 148, paint); double divisor = 148 / (double) Max; paint.setAlpha(128); Rect rect = new Rect(32, (int) (148 - (divisor * CritCount)), 64, 148); paint.setColor(Color.argb(200, 208, 0, 0)); //red if (CritCount > 0) canvas.drawRect(new RectF(rect), paint); rect = new Rect(128, (int) (148 - (divisor * ErrCount)), 160, 148); paint.setColor(Color.argb(200, 255, 102, 0));//orange if (ErrCount > 0) canvas.drawRect(new RectF(rect), paint); rect = new Rect(224, (int) (148 - (divisor * WarnCount)), 256, 148); paint.setColor(Color.argb(200, 255, 224, 57)); //yellow if (WarnCount > 0) canvas.drawRect(new RectF(rect), paint); //Return ByteArrayOutputStream out = new ByteArrayOutputStream(); charty.compress(CompressFormat.PNG, 50, out); return BitmapFactory.decodeByteArray(out.toByteArray(), 0, out.size()); }
From source file:com.dazone.crewchat.libGallery.activity.HomeFragmentActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_home_media_chooser); headerBarTitle = (TextView) findViewById(R.id.titleTextViewFromMediaChooserHeaderBar); headerBarCamera = (ImageView) findViewById(R.id.cameraImageViewFromMediaChooserHeaderBar); headerBarBack = (ImageView) findViewById(R.id.backArrowImageViewFromMediaChooserHeaderView); headerBarDone = (TextView) findViewById(R.id.doneTextViewViewFromMediaChooserHeaderView); mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost); mTabHost.setup(this, getSupportFragmentManager(), R.id.realTabcontent); headerBarBack.setOnClickListener(this); headerBarCamera.setOnClickListener(this); headerBarDone.setOnClickListener(this); if (!MediaChooserConstants.showCameraVideo) { headerBarCamera.setVisibility(View.GONE); }/*from w w w . j a v a2 s . com*/ if (getIntent() != null && (getIntent().getBooleanExtra("isFromBucket", false))) { if (getIntent().getBooleanExtra("image", false)) { headerBarTitle.setText(getResources().getString(R.string.image)); setHeaderBarCameraBackground(getResources().getDrawable(R.drawable.selector_camera_button)); headerBarCamera.setTag(getResources().getString(R.string.image)); Bundle bundle = new Bundle(); bundle.putString("name", getIntent().getStringExtra("name")); mTabHost.addTab( mTabHost.newTabSpec("tab1") .setIndicator(getResources().getString(R.string.images_tab) + " "), ImageFragment.class, bundle); } else { headerBarTitle.setText(getResources().getString(R.string.video)); setHeaderBarCameraBackground(getResources().getDrawable(R.drawable.selector_video_button)); headerBarCamera.setTag(getResources().getString(R.string.video)); Bundle bundle = new Bundle(); bundle.putString("name", getIntent().getStringExtra("name")); mTabHost.addTab( mTabHost.newTabSpec("tab2") .setIndicator(getResources().getString(R.string.videos_tab) + " "), VideoFragment.class, bundle); } } else { if (MediaChooserConstants.showVideo) { mTabHost.addTab( mTabHost.newTabSpec("tab2") .setIndicator(getResources().getString(R.string.videos_tab) + " "), VideoFragment.class, null); } if (MediaChooserConstants.showImage) { headerBarTitle.setText(getResources().getString(R.string.image)); setHeaderBarCameraBackground(getResources().getDrawable(R.drawable.selector_camera_button)); headerBarCamera.setTag(getResources().getString(R.string.image)); mTabHost.addTab( mTabHost.newTabSpec("tab1") .setIndicator(getResources().getString(R.string.images_tab) + " "), ImageFragment.class, null); } if (MediaChooserConstants.showVideo) { headerBarTitle.setText(getResources().getString(R.string.video)); setHeaderBarCameraBackground(getResources().getDrawable(R.drawable.selector_video_button)); headerBarCamera.setTag(getResources().getString(R.string.video)); } } mTabHost.getTabWidget().getChildAt(0).setVisibility(View.GONE); for (int i = 0; i < mTabHost.getTabWidget().getChildCount(); i++) { TextView textView = (TextView) mTabHost.getTabWidget().getChildAt(i).findViewById(android.R.id.title); if (textView.getLayoutParams() instanceof RelativeLayout.LayoutParams) { RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) textView.getLayoutParams(); params.addRule(RelativeLayout.CENTER_HORIZONTAL); params.addRule(RelativeLayout.CENTER_VERTICAL); params.height = RelativeLayout.LayoutParams.MATCH_PARENT; params.width = RelativeLayout.LayoutParams.WRAP_CONTENT; textView.setLayoutParams(params); } else if (textView.getLayoutParams() instanceof LinearLayout.LayoutParams) { LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) textView.getLayoutParams(); params.gravity = Gravity.CENTER; textView.setLayoutParams(params); } textView.setTextColor(getResources().getColor(R.color.tabs_title_color)); textView.setTextSize(Utils.convertDipToPixels(this, 10)); } if ((mTabHost.getTabWidget().getChildAt(0) != null)) { ((TextView) (mTabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.title))) .setTextColor(Color.WHITE); } if ((mTabHost.getTabWidget().getChildAt(1) != null)) { ((TextView) (mTabHost.getTabWidget().getChildAt(1).findViewById(android.R.id.title))) .setTextColor(getResources().getColor(R.color.headerbar_selected_tab_color)); } mTabHost.setOnTabChangedListener(new OnTabChangeListener() { @Override public void onTabChanged(String tabId) { android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager(); ImageFragment imageFragment = (ImageFragment) fragmentManager.findFragmentByTag("tab1"); VideoFragment videoFragment = (VideoFragment) fragmentManager.findFragmentByTag("tab2"); android.support.v4.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); if (tabId.equalsIgnoreCase("tab1")) { headerBarTitle.setText(getResources().getString(R.string.image)); setHeaderBarCameraBackground(getResources().getDrawable(R.drawable.selector_camera_button)); headerBarCamera.setTag(getResources().getString(R.string.image)); if (imageFragment != null) { if (videoFragment != null) { fragmentTransaction.hide(videoFragment); } fragmentTransaction.show(imageFragment); } ((TextView) (mTabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.title))) .setTextColor(getResources().getColor(R.color.headerbar_selected_tab_color)); ((TextView) (mTabHost.getTabWidget().getChildAt(1).findViewById(android.R.id.title))) .setTextColor(Color.WHITE); } else { headerBarTitle.setText(getResources().getString(R.string.video)); setHeaderBarCameraBackground(getResources().getDrawable(R.drawable.selector_video_button)); headerBarCamera.setTag(getResources().getString(R.string.video)); if (videoFragment != null) { if (imageFragment != null) { fragmentTransaction.hide(imageFragment); } fragmentTransaction.show(videoFragment); if (videoFragment.getAdapter() != null) { videoFragment.getAdapter().notifyDataSetChanged(); } } ((TextView) (mTabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.title))) .setTextColor(Color.WHITE); ((TextView) (mTabHost.getTabWidget().getChildAt(1).findViewById(android.R.id.title))) .setTextColor(getResources().getColor(R.color.headerbar_selected_tab_color)); } fragmentTransaction.commit(); } }); RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) headerBarCamera.getLayoutParams(); params.height = Utils.convertDipToPixels(this, 40); params.width = Utils.convertDipToPixels(this, 40); headerBarCamera.setLayoutParams(params); headerBarCamera.setScaleType(ScaleType.CENTER_INSIDE); headerBarCamera.setPadding(Utils.convertDipToPixels(this, 15), Utils.convertDipToPixels(this, 15), Utils.convertDipToPixels(this, 15), Utils.convertDipToPixels(this, 15)); }
From source file:com.hxsn.witwork.ui.ViewfinderView.java
@Override public void onDraw(Canvas canvas) { // ??????CameraManager? if (CameraManager.get() == null) { return;// ww w . j a v a2 s. c o m } Rect frame = CameraManager.get().getFramingRect(); if (frame == null) { return; } // ? if (!isFirst) { isFirst = true; slideTop = frame.top; slideBottom = frame.bottom; } // ?? int width = canvas.getWidth(); int height = canvas.getHeight(); paint.setColor(resultBitmap != null ? resultColor : maskColor); // ????????????? // ????????? canvas.drawRect(0, 0, width, frame.top + 15, paint); canvas.drawRect(0, frame.top + 15, frame.left + 15, frame.bottom - 14, paint); canvas.drawRect(frame.right - 14, frame.top + 15, width, frame.bottom - 14, paint); canvas.drawRect(0, frame.bottom - 14, width, height, paint); if (resultBitmap != null) { // Draw the opaque result bitmap over the scanning rectangle paint.setAlpha(OPAQUE); canvas.drawBitmap(resultBitmap, frame.left, frame.top, paint); } else { // ??8 paint.setColor(Color.rgb(139, 193, 17)); canvas.drawRect(frame.left, frame.top, frame.left + ScreenRate, frame.top + CORNER_WIDTH, paint); canvas.drawRect(frame.left, frame.top, frame.left + CORNER_WIDTH, frame.top + ScreenRate, paint); canvas.drawRect(frame.right - ScreenRate, frame.top, frame.right, frame.top + CORNER_WIDTH, paint); canvas.drawRect(frame.right - CORNER_WIDTH, frame.top, frame.right, frame.top + ScreenRate, paint); canvas.drawRect(frame.left, frame.bottom - CORNER_WIDTH, frame.left + ScreenRate, frame.bottom, paint); canvas.drawRect(frame.left, frame.bottom - ScreenRate, frame.left + CORNER_WIDTH, frame.bottom, paint); canvas.drawRect(frame.right - ScreenRate, frame.bottom - CORNER_WIDTH, frame.right, frame.bottom, paint); canvas.drawRect(frame.right - CORNER_WIDTH, frame.bottom - ScreenRate, frame.right, frame.bottom, paint); // ,??SPEEN_DISTANCE slideTop += SPEEN_DISTANCE; if (slideTop >= frame.bottom) { slideTop = frame.top; } // canvas.drawRect(frame.left + MIDDLE_LINE_PADDING, slideTop - // MIDDLE_LINE_WIDTH/2, frame.right - MIDDLE_LINE_PADDING,slideTop + // MIDDLE_LINE_WIDTH/2, paint); Rect lineRect = new Rect(); lineRect.left = frame.left; lineRect.right = frame.right; lineRect.top = slideTop; lineRect.bottom = slideTop + 18; canvas.drawBitmap(((BitmapDrawable) (getResources().getDrawable(R.drawable.fgx))).getBitmap(), null, lineRect, paint); // ??? paint.setColor(Color.WHITE); paint.setTextSize(TEXT_SIZE * density); // paint.setAlpha(0x40); // paint.setTypeface(Typeface.create("System", Typeface.BOLD)); canvas.drawText("?/??????", frame.left, (float) (frame.bottom + (float) TEXT_PADDING_TOP * density), paint); canvas.drawText("??" + num + "", frame.left, (float) (frame.bottom + (float) TEXT_PADDING_TOP * density + 50), paint); int max = 7; if (name.size() < max) { max = name.size(); for (int i = 0; i < max; i++) { canvas.drawText(name.get(i), frame.left, (float) (frame.bottom + (float) TEXT_PADDING_TOP * density + 100 + 50 * i), paint); } } else { for (int i = 6; i >= 0; i--) { canvas.drawText(name.get((name.size() - 1) - (6 - i)), frame.left, (float) (frame.bottom + (float) TEXT_PADDING_TOP * density + 100 + 50 * i), paint); } } paint.setStyle(Style.STROKE); canvas.drawRect(frame.left + 15, frame.top + 15, frame.right - 15, frame.bottom - 15, paint); setViewY(frame.bottom); paint.setStyle(Style.FILL); Collection<ResultPoint> currentPossible = possibleResultPoints; Collection<ResultPoint> currentLast = lastPossibleResultPoints; if (currentPossible.isEmpty()) { lastPossibleResultPoints = null; } else { possibleResultPoints = new HashSet<ResultPoint>(5); lastPossibleResultPoints = currentPossible; paint.setAlpha(OPAQUE); paint.setColor(resultPointColor); for (ResultPoint point : currentPossible) { canvas.drawCircle(frame.left + point.getX(), frame.top + point.getY(), 6.0f, paint); } } if (currentLast != null) { paint.setAlpha(OPAQUE / 2); paint.setColor(resultPointColor); for (ResultPoint point : currentLast) { canvas.drawCircle(frame.left + point.getX(), frame.top + point.getY(), 3.0f, paint); } } // ???? postInvalidate(); // postInvalidateDelayed(ANIMATION_DELAY, frame.left, frame.top, // frame.right, frame.bottom); } }
From source file:com.cryart.sabbathschool.view.SSQuarterliesActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.ss_quarterlies_menu, menu); menu.getItem(0).setIcon(//from w w w . j av a 2s . c o m new IconicsDrawable(this).icon(GoogleMaterial.Icon.gmd_translate).color(Color.WHITE).sizeDp(18)); return true; }