package me.cvhc.myapplication;

import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}

@@ -13,1761 +13,2728 @@
 vhc.
-myapplication;%0A%0Aimport android.os.Bundle;%0Aimport android.support.design.widget.FloatingActionButton;%0Aimport android.support.design.widget.Snackbar;%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.support.v7.widget.Toolbar;%0Aimport android.view.View;%0Aimport android.view.Menu;%0Aimport android.view.MenuItem;%0A%0Apublic class MainActivity extends AppCompatActivity %7B%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_main);%0A        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);%0A        setSupportActionBar(toolbar);%0A%0A        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);%0A        fab.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View view) %7B%0A                Snackbar.make(view, %22Replace with your own action%22, Snackbar.LENGTH_LONG)%0A                        .setAction(%22Action%22, null).show();%0A            %7D%0A        %7D);%0A    %7D%0A%0A    @Override%0A    public boolean onCreateOptionsMenu(Menu menu) %7B%0A        // Inflate the menu; this adds items to the action bar if it is present.%0A        getMenuInflater().inflate(R.menu.menu_main, menu);%0A        return true;%0A    %7D%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        // Handle action bar item clicks here. The action bar will%0A        // automatically handle clicks on the Home/Up button, so long%0A        // as you specify a parent activity in AndroidManifest.xml.%0A        int id = item.getItemId();%0A%0A        //noinspection SimplifiableIfStatement%0A        if (id == R.id.action_settings) %7B%0A            return true;%0A        %7D%0A%0A        return super.onOptionsItemSelected(item
+equationsolver;%0A%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.os.Bundle;%0Aimport android.text.Editable;%0Aimport android.text.TextWatcher;%0Aimport android.util.Log;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.ListView;%0Aimport android.widget.TextView;%0A%0Aimport java.util.ArrayList;%0A%0Apublic class MainActivity extends AppCompatActivity %7B%0A%0A    TextView textViewEquation;%0A    ListView listViewVariables;%0A    ArrayAdapter%3CString%3E adapterVariables;%0A    ArrayList%3CString%3E listVariables = new ArrayList%3CString%3E();%0A%0A    private final String LOG_TAG = MainActivity.class.getSimpleName();%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_main);%0A%0A        textViewEquation = (TextView)findViewById(R.id.textViewEquation);%0A        listViewVariables = (ListView)findViewById(R.id.listViewVariables);%0A%0A        adapterVariables = new ArrayAdapter%3CString%3E(this,%0A                android.R.layout.simple_list_item_1, listVariables);%0A        listViewVariables.setAdapter(adapterVariables);%0A%0A        textViewEquation.addTextChangedListener(new TextWatcher() %7B%0A            @Override%0A            public void beforeTextChanged(CharSequence s, int start, int count, int after) %7B%0A%0A            %7D%0A%0A            @Override%0A            public void onTextChanged(CharSequence s, int start, int before, int count) %7B%0A%0A            %7D%0A%0A            @Override%0A            public void afterTextChanged(Editable s) %7B%0A                String eq = s.toString();%0A                String%5B%5D part = eq.split(%22=%22, 2);%0A%0A                Log.d(LOG_TAG, %22Equation: %22 + eq);%0A                if (part.length != 2) %7B%0A                    return;%0A                %7D%0A%0A                ExpressionEvaluator left = new ExpressionEvaluator(part%5B0%5D);%0A                ExpressionEvaluator right = new ExpressionEvaluator(part%5B1%5D);%0A%0A                Log.d(LOG_TAG, %22left part: %22 + part%5B0%5D);%0A                Log.d(LOG_TAG, %22right part: %22 + part%5B1%5D);%0A%0A                if (left.isError() %7C%7C right.isError()) %7B%0A                    textViewEquation.setBackgroundResource(R.color.red);%0A                %7D%0A                else %7B%0A                    textViewEquation.setBackgroundResource(android.R.color.transparent);%0A%0A                    listVariables.clear();%0A                    for (Character c: left.getProperty().Variables) %7B%0A                        listVariables.add(c.toString());%0A                    %7D%0A                    for (Character c: right.getProperty().Variables) %7B%0A                        listVariables.add(c.toString());%0A                    %7D%0A%0A                    adapterVariables.notifyDataSetChanged();%0A%0A                %7D%0A            %7D%0A        %7D
 );%0A 

update code in MainActivity.java