¿Cómo puedo colocar un diseño justo encima del teclado en pantalla de Android?

Vea la foto adjunta. Twitter lo hace bien. Tienen un diseño, que llamaré una barra de herramientas por falta de un término mejor, justo encima del teclado en pantalla. ¿Cómo puedo hacer esto con mi código?

Introduzca aquí la descripción de la imagen

ACTUALIZACIÓN: Aquí está mi diseño:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffff"> <RelativeLayout android:id="@+id/actionbarRelativeLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/actionbar_gradient"> <ImageButton android:id="@+id/imageButton" android:layout_width="wrap_content" android:background="@drawable/stocktwits" android:layout_height="wrap_content"></ImageButton> <TextView android:layout_width="wrap_content" android:id="@+id/charCountTextView" android:text="140" android:layout_alignParentRight="true" android:layout_height="wrap_content" android:textColor="#ffffff" android:textStyle="bold" android:textSize="18sp" android:gravity="center_vertical" android:layout_centerVertical="true"></TextView> </RelativeLayout> <EditText android:layout_width="match_parent" android:id="@+id/composeEditText" android:focusable="true" android:hint="Share an idea with the community" android:gravity="left|top" android:layout_height="fill_parent" android:layout_weight="1"></EditText> <LinearLayout android:layout_width="match_parent" android:id="@+id/border" android:background="#c4c4c4" android:baselineAligned="false" android:layout_height="1dp"></LinearLayout> <LinearLayout android:layout_height="wrap_content" android:id="@+id/toolbarLinearLayout" android:orientation="horizontal" android:padding="5dip" android:layout_width="fill_parent" android:background="@drawable/gray_toolbar_gradient"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/shortenButton" android:background="@drawable/shortenbutton" android:layout_weight="0"></Button> <LinearLayout android:layout_height="match_parent" android:layout_width="wrap_content" android:id="@+id/linearLayout1" android:layout_weight="1"></LinearLayout> <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/twitterCheckBox" android:textColor="#000000" android:layout_weight="0" android:background="@drawable/twittergraybutton"></CheckBox> <Button android:layout_height="wrap_content" android:layout_weight="0" android:id="@+id/sendButton" android:layout_width="wrap_content" android:background="@drawable/sharebutton"></Button> </LinearLayout> </LinearLayout> 

Y aquí está mi Manifiesto donde especifico el softInputMode:

 <activity android:name="ShareActivity" android:theme="@android:style/Theme.NoTitleBar" android:windowSoftInputMode="adjustResize"> </activity> 

Asegúrese de que su modo de entrada suave está ajustado para adjustResize y , a continuación, coloque el diseño con la barra de herramientas en la parte inferior de su actividad.

Ejemplo:

 <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/my_content" android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1"> <!-- Your content here --> </FrameLayout> <LinearLayout android:id="@+id/my_toolbar" android:layout_width="match_parent" android:layout_height="wrap_content"> <!-- Your toolbar items here --> </LinearLayout> </LinearLayout> 

Esto es para las personas que después de ajustar el adjustResize todavía no funcionó, hay un artículo: adjustResize no funciona en pantalla completa

De hecho, tenía este conjunto a pantalla completa, al configurar mi tema de nuevo a un tema nonfullscreen los diseños redimensionados justo como quería.

Adición importante a las respuestas anteriores.

Cuando se trabaja con DialogFragment, la pantalla completa se aplica implícitamente .

Eso significa que usted tiene que:
1) fije el estilo en onCreate () de su DialogFragment:

 public class YourDialogFragment extends DialogFragment { ... @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Holo_NoActionBar); } } 

2) si usas tu propio tema debes manejarlo así:

 <style name="AppTheme" parent="AppBaseTheme"> <item name="android:windowNoTitle">true</item> <item name="android:windowFullscreen">false</item> </style> 
  • ¿Cómo desarrollar un teclado suave para Android?
  • Ocultación de teclados suaves en dispositivos móviles cuando se utilizan divs contenteditable
  • Comience un teclado diferente para diferentes actividades
  • ¿Cómo detectar presencia de teclado de hardware?
  • Cómo establecer / llamar a un nuevo método de entrada en Android
  • ¿Cómo puedo ocultar el teclado Android usando JavaScript?
  • AutoCompleteTextView: quita el teclado suave en la parte posterior de la prensa en lugar de sugerencias
  • Establece el tipo de entrada numérica en SearchView en ActionBar
  • Cómo detectar qué aplicación se abre en android
  • Disposición de teclado personalizada de Android dejando un margen de blanco en el lateral
  • Cordova 3.4 - Detectar evento de teclado
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.