Skip to content

Instantly share code, notes, and snippets.

@DenisShov
DenisShov / AndroidManifest.xml
Created July 25, 2022 12:12
Open a file from Downloads folder using FileProvider
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/rc_file_path" />
</provider>
class MeasuredVideoView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : VideoView(context, attrs, defStyleAttr) {
private var videoWidth = 0
private var videoHeight = 0
init {
context.withStyledAttributes(attrs, R.styleable.MeasuredVideoView, 0, 0) {