Posts

setBottomSheetCallback is deprecated in BottomSheetBehavior whtat to use instead.

This is deprecated :sheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View view, int newState) { } @Override public void onSlide(@NonNull View view, float v) { } });This is new One:heetBehavior.addBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) { } @Override public void onSlide(@NonNull View bottomSheet, float slideOffset) { } });

getResources().getDrawable(R.color.colorName) is deprecated What to use instead.

This is deprecated :getResources().getDrawable(R.color.white);This is new One: ResourcesCompat.getDrawable(getResources(),R.color.white,null);

getResources().getDrawable() deprecated in higher versions, getresources().getdrawable() deprecated what to use instead or getdrawable from Resource id.

This is deprecated:getResources().getDrawable(R.mipmap.ic_launch_icon_new)
This is new try this:ContextCompat.getDrawable(getActivity(),R.drawable.ic_local_bkp_list)

addOnPageChangeListener is deprecated or addOnPageChangeListener not working or how to use addOnPageChangeListener in viewpager 2 in android.

The problem describe below:- viewpager setonpagechangelistener deprecated or viewPager.setOnPageChangeListener not working [duplicate] or setOnPageChangeListener is deprecated now or How to useaddOnPageChangeListenermethodinandroidx.viewpager.widget.ViewPager Aandroid - viewpager setonpagechangelistener deprecated.
This is deprecated.
viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { invalidateFragmentMenus(position); } @Override public void onPageScrollStateChanged(int state) { } }); invalidateFragmentMenus(viewPager.getCurrentItem()); }

This is new which you will have to use in viewPager 2.
viewPager2.registerOnPageChangeCallback(new ViewPager2

MongoDb in Java Example. How to use MongoDb database in java. Insert,Update,Delete And how to deal with date in mongodb.And it also shows InsertMany,InsertOne,findOneByCondition,findByDate,UpdateOne,UpdateOneByMultipleCondition,DeleteOne,DeleteMany

MongoDb exmaple in java. This example demonstrates than how to deal with date in MongoDb and how to query with date from to date's or greater than or less than date. 
Main file:
publicclassMain{publicstatic