turn off the device while turning it on hold the power button and home button until you see the android guy and the orange hazard triangle release and press the search key.
use the volume buttons to move up and down select format device or reset and hit the menu key to select then select yes and once it starts just hit ok and let its do its thing. once it finishes click reboot and see if that fixes it.