In German there are no continuous tenses. In English you can make a difference between
I locked the door.
I was locking the door.
I German both is
Ich habe die Tür abgeschlossen.
When you want to tell that you was locking the door when the phone rang, it is:
Ich habe die Tür abgeschlossen. Da hast du angerufen.
You have two possibilities to translate this into English:
- I locked the door. Then you called me.
- I was locking the door when you called me.
If you want to make clear, that it should be #2, you must use some workaround. A very common way is the phrase
Ich war gerade dabei etwas zu tun
This phrase has no exact translation into English, because when you use this phrase in German, you always can use a continuous tense in English.
In out example you can build this sentence:
Ich war gerade dabei die Tür abzuschließen als du mich angerufen hast.
In this sentence the accusative object of anrufen (mich) is optional, and if you want you can use da instead of als, but then the relative clause must be converted into a full clause, which means, that the auxiliary verb hast but move to position 2. And then you get:
Ich war gerade dabei die Tür abzuschliessen. Da hast du angerufen.