Gracias a todos, Timmmm fue muy útil. Finalmente envolví todo y obtuve una solución completa de ocultación de teclado suave para deslizar las pestañas. Tengo 4 pestañas con EditTexts en cada una y necesito ocultar el teclado al deslizar. añadí esta a disposición fragmento:
<!--Fixes keboard pop-up-->
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@android:color/transparent"
android:focusable="true"
android:focusableInTouchMode="true">
</LinearLayout>
que se añadieron al Código de actividad (notar una pequeña diferencia con la respuesta de un Timmmm: No tengo
mViewPager.getCurrentItem() == 0
aquí, porque tengo que ocultar teclado para todas las vistas:
// When swiping between different sections, select the corresponding
// tab. We can also use ActionBar.Tab#select() to do this if we have
// a reference to the Tab.
mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
if (actionBar != null) {
actionBar.setSelectedNavigationItem(position);
}
}
@Override
public void onPageScrollStateChanged(int state)
{
if (state == ViewPager.SCROLL_STATE_IDLE)
{
// Hide the keyboard.
((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE))
.hideSoftInputFromWindow(mViewPager.getWindowToken(), 0);
}
}
});
Y aquí es una actividad en AndroidManifest.xml:
<activity
android:name=".TestActivity"
android:label="@string/title_activity_test"
android:parentActivityName=".MainActivity"
android:windowSoftInputMode="stateHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.atrinax.test.MainActivity" />
</activity>
Quizás pueda forzar a ocultar el teclado suave. Más detalles aquí: http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard –