coyarzun89 / fabtransitionactivity Goto Github PK
View Code? Open in Web Editor NEWExample of fab animation
License: Other
Example of fab animation
License: Other
The AfterFabAnimationActivity.class
is not opening up along with the animation, i.e., from bottom to up.
I'm using the same code as described here
Please help me in making it work!
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)
I think there is a problem with the library and one of the properties in the manifest. I'm getting the following error:
manifest merge failed android:allowBackup="false"
This is a known issue, but in any case I don't think the library should include this property as it's forcing the app to use it as well.
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>
Hi, please, add the ability to change animation duration of SheetLayout.
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.
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.
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
After migrating to AndroidX this library stopped working for me
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();
}
}`
Can't sync the gradle due to this issue
Error:Failed to resolve: com.github.ozodrukh:CircularReveal:1.1.1
Open File
Show in Project Structure dialog
What's wrong?
Overriding Pending Transitions are overlapping Android System Buttons. Wouldn't it be a cleaner animation if they weren't?!
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.
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 :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.