Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: issues FAB that morphs into android.support.v7.widget.Toolbar #29

Open
greg-stein opened this issue Jun 16, 2017 · 1 comment
Open

Comments

@greg-stein
Copy link

Hi,

I set FAB that morphs into android.support.v7.widget.Toolbar:

<com.github.fafaldo.fabtoolbar.widget.FABToolbarLayout 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"
    android:id="@+id/fabtoolbar_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:containerId="@+id/fabtoolbar_container"
    app:fabId="@+id/fabtoolbar_fab"
    app:fabToolbarId="@+id/fabtoolbar_toolbar"
    app:fadeInFraction="0.2"
    app:hideDuration="200"
    app:horizontalMargin="30dp"
    app:showDuration="600"
    app:verticalMargin="30dp"
    tools:showIn="@layout/activity_main">

    <RelativeLayout
        android:id="@+id/fabtoolbar_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:clipChildren="false"
        android:clipToPadding="false">

        <android.support.design.widget.FloatingActionButton
            android:id="@+id/fabtoolbar_fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_margin="@dimen/fab_margin"
            android:src="@drawable/ic_mode_edit_white_24dp"
            app:fabSize="mini" />

    </RelativeLayout>

    <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/fabtoolbar_toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:minHeight="?attr/actionBarSize"
        app:theme="@style/Base.Theme.AppCompat.CompactMenu">

        <Spinner
            android:id="@+id/add_spinner"
            android:layout_width="50dp"
            android:layout_height="match_parent" />
        <!--android:background="@android:drawable/btn_default"-->

    </android.support.v7.widget.Toolbar>

</com.github.fafaldo.fabtoolbar.widget.FABToolbarLayout>

I have two issues:

  1. The fab that morphs into toolbar shows as very small (by factor of 2) see screenshot
  2. After each morph cycle (fab-->toolbar-->fab) the fab moves to left some 5dps and then completely disappears so you can't tap on it.

The cause for this is 50dp size of the spinner. If I set it to 70dp everything works fine.

@mainrs
Copy link

mainrs commented Oct 23, 2017

You forgot to post a screenshot @onirtuen :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants