I am writing an application for Android tablets - version 4.0 (min sdk 14)
Here is the content at the start of the activity : <https://lh4.googleusercontent.com/-s7H2b2yp8Gk/Uo9E9VZP1XI/AAAAAAAAAm8/W0maYf5wefQ/s1600/actionbar_prb1.jpg> When I click (I am working in the emulator) on the plus button (to zoom in one level), this is the result : <https://lh4.googleusercontent.com/-YP1eyEF13RM/Uo9FY9thC6I/AAAAAAAAAnE/VX-FuuZILZk/s1600/actionbar_prb2.jpg><https://lh4.googleusercontent.com/-s7H2b2yp8Gk/Uo9E9VZP1XI/AAAAAAAAAm8/W0maYf5wefQ/s1600/actionbar_prb1.jpg> If I remove the TextView control at the head of the ActionBar, this is the resulting visual behaviour : <https://lh5.googleusercontent.com/-D52Fjc3_60c/Uo9QWtiXGwI/AAAAAAAAAnU/WbKsz70aZ98/s1600/actionbar_prb3.jpg> <https://lh6.googleusercontent.com/-CiWez7jbELA/Uo9QpMeOZuI/AAAAAAAAAnc/O11uYPVre7U/s1600/actionbar_prb4.jpg> The number button is defined in the menu as - <item android:id="@+id/partion_songnumber" android:title="Numéro du chant" android:showAsAction="always" android:actionLayout="@layout/actionbar_songnumber_btn" /> The layout file is defined as <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tv_songnumber" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="5dp" android:paddingRight="5dp" android:layout_gravity="center_vertical" android:clickable="true" android:textSize="29dp" /> The menu is modified via the method onPrepareOptionsMenu The content of this method is like this : @Override public boolean onPrepareOptionsMenu(Menu menu) { boolean bOk = super.onPrepareOptionsMenu(menu); TextView tv; int iZoomLevel = m_ZoomListHandler.GetCurrentPosition(); if(bOk) { menu.findItem(R.id.partition_zoomin).setEnabled(iZoomLevel < 7); menu.findItem(R.id.partition_zoomout).setEnabled(iZoomLevel > 0); // set the songnumber tv = (TextView)menu.findItem(R.id.partion_songnumber) .getActionView(); tv.setText(String.format("%d", m_iSongNumber)); } return true; } I have tried searching for why this happens, with no success. Can anyone help me resolve this ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

