package com.nouribygi.sokhan.ui.helper;

import android.app.Activity;
import android.text.Spannable;
import android.view.View;

import com.nouribygi.sokhan.model.Beit;
import com.nouribygi.sokhan.ui.fragment.MyPoem2Fragment;


public class MyClickableSpan {
    private Activity activity;
    MyPoem2Fragment.PageGestureDetector pageGestureDetector;
    Beit beit;

    public MyClickableSpan(Activity activity, MyPoem2Fragment.PageGestureDetector pageGestureDetector, Beit beit) {
        this.activity = activity;
        this.pageGestureDetector = pageGestureDetector;
        this.beit = beit;
    }


    public void onClick(Spannable buffer, View v) {
        pageGestureDetector.setPressedBeit(beit);
        pageGestureDetector.setBuffer(buffer);
        pageGestureDetector.setSpan(this);

    }


}
