Nontrivial solutions of Schrödinger equations with indefinite nonlinearities