<commit_before>package com.sotwtm.support.util

import android.content.Context
import android.support.annotation.IntDef
import android.support.design.widget.Snackbar
import android.support.v4.content.ContextCompat
import android.view.View
import android.widget.TextView
import com.sotwtm.support.R


/**
 * Util for [Snackbar] creation
 * @author John
 */

object SnackbarUtil {

    @IntDef(Snackbar.LENGTH_INDEFINITE.toLong(), Snackbar.LENGTH_SHORT.toLong(), Snackbar.LENGTH_LONG.toLong())
    @Retention(AnnotationRetention.SOURCE)
    annotation class SnackbarDuration

    fun create(context: Context,
               rootView: View,
               message: String,
               @SnackbarDuration duration: Int): Snackbar {

        val snackbar = Snackbar.make(rootView, message, duration)
                .setActionTextColor(ContextCompat.getColor(context, R.color.snackbar_action_text))

        val view = snackbar.view<commit_msg>Fixed build error<commit_after>package com.sotwtm.support.util

import android.content.Context
import android.support.annotation.IntDef
import android.support.design.widget.Snackbar
import android.support.v4.content.ContextCompat
import android.view.View
import android.widget.TextView
import com.sotwtm.support.R


/**
 * Util for [Snackbar] creation
 * @author John
 */

object SnackbarUtil {

    @IntDef(Snackbar.LENGTH_INDEFINITE, Snackbar.LENGTH_SHORT, Snackbar.LENGTH_LONG)
    @Retention(AnnotationRetention.SOURCE)
    annotation class SnackbarDuration

    fun create(context: Context,
               rootView: View,
               message: String,
               @SnackbarDuration duration: Int): Snackbar {

        val snackbar = Snackbar.make(rootView, message, duration)
                .setActionTextColor(ContextCompat.getColor(context, R.color.snackbar_action_text))

        val view = snackbar.view
{'fraction_non_alphanumeric': 0.08875739644970414, 'fraction_numerical': 0.0010758472296933835, 'mean_word_length': 3.626865671641791, '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': '18367', 'n_tokens_mistral': 558, 'n_tokens_neox': 535, 'n_words': 105}