Git Product home page Git Product logo

fabtransitionactivity's People

Contributors

coyarzun89 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

fabtransitionactivity's Issues

Crashing on calling mSheetLayout.expandFab();

Logcat error stacktrace

02-01 19:16:40.595 9254-9254/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoSuchMethodError: io.codetail.animation.SupportAnimator.setDuration
at com.github.fabtransitionactivity.SheetLayout.expandPreLollipop(SheetLayout.java:250)
at com.github.fabtransitionactivity.SheetLayout.expandFab(SheetLayout.java:185)
at com.example.atul.gmailapp.MainActivity.onFabClick(MainActivity.java:85)
at com.example.atul.gmailapp.MainActivity$1.onClick(MainActivity.java:65)
at android.view.View.performClick(View.java:4211)
at android.view.View$PerformClick.run(View.java:17267)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)

Crashing in kitkat

It worked in lollipop but it crashed in kitkat
Logcat shows error here
View view = inflater.inflate(R.layout.fragment_server, container, false);

and fragment_server.xml is

<LinearLayout 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <RelativeLayout 
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textColor="@color/colorAccent"
            android:textStyle="bold"
            android:textSize="25dp"
            android:text="서버소개"/>

    </RelativeLayout>

    <RelativeLayout 
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>

</LinearLayout>

<RelativeLayout 
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:src="@drawable/icon_arrow_right"
        app:backgroundTint="@color/colorPrimaryDark"
        app:elevation="4dp"
        app:fabSize="normal"/>

    <com.github.fabtransitionactivity.SheetLayout
        android:id="@+id/sheetlayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerInParent="true"
        android:elevation="2dp"
        app:ft_container_gravity="center"
        app:ft_color="@color/colorPrimaryDark"/>

</RelativeLayout>

Crashing at MainActivity

My app is crashing with logcat showing nullpointer exception and taking me to this line in MainActivity

mSheetLayout.setFab(mFab);

FYI i'm using eclipse
Please Help.

Wrong position if FAB is inside another *Layout

If you have the following xml setup:

 RelativeLayout 
     RelativeLayout 
          FloatingActionButton
     SheetLayout

And then add this FloatingActionButton as SheetLayout's fab, it won't work. Its x and y are zero and animation starts from up left, even if the FloatingActionButton and its parent are at the bottom of the root layout.

Consider Prefixing @+id

Inside SheetLayout you have this line of code:

mFabExpandLayout = ((LinearLayout) findViewById(R.id.container));

R.id.container is a very common ID to assign... would be better if you used R.id.ft_container, the same for all your other ID's... That would cause less problems.

It took me a little bit to figure out why my app was crashing when trying to use the library, I finally figured it out and prefixed my code. Anyways... prefixing your ID's or using more uncommons ID's would be a good enhancement in the library to avoid crashes on apps implementing the library

onFabAnimationEnd not being called in Lollipop (but working in kitkat)

When i click on fab, sheet expends but it doesn't calls other fragment in lollipop devices (but its calling in kitkat device)..

here's the code

@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_item_chat, container, false); context = view.getContext();

    fab1 = (FloatingActionButton)view. findViewById(R.id.fabchat);
  // Set the adapter
        recyclerView = (RecyclerView) view.findViewById(R.id.Chatlist);
    recyclerView.setHasFixedSize(true);

    mSheetLayout=(SheetLayout)view.findViewById(R.id.bottom_sheet);

    mSheetLayout.setFab(fab1);
    mSheetLayout.setFabAnimationEndListener(this);
    fab1.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            if (fab1.getVisibility() == View.VISIBLE) {
                mSheetLayout.expandFab();
                fab1.setVisibility(View.GONE);

            }
        }
    });

    return view;
}

@Override
public void onFabAnimationEnd() {
    FragmentTransaction ft = getFragmentManager().beginTransaction();
    ft.replace(R.id.chatFARG, new AddFriendsFragment(), "Login");
    ft.commit();
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if(requestCode == REQUEST_CODE){
        mSheetLayout.contractFab();
    }
}`

Overlap on System Buttons

Overriding Pending Transitions are overlapping Android System Buttons. Wouldn't it be a cleaner animation if they weren't?!

Dependency error

Hello, when i add your library to build.gradle, i have error:
Failed to resolve: com.github.ozodrukh:CircularReveal:1.1.1

I think, it because the version of this library is outdated.

FabTransition from Fragment

I have a FloatingActionButton inside a Fragment, and I have your solution almost working fully.
When I click the FAB, The SheetLayout expands correctly, but it doesn't overlap over the Toolbar/ActionBar as this is in the Activity containing the Fragment. I've tried swapping around some elements etc. but I haven't figured it out yet.
I have attached screenshots to explain.

Any help or tips is appreciated :)

screenshot_2016-01-07-14-43-18
screenshot_2016-01-07-14-43-13

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.