How to import the library in build.gradle file
Ankit0080 opened this issue · 5 comments
Please provide Java Implementation
This is what i have done so far
public class MyProfileFragment extends BottomDrawerFragment {
public MyProfileActivity activity;
@Override
public void onAttach(@NonNull Activity activity) {
super.onAttach(activity);
this.activity=(MyProfileActivity) activity;
}
@Override
public BottomDrawerDialog configureBottomDrawer() {
BottomDrawerDialog.Builder builder = new BottomDrawerDialog.Builder(activity);
builder.setTheme(R.style.bottomDrawer);
builder.setCancelableOnTouchOutside(false);
// bottomDrawerDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
return builder.build();
}
Please tell me where do i need to add OnSlide method i am using java code because slide not working
@Ankit0080 For what purpose do you need onSlide method? In your implementation i don't see a onCreateView method with inflating a view.
you need something like that:
public class MyProfileFragment extends com.github.heyalex.bottomdrawer.BottomDrawerFragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.**your_cool_layout**, container, false);
return view;
}
}
I have already implemented oncreateView but using this piece of code there is no bottom sheet build , apart from it the addBottomsheetCallback is not working using Java Can you provide any working sample in Java using this package.?
@Ankit0080 take a look at sample here. You can check out develop branch to check how it works.
@Ankit0080 feel free to reopen