List of usage examples for android.graphics Color DKGRAY
int DKGRAY
To view the source code for android.graphics Color DKGRAY.
Click Source Link
From source file:com.tevinjeffrey.njitct.ui.utils.TintImageView.java
private int fetchAccentColor() { int color = Color.DKGRAY; try {/*from w w w.j av a2 s. c o m*/ TypedValue typedValue = new TypedValue(); TypedArray a = getContext().obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); color = a.getColor(0, 0); a.recycle(); } catch (Resources.NotFoundException e) { e.printStackTrace(); } return color; }
From source file:com.odoo.addons.customers.CustomerDetails.java
private void setMode(Boolean edit) { if (mMenu != null) { mMenu.findItem(R.id.menu_customer_detail_more).setVisible(!edit); mMenu.findItem(R.id.menu_customer_edit).setVisible(!edit); mMenu.findItem(R.id.menu_customer_save).setVisible(edit); mMenu.findItem(R.id.menu_customer_cancel).setVisible(edit); }// w ww . j a v a 2s. c o m int color = Color.DKGRAY; if (record != null) { color = OStringColorUtil.getStringColor(this, record.getString("name")); } if (edit) { if (extras != null) actionBar.setTitle(R.string.label_edit); else actionBar.setTitle(R.string.label_new); actionBar.setBackgroundDrawable(new ColorDrawable(color)); mForm = (OForm) findViewById(R.id.customerFormEdit); captureImage = (ImageView) findViewById(R.id.captureImage); captureImage.setOnClickListener(this); userImage = (ImageView) findViewById(android.R.id.icon1); findViewById(R.id.parallaxScrollView).setVisibility(View.GONE); findViewById(R.id.customerScrollViewEdit).setVisibility(View.VISIBLE); OField is_company = (OField) findViewById(R.id.is_company_edit); is_company.setOnValueChangeListener(this); } else { actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.action_bar_shade)); userImage = (ImageView) findViewById(android.R.id.icon); mForm = (OForm) findViewById(R.id.customerForm); findViewById(R.id.customerScrollViewEdit).setVisibility(View.GONE); findViewById(R.id.parallaxScrollView).setVisibility(View.VISIBLE); } setColor(color); }
From source file:com.rks.musicx.ui.adapters.SongListAdapter.java
@Override public void onBindViewHolder(SongListAdapter.SongViewHolder holder, int position) { Song song = getItem(position);/*from w w w .j a v a 2 s . com*/ if (layout == R.layout.song_list) { holder.SongTitle.setText(song.getTitle()); holder.SongArtist.setText(song.getArtist()); ArtworkUtils.ArtworkLoader(getContext(), 300, 600, song.getAlbum(), song.getAlbumId(), new palette() { @Override public void palettework(Palette palette) { } }, holder.SongArtwork); holder.menu.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_menu)); Drawable drawable = holder.menu.getDrawable(); int accentColor = Config.accentColor(getContext(), Helper.getATEKey(getContext())); if (Extras.getInstance().getDarkTheme() || Extras.getInstance().getBlackTheme()) { drawable.setTint(Color.WHITE); holder.SongTitle.setTextColor(Color.WHITE); holder.SongArtist.setTextColor(ContextCompat.getColor(getContext(), R.color.darkthemeTextColor)); holder.itemView.setBackgroundColor(storeChecked.get(position) ? ContextCompat.getColor(getContext(), R.color.translucent_white_8p) : Color.TRANSPARENT); } else { drawable.setTint(ContextCompat.getColor(getContext(), R.color.MaterialGrey)); holder.SongTitle.setTextColor(Color.BLACK); holder.SongArtist.setTextColor(Color.DKGRAY); holder.itemView .setBackgroundColor(storeChecked.get(position) ? Helper.getColorWithAplha(accentColor, 0.7f) : Color.TRANSPARENT); } } if (layout == R.layout.detail_list) { holder.SongTitle.setText(song.getTitle()); holder.SongArtist.setText(song.getArtist()); holder.number.setText(position + 1 + "."); holder.menu.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_menu)); Drawable drawable = holder.menu.getDrawable(); if (Extras.getInstance().getDarkTheme() || Extras.getInstance().getBlackTheme()) { drawable.setTint(Color.WHITE); holder.SongTitle.setTextColor(Color.WHITE); holder.number.setTextColor(Color.WHITE); holder.SongArtist.setTextColor(ContextCompat.getColor(getContext(), R.color.darkthemeTextColor)); } else { drawable.setTint(ContextCompat.getColor(getContext(), R.color.MaterialGrey)); holder.SongTitle.setTextColor(Color.BLACK); holder.number.setTextColor(Color.BLACK); holder.SongArtist.setTextColor(Color.DKGRAY); } } if (layout == R.layout.item_grid_view || layout == R.layout.recent_list) { int pos = holder.getAdapterPosition(); if (lastpos < pos) { for (Animator animator : getAnimator(holder.songView)) { animator.setDuration(duration); animator.setInterpolator(interpolator); animator.start(); } } holder.SongTitle.setText(song.getTitle()); holder.SongArtist.setText(song.getArtist()); ArtworkUtils.ArtworkLoader(getContext(), 300, 600, song.getAlbum(), song.getAlbumId(), new palette() { @Override public void palettework(Palette palette) { final int[] colors = Helper.getAvailableColor(getContext(), palette); holder.songView.setBackgroundColor(colors[0]); holder.SongTitle.setTextColor(Helper.getTitleTextColor(colors[0])); holder.SongArtist.setTextColor(Helper.getTitleTextColor(colors[0])); Helper.animateViews(getContext(), holder.itemView, colors[0]); } }, holder.songGridArtwork); holder.menu.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_menu)); holder.menu.setVisibility(View.VISIBLE); Drawable drawable = holder.menu.getDrawable(); if (Extras.getInstance().getDarkTheme() || Extras.getInstance().getBlackTheme()) { drawable.setTint(Color.WHITE); } } }
From source file:us.phyxsi.gameshelf.ui.FeedAdapter.java
public FeedAdapter(Activity hostActivity, Context context, DataLoadingSubject dataLoading, int columns) { this.host = hostActivity; this.context = context; this.dataLoading = dataLoading; dataLoading.addCallbacks(this); this.columns = columns; layoutInflater = LayoutInflater.from(host); comparator = new BoardgameComparator(); items = new ArrayList<>(); setHasStableIds(true);//w w w . j av a 2 s. c o m TypedArray placeholderColors = hostActivity.getResources().obtainTypedArray(R.array.loading_placeholders); shotLoadingPlaceholders = new ColorDrawable[placeholderColors.length()]; for (int i = 0; i < placeholderColors.length(); i++) { shotLoadingPlaceholders[i] = new ColorDrawable(placeholderColors.getColor(i, Color.DKGRAY)); } }
From source file:com.hannesdorfmann.FeedAdapter.java
public FeedAdapter(Activity hostActivity, int columns, boolean pocketInstalled) { this.host = hostActivity; this.columns = columns; this.pocketIsInstalled = pocketInstalled; layoutInflater = LayoutInflater.from(host); comparator = new PlaidItemComparator(); items = new ArrayList<>(); setHasStableIds(true);/*w w w. jav a2s . c o m*/ TypedArray placeholderColors = hostActivity.getResources().obtainTypedArray(R.array.loading_placeholders); shotLoadingPlaceholders = new ColorDrawable[placeholderColors.length()]; for (int i = 0; i < placeholderColors.length(); i++) { shotLoadingPlaceholders[i] = new ColorDrawable(placeholderColors.getColor(i, Color.DKGRAY)); } }
From source file:org.smap.smapTask.android.activities.MainTabsActivity.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // must be at the beginning of any activity that can be called from an external intent try {//w w w . j a v a 2 s . co m Collect.createODKDirs(); } catch (RuntimeException e) { createErrorDialog(e.getMessage(), true); return; } setContentView(R.layout.main_tabs); Resources res = getResources(); // Resource object to get Drawables TabHost tabHost = getTabHost(); // The activity TabHost TabHost.TabSpec spec; Intent intent; tabHost.setBackgroundColor(Color.WHITE); tabHost.getTabWidget().setBackgroundColor(Color.DKGRAY); // Initialise a TabSpec and intent for each tab and add it to the TabHost intent = new Intent().setClass(this, MainListActivity.class); spec = tabHost.newTabSpec("taskList").setIndicator(getString(R.string.smap_taskList)).setContent(intent); tabHost.addTab(spec); /* * Initialise a Map tab */ Log.i("trial", "Creating Maps Activity"); intent = new Intent().setClass(this, MapsActivity.class); spec = tabHost.newTabSpec("taskMap").setIndicator(getString(R.string.smap_taskMap)).setContent(intent); tabHost.addTab(spec); // hack to set font size LinearLayout ll = (LinearLayout) tabHost.getChildAt(0); TabWidget tw = (TabWidget) ll.getChildAt(0); int fontsize = Collect.getQuestionFontsize(); ViewGroup rllf = (ViewGroup) tw.getChildAt(0); mTVFF = getTextViewChild(rllf); if (mTVFF != null) { mTVFF.setTextSize(fontsize); mTVFF.setTextColor(Color.WHITE); mTVFF.setPadding(0, 0, 0, 6); } ViewGroup rlrf = (ViewGroup) tw.getChildAt(1); mTVDF = getTextViewChild(rlrf); if (mTVDF != null) { mTVDF.setTextSize(fontsize); mTVDF.setTextColor(Color.WHITE); mTVDF.setPadding(0, 0, 0, 6); } }
From source file:io.plaidapp.ui.FeedAdapter.java
public FeedAdapter(Activity hostActivity, DataLoadingSubject dataLoading, int columns, boolean pocketInstalled) { this.host = hostActivity; this.dataLoading = dataLoading; this.columns = columns; this.pocketIsInstalled = pocketInstalled; layoutInflater = LayoutInflater.from(host); comparator = new PlaidItemComparator(); items = new ArrayList<>(); setHasStableIds(true);/* w w w. j av a 2 s .co m*/ TypedArray placeholderColors = hostActivity.getResources().obtainTypedArray(R.array.loading_placeholders); shotLoadingPlaceholders = new ColorDrawable[placeholderColors.length()]; for (int i = 0; i < placeholderColors.length(); i++) { shotLoadingPlaceholders[i] = new ColorDrawable(placeholderColors.getColor(i, Color.DKGRAY)); } }
From source file:es.pentalo.apps.RBPiCameraControl.MainActivity.java
private void initApp() { ViewPager viewPager = (ViewPager) findViewById(R.id.pager); PagerTabStrip pagerTabStrip = (PagerTabStrip) findViewById(R.id.pager_tab_strip); DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); float scaleFactor = metrics.density; int widthInPixels = metrics.widthPixels; int heightInPixels = metrics.heightPixels; float widthDp = widthInPixels / scaleFactor; float heightDp = heightInPixels / scaleFactor; float smallestWidth = Math.min(widthDp, heightDp); if (smallestWidth < 600) { MyFragmentPagerAdapterMobile fragmentPagerAdapter = new MyFragmentPagerAdapterMobile( getFragmentManager());/* w w w. j a va 2s . c om*/ viewPager.setAdapter(fragmentPagerAdapter); viewPager.setOffscreenPageLimit(5); pagerTabStrip.setDrawFullUnderline(true); pagerTabStrip.setTabIndicatorColor(Color.DKGRAY); } else { MyFragmentPagerAdapter fragmentPagerAdapter = new MyFragmentPagerAdapter(getFragmentManager()); viewPager.setAdapter(fragmentPagerAdapter); viewPager.setOffscreenPageLimit(5); pagerTabStrip.setDrawFullUnderline(true); pagerTabStrip.setTabIndicatorColor(Color.DKGRAY); } }
From source file:org.cvasilak.jboss.mobile.admin.fragments.RuntimeViewFragment.java
private void buildTable() { Map<String, List<String>> table = new HashMap<String, List<String>>(); table.put("Server Status", Arrays.asList("Configuration", "JVM")); table.put("Subsystem Metrics", Arrays.asList("Data Sources", "JMS Destinations", "Transactions", "Web")); if (application.getOperationsManager().isDomainController()) { table.put("Deployments", Arrays.asList("Deployment Content", "Server Groups")); } else {//from ww w .j a v a 2s. c o m table.put("Deployments", Arrays.asList("Manage Deployments")); } MergeAdapter adapter = new MergeAdapter(); for (Map.Entry<String, List<String>> entry : table.entrySet()) { // add section header TextView section = new TextView(getActivity()); section.setBackgroundColor(Color.DKGRAY); section.setPadding(15, 10, 0, 10); section.setText(entry.getKey()); adapter.addView(section); // add section data adapter.addAdapter( new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, entry.getValue())); } setListAdapter(adapter); }
From source file:com.rks.musicx.ui.adapters.QueueAdapter.java
@Override public void onBindViewHolder(QueueViewHolder holder, int position) { Song song = getItem(position);/*from www. j ava 2s . c o m*/ int accentColor = Config.accentColor(getContext(), Helper.getATEKey(getContext())); if (mLayoutId == R.layout.song_list) { if (position == pos) { holder.itemView.setSelected(true); highLight(holder, accentColor, accentColor); } else { holder.itemView.setSelected(false); highLight(holder, Color.WHITE, Color.BLACK); } holder.SongTitle.setText(song.getTitle()); holder.SongArtist.setText(song.getArtist()); ArtworkUtils.ArtworkLoader(getContext(), 300, 600, song.getAlbum(), song.getAlbumId(), new palette() { @Override public void palettework(Palette palette) { } }, holder.queueArtwork); holder.menu.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_menu)); holder.queueArtwork.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (MotionEventCompat.getActionMasked(event) == MotionEvent.ACTION_DOWN) { mDragStartListener.onStartDrag(holder); } return false; } }); if (Extras.getInstance().getDarkTheme() || Extras.getInstance().getBlackTheme()) { holder.SongArtist.setTextColor(ContextCompat.getColor(getContext(), R.color.darkthemeTextColor)); holder.menu.getDrawable().setTint(Color.WHITE); } else { holder.menu.getDrawable().setTint(Color.WHITE); holder.SongArtist.setTextColor(Color.WHITE); if (Extras.getInstance().getPlayingViewTrack()) { holder.menu.getDrawable().setTint(ContextCompat.getColor(getContext(), R.color.MaterialGrey)); holder.SongArtist.setTextColor(Color.DKGRAY); } } } if (mLayoutId == R.layout.gridqueue) { ArtworkUtils.ArtworkLoader(getContext(), 300, 600, song.getAlbum(), song.getAlbumId(), new palette() { @Override public void palettework(Palette palette) { } }, holder.queueArtworkgrid); } }