This file contains 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.ContentValues | |
import android.graphics.Bitmap | |
import android.os.Build | |
import android.provider.MediaStore | |
import androidx.fragment.app.Fragment | |
import timber.log.Timber | |
import java.io.IOException | |
/** |
This file contains 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.os.Bundle | |
import android.os.Parcelable | |
import java.io.Serializable | |
import androidx.fragment.app.Fragment | |
import kotlin.properties.ReadWriteProperty | |
import kotlin.reflect.KProperty | |
class FragmentArgumentDelegate<T : Any> : | |
ReadWriteProperty<Fragment, T> { |
This file contains 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.Intent | |
import android.os.Bundle | |
import android.os.Parcelable | |
import timber.log.Timber | |
import java.io.Serializable | |
inline fun <reified T : Parcelable> Bundle.putWithClassNameKey(parcelable: T?) { | |
parcelable?.let { putParcelable(T::class.java.simpleName, parcelable) } | |
} |
This file contains 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
internal class SavedState : BaseSavedState { | |
var isExpanded: Boolean = false | |
constructor(superState: Parcelable) : super(superState) | |
constructor(source: Parcel) : super(source) { | |
isExpanded = source.readBoolean() | |
} | |
constructor(source: Parcel?, loader: ClassLoader?) : super(source, loader) |
This file contains 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
class Fragment() { | |
private fun initViews() = with(binding) { | |
pager.setPageTransformer { page, pos -> | |
if (pos == 0.0F) { | |
updatePagerHeightForChild(page, pager) | |
} | |
} | |
} |
OlderNewer