Code Monkey home page Code Monkey logo

fabtoolbar's People

Contributors

fafaldo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fabtoolbar's Issues

How to match the Snackbar?

As we know, in the Material Design, when we click the FAB button, then the Snackbar appear and Fab button start to rise, but I find I can realize this effect by your FABToolbar.

I'm so sorry that my Chinese style English, because I'm a Chinese.

Performance issues due to ToolbarLayout

Today I discovered performance issues regarding the library (bad scrolling-performance in lists, ripple highlighting freezes etc).

Without the FABToolbar the issues are gone. I digged deeper and discovered that if I remove only the toolbarLayout from my View-Hierarchy it works as well.

Thus I guess it has to do with toolbarLayout.getViewTreeObserver().addOnGlobalLayoutListener which is never removed.

View IDs constricted

It'd be great if you let the devs use their own ids for the views instead of having them hard coded.

wrong animation if use AppBarLayout

Hi,

i'm using AppBarLayout in MainActivity

<android.support.design.widget.AppBarLayout
    android:id="@+id/appbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingTop="@dimen/appbar_padding_top"
    android:theme="@style/AppTheme.AppBarOverlay"
    >

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/AppTheme.PopupOverlay"
        >

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

    <android.support.design.widget.TabLayout
        android:id="@+id/sliding_tabs"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />

</android.support.design.widget.AppBarLayout>

and FABToolbarLayout in fragment from first tab 'Translation'.

transition animation button in the toolbar is not the same as in your example:

ezgif com-video-to-gif

if i'm remove AppBarLayout and tabs, then animation getting correct.

The icon of the fab is shown as background for the toolbar.

This problem occurs when the following actions are executed:

  1. Change the icon of the fab with fab.setImageResource(int res)
  2. Call fabLayot.Show() to transform the fab into toolbar.
  3. Now the new icon of the fab will be animated and also stay as background for the toolbar

I have tested this behaviour on:

  • Nexus 5 (Android 6.0.1)
  • Samsung Galaxy Note 3 Lite (Android 5.1.1)
  • Nexus 10 emulator (Android 4.4)

If android:background element is set for the toolbar, then the fab's icon won't stay as background for the toolbar, but the animation issue still remains.

This issue might be related to Issue on Sony Devices with FabToolbar, but this is a problem for more than just Sony devices.

Why to limit it to API 16 when you can make for earlier APIs?

Hi,
you can use
if (Build.VERSION.SDK_INT < 16)
{
fabContainer.getViewTreeObserver().removeGlobalOnLayoutListener(this);
fab.setVisibility(VISIBLE);
} else {
fabContainer.getViewTreeObserver().removeOnGlobalLayoutListener(this);
fab.setVisibility(VISIBLE);
}
to make it compatible for <16 sdk versions.

Hide fab if Show it

Hi, thanks for this library. i have a question please answer to me ❤️
i want hide fab when isShow it, and i want write this code in onBackPress method when write this code show me error :

    @Override
    public void onBackPressed() {
        if (fabToolbar.show()) {
            fabToolbar.hide();
        } else {
            onBackPressed();
        }
    }

Error image has attached.
31

please help me for fix this problem. thanks my dear friend ❤️

Unable to listen to fab click

Trying to listen to click event on fabtoolbar_fab (FloatingActionButton) to call fabToolbar show() only when some condition is met.

Problem: My onClickListener isn't getting called when Fab is clicked.

findViewById(R.id.fabtoolbar_fab).setOnClickListener(new View.OnClickListener() {
    @Override public void onClick(View view) {
         Log.d("mlog", "My Click"); // Doesn't trigger
         if ( isLoaded() ) { 
             fabToolbar.show();
         } else {
             showSnackBar("Fetching newsfeed...");
         }
     }
});

Can't change the Color

Hello, I have tried to set background color of "FloatingActionButton" and the animation of the layout but I can't do it! Can you please tell me how can I do that?

Anchor property not working for the layout

I placed the reveal layout in a CoordinateLayout so it can move with AppBarLayout but the problem is I cant anchor the floating button and Its revealing toolbar to the AppBarLayout. Also the anchor property for the parent layout doesn't work correclty

Add check SDK version

in FABToolbarLayout.java need add check SDK version in 185 line for support Android SDK version 15:

if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
                                fabContainer.getViewTreeObserver().removeOnGlobalLayoutListener(this);
                            } else {
                                fabContainer.getViewTreeObserver().removeGlobalOnLayoutListener(this);
                            }

Examples please

Could you please add an example app or more java code to implement the FABToolbar layouts??
i am totally new to this and this looks like a pretty awesome library, it will be really helpful.. @fafaldo

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

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.

wrap_content support

Now the view with id "fabtoolbar_toolbar" does not support wrap_content,which make it's hard to contain a view like edittext in it
untitled

Start showing toolbar instead Float Button

I want to do the same example showed on Material Design doc (on scroll transform the Toolbar on Float Button). I tried to do this with this lib but when I start the Activity with fABToolbarLayout.show() (after the Activity render the screen) the lib do the expand animation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.