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.content.Context | |
| import android.widget.ArrayAdapter | |
| import android.widget.Filter | |
| import androidx.annotation.LayoutRes | |
| open class NoFilterArrayAdapter<T>(context: Context, @LayoutRes resource: Int, items: List<T>) : | |
| ArrayAdapter<T>(context, resource, items) { | |
| override fun getFilter(): Filter { |
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
| /** | |
| * Use these classes to implement pagination without paging libs | |
| */ | |
| import android.annotation.SuppressLint | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import androidx.recyclerview.widget.DiffUtil |
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
| /** | |
| * Kotlin extensions you can use in any project that solves common problems in Android | |
| */ | |
| fun Checkable.setOnCheckableSafeClick(view: View, listener: () -> Unit) { | |
| view.setOnTouchListener { _, event -> | |
| if (event.action == MotionEvent.ACTION_UP) | |
| listener() | |
| true |
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
| /** | |
| * You can use this helper class in your fragment using composition to select files from gallery/camera | |
| */ | |
| import android.Manifest | |
| import android.app.Activity | |
| import android.content.Intent | |
| import android.content.pm.PackageManager | |
| import android.graphics.Bitmap |
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.Manifest | |
| import android.net.Uri | |
| import android.os.Build | |
| import androidx.activity.result.ActivityResultLauncher | |
| import androidx.activity.result.contract.ActivityResultContracts | |
| import androidx.fragment.app.Fragment | |
| class FileMultipleSelectorHelper( | |
| fragment: Fragment, |
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
| # ============================= | |
| # Fastlane CI/CD Example (Sanitized Template) | |
| # This Fastfile was adapted from a production Android app and sanitized for public sharing. | |
| # Replace placeholders like `MyApp`, `@team`, package name, and environment variable names with your own values. | |
| # All sensitive data (keystores, service account JSON, app/package IDs, Slack webhook) must be supplied via | |
| # environment variables / GitHub Actions secrets – never commit them. | |
| # Use `bundle install` then always run lanes with `bundle exec fastlane <lane>`. | |
| # ============================= | |
| # Make sure to have bundler and fastlane installed and then run "bundle install", and always use "bundle exec" not fastlane directly |