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
package be.brol | |
import android.os.Binder | |
import android.os.Bundle | |
import android.support.v4.app.BundleCompat | |
import android.support.v4.app.Fragment | |
/** | |
* Eases the Fragment.newInstance ceremony by marking the fragment's args with this delegate | |
* Just write the property in newInstance and read it like any other property after the fragment has been created |
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
<provider | |
android:name=".GenericFileProvider" | |
android:authorities="${applicationId}" | |
android:exported="false" | |
android:grantUriPermissions="true"> | |
<meta-data | |
android:name="android.support.FILE_PROVIDER_PATHS" | |
android:resource="@xml/provider_paths"/> | |
</provider> |
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
//4 bytes for "OggS", 2 unused bytes, 8 bytes for length | |
private const val OGG_OFFSET = 8 + 2 + 4 | |
private val OGGS_BYTES = "OggS".map(Char::toByte).toByteArray() | |
private val VORBIS_BYTES = "vorbis".map(Char::toByte).toByteArray() | |
fun ByteArray.slice(start: Int, len: Int) = copyOfRange(start, start + len) | |
@Throws(IOException::class) | |
fun calculateOggDuration(oggFile: File): Pair<Int, Int> { | |
var rate = -1 | |
var length = -1 |
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
package com.github.irshulx.glitchtext; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Color; | |
import android.text.TextUtils; | |
import android.util.AttributeSet; | |
import android.util.TypedValue; | |
import android.view.Gravity; | |
import android.view.View; |
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
new AsyncTask<Integer, Void, Void>(){ | |
@Override | |
protected Void doInBackground(Integer... params) { | |
// main logic | |
return null; | |
} | |
}.execute(0); |
NewerOlder