<commit_before>package de.christinecoenen.code.zapp.fragments;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

import butterknife.BindView;
import butterknife.ButterKnife;
import de.christinecoenen.code.zapp.R;
import de.christinecoenen.code.zapp.model.ChannelModel;

public class StreamPageFragment extends Fragment {

	private static final String TAG = StreamPageFragment.class.getSimpleName();
	private static final String ARGUMENT_CHANNEL_MODEL = "ARGUMENT_CHANNEL_MODEL";

	protected @BindView(R.id.image_channel_logo) ImageView logoView;

	public static StreamPageFragment newInstance(ChannelModel channelModel) {
		StreamPageFragment fragment = new StreamPageFragment();
		Bundle args = new Bundle();
		args.putSerializable(ARGUMENT_CHANNEL_MODEL, channelModel);
		fragment.setArguments(args);
		return fragment;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View rootView = inflater.inflate(R.layout.fragment_channel_detail, container, false);
		ButterKnife.bind(this, rootView);

		Bundle args = getArguments();
		ChannelModel channel = (ChannelModel) args.getSerializable(ARGUMENT_CHANNEL_MODEL);

		if (channel != null) {
			logoView.setImageResource(channel.getDrawableId());
			logoView.setContentDescription(channel.getName());
		} else {
			Log.w(TAG, "channel argument is null");
		}

		return rootView;
	}

	public void onHide() {
		logoView.setVisibility(View.VISIBLE);
	}

	public void onVideoStart() {
		fadeOutLogo();
	}

	private void fadeOutLogo() {
		if (logoView.getVisibility() == View.VISIBLE) {
			Animation fadeOutAnimation = AnimationUtils.<commit_msg>Show channel logo when app is resumed<commit_after>package de.christinecoenen.code.zapp.fragments;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

import butterknife.BindView;
import butterknife.ButterKnife;
import de.christinecoenen.code.zapp.R;
import de.christinecoenen.code.zapp.model.ChannelModel;

public class StreamPageFragment extends Fragment {

	private static final String TAG = StreamPageFragment.class.getSimpleName();
	private static final String ARGUMENT_CHANNEL_MODEL = "ARGUMENT_CHANNEL_MODEL";

	protected @BindView(R.id.image_channel_logo) ImageView logoView;

	public static StreamPageFragment newInstance(ChannelModel channelModel) {
		StreamPageFragment fragment = new StreamPageFragment();
		Bundle args = new Bundle();
		args.putSerializable(ARGUMENT_CHANNEL_MODEL, channelModel);
		fragment.setArguments(args);
		return fragment;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View rootView = inflater.inflate(R.layout.fragment_channel_detail, container, false);
		ButterKnife.bind(this, rootView);

		Bundle args = getArguments();
		ChannelModel channel = (ChannelModel) args.getSerializable(ARGUMENT_CHANNEL_MODEL);

		if (channel != null) {
			logoView.setImageResource(channel.getDrawableId());
			logoView.setContentDescription(channel.getName());
		} else {
			Log.w(TAG, "channel argument is null");
		}

		return rootView;
	}

	@Override
	public void onPause() {
		super.onPause();
		logoView.setVisibility(View.VISIBLE);
	}

	public void onHide() {
		logoView.setVisibility(View.VISIBLE);
	}

	public void onVideoStart() {
		fadeOutLogo();
	}

	private void fadeOutLogo() {
		if (logoView.getVisibility() == View.VISIBLE) {
			Animation fadeOutAnimation = AnimationUtils.
{'fraction_non_alphanumeric': 0.09723980754621424, 'fraction_numerical': 0.0005064573309698658, 'mean_word_length': 5.905594405594406, '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': '1922000', 'n_tokens_mistral': 1270, 'n_tokens_neox': 1156, 'n_words': 251}