Class Utility

java.lang.Object
com.kernelcrew.moodapp.data.Utility

public class Utility extends Object
A utility class for UI related actions.
  • Constructor Details

    • Utility

      public Utility()
  • Method Details

    • hideSoftKeyboard

      public static void hideSoftKeyboard(Activity activity)
      Hide the keyboard if it is open
      Parameters:
      activity - The current activity where the keyboard is active.
    • clearCollection

      public static com.google.android.gms.tasks.Task<Void> clearCollection(com.google.firebase.firestore.CollectionReference collectionRef, int batchSize)
      Recursively deletes all documents in the given collection.
      Parameters:
      collectionRef - The collection to clear.
      batchSize - The maximum number of documents to delete per batch.
      Returns:
      A Task that completes when the collection is empty.