package com.example.issm;

import android.os.Bundle;
import android.app.Activity;
import android.text.TextUtils;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;


public class ISSM extends Activity implements OnClickListener {
	private EditText input;
	private TextView output;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_issm);
        this.input  = (EditText) super.findViewById(R.id.input);
        this.output  = (TextView) super.findViewById(R.id.output);
        Button button = (Button) super.findViewById(R.id.button1);
        button.setOnClickListener(this);
        
    }
    
	public void onClick(View view) 
	{
		// TODO Auto-generated method stub
		String input = this.input.getText().toString();
		if(TextUtils.isEmpty(input))
		{
			return;
		}
		long result = IssmJni.facIterative(Long.parseLong(input));
		this.output.setText("Result = " + result + "\n");
	}
}
