Java Code Examples for com.kabouzeid.appthemehelper.ThemeStore#textColorPrimary()

The following examples show how to use com.kabouzeid.appthemehelper.ThemeStore#textColorPrimary() . 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 vote down vote up
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: BreadCrumbLayout.java    From Orin with GNU General Public License v3.0 5 votes vote down vote up
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 3
Source File: BreadCrumbLayout.java    From RetroMusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
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: BreadCrumbLayout.java    From VinylMusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
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 5
Source File: BreadCrumbLayout.java    From Phonograph with GNU General Public License v3.0 5 votes vote down vote up
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: DonationsDialog.java    From Phonograph with GNU General Public License v3.0 5 votes vote down vote up
@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;
}