Custom charger with solar cell
With only a voltage regulator on the the output of the solar cell, the efficiency will be low.  Use an MPPT tracker module before the voltage regulator to mach the solar panel output with the load. The MPPT tracker is not essential but will allow you to use power from the solar cell in a wider variety of lighting conditions, and at higher deficiencies. 

In the place of SW2 you could use a double diode configuration to automatically use either supply (or a mosfet solution which is more efficient) :
OR-ing power supplies (diode or mosfet)