<commit_before>package com.navigation.reactnative;

import android.content.Context;
import android.content.res.TypedArray;

import com.google.android.material.tabs.TabLayout;

public class TabLayoutView extends TabLayout {
    int defaultTextColor;
    int defaultTabIndicatorColor;
    int selectedTintColor;
    int unselectedTintColor;

    public TabLayoutView(Context context) {
        super(context);
        selectedTintColor = unselectedTintColor = defaultTextColor = getTabTextColors().getDefaultColor();
        TypedArray styledAttributes = context.obtainStyledAttributes(null, R.styleable.TabLayout, 0, R.style.Widget_Design_TabLayout);
        defaultTabIndicatorColor = styledAttributes.getColor(R.styleable.TabLayout_tabIndicatorColor, 0);
    }

    void redraw() {
        post(measureAndLayout);
    }

    private final Runnable measureAndLayout = new Runnable() {
        @Override
        public void run() {
            measure(
                MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.EXACTLY),
                MeasureSpec.makeMeasureSpec(getHeight(), MeasureSpec.EXACTLY));
            layout(getLeft(), getTop(), getRight(), getBottom());
        }
    };
}
<commit_msg>Made style attr access consistent<commit_after>package com.navigation.reactnative;

import android.content.Context;
import android.content.res.TypedArray;

import com.google.android.material.tabs.TabLayout;

public class TabLayoutView extends TabLayout {
    int defaultTextColor;
    int defaultTabIndicatorColor;
    int selectedTintColor;
    int unselectedTintColor;

    public TabLayoutView(Context context) {
        super(context);
        selectedTintColor = unselectedTintColor = defaultTextColor = getTabTextColors().getDefaultColor();
        TypedArray layoutStyle = context.getTheme().obtainStyledAttributes(R.styleable.TabLayout);
        defaultTabIndicatorColor = layoutStyle.getColor(R.styleable.TabLayout_tabIndicatorColor, 0);
        layoutStyle.recycle();
    }

    void redraw() {
        post(measureAndLayout);
    }

    private final Runnable measureAndLayout = new Runnable() {
        @Override
        public void run() {
            measure(
                MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.EXACTLY),
                MeasureSpec.makeMeasureSpec(getHeight(), MeasureSpec.EXACTLY));
            layout(getLeft(), getTop(), getRight(), getBottom());
        }
    };
}

{'fraction_non_alphanumeric': 0.0924092409240924, 'fraction_numerical': 0.0012376237623762376, 'mean_word_length': 3.44954128440367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '381853', 'n_tokens_mistral': 663, 'n_tokens_neox': 646, 'n_words': 122}