Posts

Showing posts from April, 2023

Set icon zoom in , zoom out and set icon stroke (line) width.

  <vector xmlns: android ="http://schemas.android.com/apk/res/android" android :width ="28dp" android :height ="28dp" android :viewportWidth ="24" android :viewportHeight ="24" > <group android :scaleX ="0.9" android :scaleY ="0.9" android :pivotX ="12" android :pivotY ="12" > <path android :fillColor ="@color/colorMenuUnselect" android :strokeWidth ="0.3" android :strokeColor ="@color/colorMenuUnselect" android :pathData ="M24,8V2a2,2,0,0,0-2-2H16V2h4.586L12,10.586,3.414,2H8V0H2A2,2,0,0,0,0,2V8H2V3.414L10.586,12,2,20.586V16H0v6a2,2,0,0,0,2,2H8V22H3.414L12,13.414,20.586,22H16v2h6a2,2,0,0,0,2-2V16H22v4.586L13.414,12,22,3.414V8Z" /> </group> </vector>

Manage Fragement - Backspace

//Below code work in first fragement and if you press backspace in any fragement it detect in first fragement only in viewpager2 override fun onCreateView ( inflater: LayoutInflater , container: ViewGroup? , savedInstanceState: Bundle? ): View? { try { // This callback will only be called when MyFragment is at least Started. requireActivity(). onBackPressedDispatcher . addCallback ( this ) { // Handle the back button event if ( noteEditMode ) { if ( isPopupMenuBarVisible ) { showPopupMenu( false ) //hide popupMenubar } else { listNoteDocuments() if ( etBook . text . trim (). isEmpty ()) {deleteFile( actualFileName , "" )} //If note is empty then delete this note. } } else if ( mViewPager . currentItem == 0 || mViewPager . currentItem == 4 ) { ...