This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.Application | |
| import android.app.DownloadManager | |
| import android.content.Context | |
| import androidx.lifecycle.LiveData | |
| import kotlinx.coroutines.* | |
| import kotlin.coroutines.CoroutineContext | |
| data class DownloadItem(val bytesDownloadedSoFar: Long = -1, val totalSizeBytes: Long = -1, val status: Int) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
| super.onViewCreated(view, savedInstanceState) | |
| // on back pressed call back | |
| val onBackPressedCallback = object : OnBackPressedCallback(true) { | |
| override fun handleOnBackPressed() { | |
| // goto dashboard | |
| val action = | |
| SectionChooseRegistrationFragmentDirections.actionSectionChooseRegistrationFragmentToDashboardActivity() | |
| findNavController().navigate(action) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.***.data.dataStoreManager | |
| import android.content.Context | |
| import androidx.datastore.core.DataStore | |
| import androidx.datastore.preferences.core.* | |
| import androidx.datastore.preferences.preferencesDataStore | |
| import kotlinx.coroutines.flow.Flow | |
| import kotlinx.coroutines.flow.first | |
| import kotlinx.coroutines.flow.map |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Duplicates default main branch to the old master branch | |
| name: Duplicates main to old master branch | |
| # Controls when the action will run. Triggers the workflow on push or pull request | |
| # events but only for the main branch | |
| on: | |
| push: | |
| branches: [ main ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Builder; | |
| use Illuminate\Database\Eloquent\Factories\HasFactory; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Database\Eloquent\Relations\BelongsTo; | |
| use Illuminate\Database\Eloquent\Relations\BelongsToMany; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.shibbir.utils.helpers | |
| import android.app.Activity | |
| import android.content.Context | |
| import android.content.ContextWrapper | |
| object ActivityHelper { | |
| /** | |
| * Get activity | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.shibbir.utils.helpers | |
| import android.content.Context | |
| import android.view.View | |
| import com.google.android.material.snackbar.Snackbar | |
| import com.karumi.dexter.Dexter | |
| import com.karumi.dexter.PermissionToken | |
| import com.karumi.dexter.listener.PermissionDeniedResponse | |
| import com.karumi.dexter.listener.PermissionGrantedResponse | |
| import com.karumi.dexter.listener.PermissionRequest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.shibbir.global | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import androidx.databinding.ViewDataBinding | |
| import androidx.recyclerview.widget.RecyclerView | |
| class DefaultListRecyclerViewAdapter<T>( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.Activity | |
| import android.content.Context | |
| import android.content.ContextWrapper | |
| import android.view.View | |
| object BackIconPressHandler { | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.DatePickerDialog | |
| import android.content.Context | |
| import android.widget.TextView | |
| import java.util.* | |
| object DatePickerHelper { | |
| /** | |
| * Show date picker |