How to left align items in itemize that contains columns environment on beamer

I need to automatically left align all my items. The problem is that I must have a columns environment in the middle. But that environment shifts the items to the left. I tried setting \setlength{\itemindent}{0em} to fixed the shift problem.

In some cases it works. However, is really time consuming and it doesn't work in general, as I have to constantly check if the bullets are aligned. I would like to find an automatic way of aligning them.

\documentclass{beamer}

\begin{document}
\begin{frame}{test}
\begin{itemize}
\item This is a really long sentence that I used to demonstrate how strange it is to shift the items.
\item This is another sentence.
\begin{columns}
\begin{column}{0.5\linewidth}
\item Test of one sentence in the column.
\item Test of another sentence in the same column.
\end{column}
\begin{column}{0.5\linewidth}
\rule{\linewidth}{0.3\linewidth}
\end{column}
\end{columns}
\item Another sentence after the columns environment.
\end{itemize}
\end{frame}
\end{document}


-
Why do you have to have columns? Your columns are semantically part of the item 'This is another sentence' this way. –  cfr Mar 12 '14 at 1:31
I was looking for a way of inserting the image in the middle of the items, as the wrapfig and cutout didn't work. This solution is easy and work without much changes. However, the alignment is off. –  adn Mar 12 '14 at 1:41
So not very easy and doesn't work very well because the alignment is off? –  cfr Mar 12 '14 at 1:47

Just add another blank column on the left end of the columns environment. In this case, using a column 1 width of \leftmargini works (that is the itemize indent), while columns 2 and 3 must add up to \linewidth. I also added 1ex of vspace after closing the columns environment.

\documentclass{beamer}
\usepackage{calc}
\begin{document}
\begin{frame}{test}
\begin{itemize}
\item This is a really long sentence that I used to demonstrate how strange it is to shift the items.
\item This is another sentence.
\begin{columns}
\begin{column}{\leftmargini}
\end{column}
\begin{column}{.5\linewidth}
\item Test of one sentence in the column.
\item Test of another sentence in the same column.
\end{column}
\begin{column}{0.5\linewidth}
\rule{\linewidth}{0.3\linewidth}
\end{column}
\end{columns}\vspace{1ex}
\item Another sentence after the columns environment.
\end{itemize}
\end{frame}
\end{document}


-

columns environment has an optional parameter which fixes columns width

\begin{columns}[totalwidth=...]


If you don't fixes it to \textwidth beamer enlarges a bit line width. To avoid it use option onlytextwidth (equivalent to totalwidth=\textwidth).

\documentclass{beamer}
\begin{document}
\begin{frame}{test}
\begin{itemize}
\item This is a really long sentence that I used to demonstrate how strange it is to shift the items.
\item This is another sentence.
\end{itemize}
%
\begin{columns}[onlytextwidth]
\begin{column}{.5\linewidth}
\begin{itemize}
\item Test of one sentence in the column.
\item Test of another sentence in the same column.
\end{itemize}
\end{column}
\begin{column}{0.5\linewidth}
\rule{\linewidth}{0.3\linewidth}
\end{column}
\end{columns}
%
\begin{itemize}
\item Another sentence after the columns environment.
\end{itemize}
\end{frame}
\end{document}


-