android - Text input wildly off center in emulator, is it normal? -


input displays strange in emulator, down , left of center

in android emulators running api 19, reason, input placed edittext controls strangely off-centered downwards , left, in cases point not visible. wondering if common bug ignored or if suggest cause and/or solution fix this, not have physical devices running version of android , cannot test myself outside of emulator.

in case relevant, here xml layout:

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     xmlns:ads="http://schemas.android.com/apk/res-auto"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:paddingleft="@dimen/activity_horizontal_margin"     android:paddingright="@dimen/activity_horizontal_margin"     android:paddingtop="@dimen/activity_vertical_margin"     android:paddingbottom="@dimen/activity_vertical_margin"     tools:context="com.mydevelopername.myapp.thisactivityname"     android:background="#005b96">      <tablelayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:id="@+id/tablelayout5">          <tablerow             android:layout_width="match_parent"             android:layout_height="match_parent"             android:layout_marginbottom="10dp">              <textview                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:textappearance="?android:attr/textappearancemedium"                 android:text="@string/lbl_volume_ivdrip"                 android:id="@+id/lbl_volume"                 android:textcolor="#b3cde0"                 android:textstyle="bold" />              <edittext                 android:layout_width="50dp"                 android:layout_height="wrap_content"                 android:inputtype="number"                 android:ems="10"                 android:id="@+id/txt_volume"                 android:background="#6497b1"                 android:layout_marginleft="4dp"                 android:layout_marginright="4dp" />              <spinner                 android:layout_width="90dp"                 android:layout_height="wrap_content"                 android:id="@+id/spinner_volume"                 android:background="#6497b1" />         </tablerow>          <tablerow             android:layout_width="match_parent"             android:layout_height="match_parent"             android:layout_marginbottom="10dp">              <textview                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:textappearance="?android:attr/textappearancemedium"                 android:text="@string/lbl_drip_set"                 android:id="@+id/lbl_drip_set"                 android:textstyle="bold"                 android:textcolor="#b3cde0" />              <spinner                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:id="@+id/spinner_drip_set"                 android:layout_span="2"                 android:background="#6497b1" />          </tablerow>          <tablerow             android:layout_width="match_parent"             android:layout_height="match_parent"             android:layout_marginbottom="20dp">              <textview                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:textappearance="?android:attr/textappearancemedium"                 android:text="@string/lbl_infuse_time"                 android:id="@+id/lbl_infuse_time"                 android:textcolor="#b3cde0"                 android:textstyle="bold" />              <edittext                 android:layout_width="50dp"                 android:layout_height="wrap_content"                 android:inputtype="number"                 android:ems="10"                 android:id="@+id/txt_infuse_time"                 android:background="#6497b1"                 android:layout_marginleft="4dp"                 android:layout_marginright="4dp" />              <spinner                 android:layout_width="90dp"                 android:layout_height="wrap_content"                 android:id="@+id/spinner_infuse_time"                 android:background="#6497b1" />         </tablerow>     </tablelayout>      <textview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:textappearance="?android:attr/textappearancelarge"         android:text="large text"         android:id="@+id/lbl_ivdrip_result"         android:layout_below="@+id/tablelayout5"         android:layout_centerhorizontal="true"         android:textstyle="bold"         android:textcolor="#b3cde0"         android:layout_marginbottom="10dp" />      <button         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:text="new button"         android:id="@+id/button2"         android:background="#b3cde0"         android:textcolor="#011f4b"         android:textstyle="bold"         android:layout_below="@+id/lbl_ivdrip_result"         android:layout_alignparentleft="true"         android:layout_alignparentstart="true"         android:onclick="ivdrip_calc" />      <com.google.android.gms.ads.adview         android:id="@+id/adview"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         ads:adsize="banner"         ads:adunitid="xxxxxxxxxxxxxxxxxxxxxxxx"         android:layout_alignparentbottom="true"         android:layout_centerhorizontal="true">     </com.google.android.gms.ads.adview>      </relativelayout> 

i'm trying started android development , unfamiliar of commonalities may exist in platform pertain issues these emulators. so, please accept apology if turns out silly question. thanks!

to position edittext input text, use attribute android:gravity="x" x keyword want positioned. in case, use start position @ beginning.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -