I have two problems:

1. `x.substring(i,1)` breaks in the `try/catch`
2. because of that and possibly other things, I can't get this method to work. I'm trying to have it so when the user enters a decimal, it will increase the `max length` of the `EditText`, but decrease the `max length` back to the original `max length` if the user enters a number that is too large.

```
boolean tooBig = false;
EditText txt = (EditText)findViewById(R.id.num1);
TextView display = (TextView)findViewById(R.id.display);
String x = txt.getText().toString(); // the String in the EditText
String str = "didn't work";
try
{
    if (x.contains(".")) 
    {
        // set the max length to be 15
        if (x.length() >= 10)
        {
            // see if the decimal is contained after 10 digits
            for (int i = 10; i < x.length(); i++)
            {
                str = x.subtring(i,1); // breaks here (test)
                if (x.substring(i,1).equals(".")) // also breaks here
                {
                    tooBig = true;
                }
            }
        }

        if (tooBig)
        {
            // set text to be blank and max length to be 8
        }
    }
}
catch (Exception e) 
{
    txt.setText(str); // "didn't work"
}

```

What can I do to fix this `x.substring(i,1)` problem?