The way I understand it is that the acidosis (any acidosis) causes an extracellular shift of potassium out of cells causing initial hyperkalemia.
In a chronically acidodic state like type II proximal RTA, since more of the potassium is in your blood you will lose it in your urine thereby over time leading to a depletion of the body's stores of potassium and eventual hypokalemia.
In type one distal RTA you also get an additional reason for hypokalemia. Since you cannot pump out that H ion in your distal tubule to exchange it for Na, Instead you will pump out a K ion to exchange it for sodium, and that exacerbates the hypokalemia.
Now this doesn't happen in type 4 because your potassium excretion is impaired in the distal tubule, due to insensitivity to aldosterone. Thus this is the only RTA where you get hyperkalemia.
let me know if this helps.