The way you define the density, $\theta$ has to be positive. Otherwise the density becomes negative if $\theta \leq x \leq -\theta$ and the density function integrates to -1 over $\mathbb{R}$.
Assume sample $X = \{x_1, x_2 ,... , x_n\}$ and $|X| = \{|x_1|, |x_2| ,... , |x_n|\}$ the set of absolute values from the sample.
As $x \in [-\theta, \theta]$ $\forall x \in X$ , by definition the following has to hold: $-\theta \leq x \leq \theta \Leftrightarrow |x| \leq \theta$.(i)
The likelihood function is $L(x;\theta) = \frac{1}{(2\theta)^n}$ The likelihood becomes:
$l(x;\theta) = n\log((2\theta)^{-1}) = -n\log(2\theta)$ $\Rightarrow \hat\theta_{ML} = \underset{\theta \geq \max|X|}{\operatorname{argmax}}-n\log(2\theta) = \max|X|$, where the condition for the maximizer comes from applying (i) to the entire sample. The maximizing value max|X| is obtained by the fact that log is a monotonically increasing function and its multiplied by a negative constant.