import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;
static Formula F=null; //formula che sto costruendo
static RelativeLayout formulaLayout;
static TextView FView; //View contenente la formula che sto visualizzando
static Formula F=null; //formula che sto costruendo
static RelativeLayout formulaLayout;
static TextView FView; //View contenente la formula che sto visualizzando
static boolean reload=false;
static ArrayList<String> esliter=new ArrayList<String>();
static ArrayList<Formula> undo=new ArrayList<Formula>();
static boolean reload=false;
static ArrayList<String> esliter=new ArrayList<String>();
static ArrayList<Formula> undo=new ArrayList<Formula>();
public void onClick(DialogInterface dialog, int id) {
if(!F.toString().contains("_")) {
List<EliminationRule> L = F.EliminationRules();
public void onClick(DialogInterface dialog, int id) {
if(!F.toString().contains("_")) {
List<EliminationRule> L = F.EliminationRules();
touchHPHandler t = new touchHPHandler(L.get(0).createNodes(null, new askFormula()),new Hypothesis(F,true));
F = null;
t.discard=false;
t.onClick(null);
}
touchHPHandler t = new touchHPHandler(L.get(0).createNodes(null, new askFormula()),new Hypothesis(F,true));
F = null;
t.discard=false;
t.onClick(null);
}
}
});
builder.setNeutralButton("Undo", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
if(undo.size()>1) {
F = undo.remove(undo.size() - 1);
}
});
builder.setNeutralButton("Undo", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
if(undo.size()>1) {
F = undo.remove(undo.size() - 1);