Provided you qualify for split year treatment, you won't have to pay UK tax on your foreign earnings.
The bare minimum criteria that you have to achieve to get non-resident status is to be non-UK resident for one complete tax year (6 April to 5 April) starting on the first 6 April after you leave the UK. Assuming that you spent less than 91 days in the UK in the year to 5 April 2016, then you will have acheived that bare minimum. Take a look at RDR3 on the Statutory Residence Test here, a summary of the rules here and a flowchart here.
If you return to the UK in December 2016, under the split year treatment rules the number of days that you will be allowed to spend in the UK and retain tax free status for your foreign earnings in 2016/17 from 6 April 2016 up to the date of your permanent return to the UK will be reduced from 90 to 67. See Table F on page 60 of RDR3. You need to qualify for split year treatment under one or more of Cases 4 to 8. See pages 59 to 69 of RDR3. Look at the flow chart on split year treatment here.
Provided that you are treated as resident in the UK for 2016/17, you should qualify for split year treatment so that the 2016/17 tax year is split into two parts, the first running from 6 April 2016 to the day before you return to the Uk and the second running from the date you return to the UK to 5 April 2017. Your foreign earnings should be free from UK tax.
If you come back to the UK earlier than December, then the same principles apply but the number of days you can spend in the UK up to your permanent return will be reduced from 90. See Table F again.
I hope this helps but let me know if you have any futher questions.