Java Code Examples for com.kabouzeid.appthemehelper.ThemeStore#textColorSecondary()
The following examples show how to use
com.kabouzeid.appthemehelper.ThemeStore#textColorSecondary() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BreadCrumbLayout.java From Music-Player with GNU General Public License v3.0 | 5 votes |
private void init() { contentColorActivated = ThemeStore.textColorPrimary(getContext()); contentColorDeactivated = ThemeStore.textColorSecondary(getContext()); setMinimumHeight((int) getResources().getDimension(R.dimen.tab_height)); setClipToPadding(false); setHorizontalScrollBarEnabled(false); mCrumbs = new ArrayList<>(); mHistory = new ArrayList<>(); mChildFrame = new LinearLayout(getContext()); addView(mChildFrame, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); }
Example 2
Source File: PlaylistSongAdapter.java From Music-Player with GNU General Public License v3.0 | 5 votes |
@Override public void onBindViewHolder(@NonNull final SongAdapter.ViewHolder holder, int position) { if (holder.getItemViewType() == OFFSET_ITEM) { int textColor = ThemeStore.textColorSecondary(activity); if (holder.title != null) { holder.title.setText(MusicUtil.getPlaylistInfoString(activity, dataSet)); holder.title.setTextColor(textColor); } if (holder.text != null) { holder.text.setVisibility(View.GONE); } if (holder.menu != null) { holder.menu.setVisibility(View.GONE); } if (holder.image != null) { final int padding = activity.getResources().getDimensionPixelSize(R.dimen.default_item_margin) / 2; holder.image.setPadding(padding, padding, padding, padding); holder.image.setColorFilter(textColor); holder.image.setImageResource(R.drawable.ic_timer_white_24dp); } if (holder.dragView != null) { holder.dragView.setVisibility(View.GONE); } if (holder.separator != null) { holder.separator.setVisibility(View.VISIBLE); } if (holder.shortSeparator != null) { holder.shortSeparator.setVisibility(View.GONE); } } else { super.onBindViewHolder(holder, position - 1); } }
Example 3
Source File: BreadCrumbLayout.java From Orin with GNU General Public License v3.0 | 5 votes |
private void init() { contentColorActivated = ThemeStore.textColorPrimary(getContext()); contentColorDeactivated = ThemeStore.textColorSecondary(getContext()); setMinimumHeight((int) getResources().getDimension(R.dimen.tab_height)); setClipToPadding(false); setHorizontalScrollBarEnabled(false); mCrumbs = new ArrayList<>(); mHistory = new ArrayList<>(); mChildFrame = new LinearLayout(getContext()); addView(mChildFrame, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); }
Example 4
Source File: ShuffleButtonSongAdapter.java From Orin with GNU General Public License v3.0 | 5 votes |
@Override public void onBindViewHolder(@NonNull final SongAdapter.ViewHolder holder, int position) { if (holder.getItemViewType() == SHUFFLE_BUTTON) { int accentColor = ThemeStore.textColorSecondary(activity); if (holder.title != null) { holder.title.setText(activity.getResources().getString(R.string.action_shuffle_all).toUpperCase()); holder.title.setTextColor(accentColor); holder.title.setTypeface(Typeface.create("sans-serif-medium", Typeface.NORMAL)); } if (holder.text != null) { holder.text.setVisibility(View.GONE); } if (holder.menu != null) { holder.menu.setVisibility(View.GONE); } if (holder.image != null) { final int padding = activity.getResources().getDimensionPixelSize(R.dimen.default_item_margin) / 2; holder.image.setPadding(padding, padding, padding, padding); holder.image.setColorFilter(accentColor); holder.image.setImageResource(R.drawable.ic_shuffle_white_24dp); } if (holder.separator != null) { holder.separator.setVisibility(View.VISIBLE); } if (holder.shortSeparator != null) { holder.shortSeparator.setVisibility(View.GONE); } } else { super.onBindViewHolder(holder, position - 1); } }
Example 5
Source File: BreadCrumbLayout.java From RetroMusicPlayer with GNU General Public License v3.0 | 5 votes |
private void init() { contentColorActivated = ThemeStore.textColorPrimary(getContext()); contentColorDeactivated = ThemeStore.textColorSecondary(getContext()); setMinimumHeight((int) getResources().getDimension(R.dimen.tab_height)); setClipToPadding(false); setHorizontalScrollBarEnabled(false); mCrumbs = new ArrayList<>(); mHistory = new ArrayList<>(); mChildFrame = new LinearLayout(getContext()); addView(mChildFrame, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); }
Example 6
Source File: PlaylistSongAdapter.java From RetroMusicPlayer with GNU General Public License v3.0 | 5 votes |
@Override public void onBindViewHolder(@NonNull final SongAdapter.ViewHolder holder, int position) { if (holder.getItemViewType() == OFFSET_ITEM) { int textColor = ThemeStore.textColorSecondary(activity); if (holder.title != null) { holder.title.setText(MusicUtil.getPlaylistInfoString(activity, dataSet)); holder.title.setTextColor(textColor); } if (holder.text != null) { holder.text.setVisibility(View.GONE); } if (holder.menu != null) { holder.menu.setVisibility(View.GONE); } if (holder.image != null) { final int padding = activity.getResources().getDimensionPixelSize(R.dimen.default_item_margin) / 2; holder.image.setPadding(padding, padding, padding, padding); holder.image.setColorFilter(textColor); holder.image.setImageResource(R.drawable.ic_timer_white_24dp); } if (holder.dragView != null) { holder.dragView.setVisibility(View.GONE); } if (holder.separator != null) { holder.separator.setVisibility(View.VISIBLE); } if (holder.shortSeparator != null) { holder.shortSeparator.setVisibility(View.GONE); } } else { super.onBindViewHolder(holder, position - 1); } }
Example 7
Source File: BreadCrumbLayout.java From VinylMusicPlayer with GNU General Public License v3.0 | 5 votes |
private void init() { contentColorActivated = ThemeStore.textColorPrimary(getContext()); contentColorDeactivated = ThemeStore.textColorSecondary(getContext()); setMinimumHeight((int) getResources().getDimension(R.dimen.tab_height)); setClipToPadding(false); setHorizontalScrollBarEnabled(false); mCrumbs = new ArrayList<>(); mHistory = new ArrayList<>(); mChildFrame = new LinearLayout(getContext()); addView(mChildFrame, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); }
Example 8
Source File: PlaylistSongAdapter.java From VinylMusicPlayer with GNU General Public License v3.0 | 5 votes |
@Override public void onBindViewHolder(@NonNull final SongAdapter.ViewHolder holder, int position) { if (holder.getItemViewType() == OFFSET_ITEM) { int textColor = ThemeStore.textColorSecondary(activity); if (holder.title != null) { holder.title.setText(MusicUtil.getPlaylistInfoString(activity, dataSet)); holder.title.setTextColor(textColor); } if (holder.text != null) { holder.text.setVisibility(View.GONE); } if (holder.menu != null) { holder.menu.setVisibility(View.GONE); } if (holder.image != null) { final int padding = activity.getResources().getDimensionPixelSize(R.dimen.default_item_margin) / 2; holder.image.setPadding(padding, padding, padding, padding); holder.image.setColorFilter(textColor); holder.image.setImageResource(R.drawable.ic_timer_white_24dp); } if (holder.dragView != null) { holder.dragView.setVisibility(View.GONE); } if (holder.separator != null) { holder.separator.setVisibility(View.VISIBLE); } if (holder.shortSeparator != null) { holder.shortSeparator.setVisibility(View.GONE); } } else { super.onBindViewHolder(holder, position - 1); } }
Example 9
Source File: BreadCrumbLayout.java From Phonograph with GNU General Public License v3.0 | 5 votes |
private void init() { contentColorActivated = ThemeStore.textColorPrimary(getContext()); contentColorDeactivated = ThemeStore.textColorSecondary(getContext()); setMinimumHeight((int) getResources().getDimension(R.dimen.tab_height)); setClipToPadding(false); setHorizontalScrollBarEnabled(false); mCrumbs = new ArrayList<>(); mHistory = new ArrayList<>(); mChildFrame = new LinearLayout(getContext()); addView(mChildFrame, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); }
Example 10
Source File: DonationsDialog.java From Phonograph with GNU General Public License v3.0 | 5 votes |
@Override @NonNull public View getView(final int position, View convertView, @NonNull ViewGroup parent) { if (convertView == null) { convertView = LayoutInflater.from(getContext()).inflate(LAYOUT_RES_ID, parent, false); } SkuDetails skuDetails = getItem(position); ViewHolder viewHolder = new ViewHolder(convertView); viewHolder.title.setText(skuDetails.title.replace("(Phonograph Music Player)", "").trim()); viewHolder.text.setText(skuDetails.description); viewHolder.price.setText(skuDetails.priceText); final boolean purchased = donationsDialog.billingProcessor.isPurchased(skuDetails.productId); int titleTextColor = purchased ? ATHUtil.resolveColor(getContext(), android.R.attr.textColorHint) : ThemeStore.textColorPrimary(getContext()); int contentTextColor = purchased ? titleTextColor : ThemeStore.textColorSecondary(getContext()); //noinspection ResourceAsColor viewHolder.title.setTextColor(titleTextColor); //noinspection ResourceAsColor viewHolder.text.setTextColor(contentTextColor); //noinspection ResourceAsColor viewHolder.price.setTextColor(titleTextColor); strikeThrough(viewHolder.title, purchased); strikeThrough(viewHolder.text, purchased); strikeThrough(viewHolder.price, purchased); convertView.setOnTouchListener((v, event) -> purchased); convertView.setOnClickListener(v -> donationsDialog.donate(position)); return convertView; }
Example 11
Source File: PlaylistSongAdapter.java From Phonograph with GNU General Public License v3.0 | 5 votes |
@Override public void onBindViewHolder(@NonNull final SongAdapter.ViewHolder holder, int position) { if (holder.getItemViewType() == OFFSET_ITEM) { int textColor = ThemeStore.textColorSecondary(activity); if (holder.title != null) { holder.title.setText(MusicUtil.getPlaylistInfoString(activity, dataSet)); holder.title.setTextColor(textColor); } if (holder.text != null) { holder.text.setVisibility(View.GONE); } if (holder.menu != null) { holder.menu.setVisibility(View.GONE); } if (holder.image != null) { final int padding = activity.getResources().getDimensionPixelSize(R.dimen.default_item_margin) / 2; holder.image.setPadding(padding, padding, padding, padding); holder.image.setColorFilter(textColor); holder.image.setImageResource(R.drawable.ic_timer_white_24dp); } if (holder.dragView != null) { holder.dragView.setVisibility(View.GONE); } if (holder.separator != null) { holder.separator.setVisibility(View.VISIBLE); } if (holder.shortSeparator != null) { holder.shortSeparator.setVisibility(View.GONE); } } else { super.onBindViewHolder(holder, position - 1); } }