Skip to content

ActionView doesn't center when width and height are changed during orientation change #11

Open

Description

@ssppgit

Hi!

I have using ActionView in my layout. I have define width and height in dimens.xml for landscape and portrait.

<at.markushi.ui.ActionView
        android:id="@+id/action"
        android:layout_width="@dimen/action_size"
        android:layout_height="@dimen/action_size"
        android:padding="16dp"
        android:background="#FF0000"
        app:av_action="drawer"
        app:av_color="@android:color/white"/>

action_size is 56dp for portrait and 48dp for landscape.

When i run my app i see well the ActionView. However if i change orientation of my device, Image of actionView doesn't center well. I don't know why because if a run my app only in landscape mode i see well the actionView.

You can see it in this image.

action

Any idea? Thanks!

Activity

  1. ali-star commented on Oct 29, 2014

    @ali-star

    i use this and it's work fine:

    <LinearLayout
                android:id="@+id/menu_monitor"
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:gravity="center"
                android:orientation="vertical" >
    
                <at.markushi.ui.ActionView
                    android:id="@+id/action"
                    android:layout_width="56dp"
                    android:layout_height="56dp"
                    android:padding="16dip" />
    
    </LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions