Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
How to use?
FragmentRigger does not need extend any class,all operation is depend on the proxy class Rigger to manage fragments.
Add Fragment/Activity support
Add @Puppet annotation on your
Fragment/Activity,but your fragment must is the child class of
android.support.v4.app.Fragmentand your activity must is the child class of
@Puppet public class ExampleFragment extends Fragment
@Puppet(containerViewId = R.id.atyContent) public class ExampleActivity extends AppCompatActivity
You can use this library on the class that is added @Puppet annotation
If you wanna to use this library,@puppet is necessary condition.
But this annotation has some params you need to know.
Optional identifier of the container this fragment is to be placed in. If 0, it will not be placed in a container. default value is 0.
This params will be used in method
- if the value is
true: the puppet will be closed as the top fragment in puppet's stack is closing. the top fragment in stack will not perform transition animation.
- if the valye is
false: the puppet will do nothing as the top fragment in puppet's stack is closing. the top fragment in stack will perform transition animation and closing.
This params will be used as the host
Activity#onBackPressed is called.