Oleh
Oleh

Reputation: 674

Menu item moved in action bar

I created the following menu:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context=".MainActivity" >
    <item
        android:id="@+id/action_refresh"
        android:icon="@android:drawable/ic_popup_sync"
        app:showAsAction="always"
        android:title="Refresh"/>
    <item
        android:id="@+id/copy_data"
        android:icon="@android:drawable/ic_menu_save"
        app:showAsAction="always"
        android:title="Copy"/>
</menu>

When I start an animation, the menu item moves from start position.

Menu item without animation:

enter image description here

Menu item with animation:

enter image description here

How I can fix this?

Upvotes: 2

Views: 85

Answers (1)

Oleh
Oleh

Reputation: 674

I fixed my problem. Add style="@android:style/Widget.ActionButton" to ImageView that display an animation

Upvotes: 1

Related Questions