  A generalization of the single-parameter scaling theory of localization is
proposed for the case when the random potential depends on temperature. The
scaling equation describing the behavior of the resistance is derived. It is
shown that the competition between the metallic-like temperature dependence of
the Drude resistivity and localization leads to a maximum (minimum) at higher
(lower) temperatures. An illustration of a metal-insulator transition in the
model of charged traps, whose concentration depends on temperature, is
presented.
