// Path: challenge-three/app/src/main/java/com/reoky/crackme/challengethree/listeners/HintFragmentOnCheckedChangeListener.java
// public class HintFragmentOnCheckedChangeListener implements CompoundButton.OnCheckedChangeListener {
//     TextView textHint;
// 
//     public HintFragmentOnCheckedChangeListener(TextView textHint) {
//         this.textHint = textHint;
//     }
// 
//     @Override
//     public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
//         int newVisibility = isChecked ? View.VISIBLE : View.GONE;
//         if (textHint != null) {
//             textHint.setVisibility(newVisibility);
//         }
//     }
// }


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.ToggleButton;
import com.reoky.crackme.challengethree.R;
import com.reoky.crackme.challengethree.listeners.HintFragmentOnCheckedChangeListener;
package com.reoky.crackme.challengethree.fragments;



public class HintFragment extends Fragment {

    public HintFragment() {}

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_hint, container, false);
        final ToggleButton switchShowHint = (ToggleButton) view.findViewById(R.id.switch_show_hint);
// Path: challenge-three/app/src/main/java/com/reoky/crackme/challengethree/listeners/HintFragmentOnCheckedChangeListener.java
// public class HintFragmentOnCheckedChangeListener implements CompoundButton.OnCheckedChangeListener {
//     TextView textHint;
// 
//     public HintFragmentOnCheckedChangeListener(TextView textHint) {
//         this.textHint = textHint;
//     }
// 
//     @Override
//     public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
//         int newVisibility = isChecked ? View.VISIBLE : View.GONE;
//         if (textHint != null) {
//             textHint.setVisibility(newVisibility);
//         }
//     }
// }


// Path: challenge-three/app/src/main/java/com/reoky/crackme/challengethree/fragments/HintFragment.java
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.ToggleButton;
import com.reoky.crackme.challengethree.R;
import com.reoky.crackme.challengethree.listeners.HintFragmentOnCheckedChangeListener;

package com.reoky.crackme.challengethree.fragments;



public class HintFragment extends Fragment {

    public HintFragment() {}

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_hint, container, false);
        final ToggleButton switchShowHint = (ToggleButton) view.findViewById(R.id.switch_show_hint);
        switchShowHint.setOnCheckedChangeListener(new HintFragmentOnCheckedChangeListener((TextView) view.findViewById(R.id.text_hint)));