FabTransitionActivity icon indicating copy to clipboard operation
FabTransitionActivity copied to clipboard

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

Open SahajRana opened this issue 8 years ago • 1 comments

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();
    }
}`

SahajRana avatar Apr 14 '16 16:04 SahajRana

hey could anybody help it out bcz it is not yet been solved!

SahajRana avatar Apr 24 '16 17:04 SahajRana