List of usage examples for android.view InflateException getCause
public synchronized Throwable getCause()
From source file:org.mariotaku.twidere.preference.ThemePreviewPreference.java
@Override protected View onCreateView(final ViewGroup parent) { final Context context = getContext(); final int themeResource = ThemeUtils.getNoActionBarThemeResource(context); final Context theme = new ContextThemeWrapper(context, themeResource); final LayoutInflater inflater = LayoutInflater.from(theme); try {/* w w w .j a v a 2 s.c om*/ final View view = inflater.inflate(R.layout.theme_preview, parent, false); setPreviewView(theme, view.findViewById(R.id.theme_preview_content), themeResource); return view; } catch (InflateException e) { if (e.getCause() instanceof InvocationTargetException) { e.getCause().getCause().printStackTrace(); } throw e; } }