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.geothings.geobingan.ui | |
import android.animation.Animator | |
import android.animation.AnimatorListenerAdapter | |
import android.animation.ValueAnimator | |
import android.content.Context | |
import android.graphics.Color | |
import android.text.Spannable | |
import android.text.SpannableStringBuilder | |
import android.text.style.ForegroundColorSpan |
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
saveImageToPDF(layout, layout.getScreenShot(), fileName) | |
fun View.getScreenShot(): Bitmap { | |
val returnedBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) | |
val canvas = Canvas(returnedBitmap) | |
val bgDrawable = background | |
if (bgDrawable != null) bgDrawable.draw(canvas) | |
else canvas.drawColor(Color.WHITE) | |
draw(canvas) | |
return returnedBitmap |
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
If you want install application programmatically in Android 10, You need to give permission to install app for your application | |
============================================================================== | |
Steps 1: Give permission in Manifest | |
============================================================================== | |
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> | |
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
============================================================================== | |
Step 2: Write provider in Android Manifest |
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
Android Drawable Preview | |
Android WiFiADB | |
ChroMATERIAL | |
Json To Kotlin Class | |
Kotlin Fill Class | |
MAD Scorecard | |
Material Design Icon Generator | |
Material Theme UI | |
Rainbow Brackets | |
Regex Rename Files |
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
https://lankydan.dev/ // nice tutorials | |
https://proandroiddev.com/ // nice tutorials | |
https://medium.com/androiddevelopers | |
https://androidweekly.net/ | |
https://mindorks.com/ | |
https://blog.stylingandroid.com/ === Best Reading | |
https://www.reddit.com/r/androiddev/ === Users | |
https://medium.com/androiddevelopers === Android Developers | |
https://www.uplabs.com/ === Designer resources | |
https://codelabs.developers.google.com/?cat=Android === Android Practice |
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
/** | |
* It took me AGES to figure this out, seriously, exoplayer documentation IS SO BAD. | |
*/ | |
package xxx | |
import android.net.Uri | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import com.cube.arc.R |
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.BroadcastReceiver | |
import android.content.Context | |
import android.content.Intent | |
import android.os.Build | |
class BroadCastReceiver : BroadcastReceiver() { | |
override fun onReceive(context: Context, intent: Intent) | |
{ | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) | |
context.startForegroundService(Intent(context,LocationMonitoringService::class.java)) |
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.util.Base64; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
public class CryptoUtil { | |
private static final String key = "SKs9uZKvZU2VOFjQISEg4tJQyAeqX3Mm"; | |
private static final String initVector = "53og3sqCcKdQl5Ud"; |
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.app.ActivityManager | |
import android.app.Notification | |
import android.app.NotificationManager | |
import android.content.ActivityNotFoundException | |
import android.content.Context | |
import android.content.Intent | |
import android.content.pm.ActivityInfo | |
import android.graphics.* | |
import android.graphics.drawable.Drawable |