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
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | |
Window w = getWindow(); // in Activity's onCreate() for instance | |
//use this to make transparent both status and navigationbar, add 24dp marginTop to toolbar in xml | |
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); | |
// use this to make transparent status bar, No need to add 24dp marginTop to toolbar. | |
/*w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);*/ | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
w.setExitTransition(null); | |
} | |
} |
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
applicationVariants.all { variant -> | |
variant.resValue "string", "versionName", variant.versionName | |
variant.outputs.all { | |
outputFileName = archivesBaseName | |
outputFileName += "-v" + variant.versionName + "-" + variant.buildType.name + "-" + new Date().format('Mddyyyy') | |
outputFileName += ".apk" | |
} | |
} |
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.text.Editable; | |
import android.text.TextWatcher; | |
import android.widget.EditText; | |
public class CPFFormatter implements TextWatcher { | |
private final String CPF_MASK = "###.###.###-##"; | |
private final char[] CPF_MASK_ARRAY = CPF_MASK.toCharArray(); | |
private boolean isInTextChanged = false; | |
private boolean isInAfterTextChanged = false; |
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.utils; | |
import android.util.Base64; | |
import android.util.Log; | |
import java.io.UnsupportedEncodingException; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.NoSuchProviderException; |
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.app.Activity | |
import android.content.Context | |
import android.util.Log | |
import com.android.billingclient.api.AcknowledgePurchaseParams | |
import com.android.billingclient.api.BillingClient | |
import com.android.billingclient.api.BillingClientStateListener | |
import com.android.billingclient.api.BillingFlowParams | |
import com.android.billingclient.api.BillingResult | |
import com.android.billingclient.api.Purchase | |
import com.android.billingclient.api.PurchasesUpdatedListener |
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.animation.AnimatorSet | |
import android.animation.ObjectAnimator | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.util.AttributeSet | |
import android.view.GestureDetector | |
import android.view.MotionEvent | |
import android.view.View | |
import android.widget.FrameLayout | |
import androidx.core.view.GestureDetectorCompat |
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.ContentUris | |
import android.content.Context | |
import android.database.Cursor | |
import android.net.Uri | |
import android.os.Build | |
import android.os.Environment | |
import android.provider.DocumentsContract | |
import android.provider.MediaStore | |
import java.io.File | |
import java.io.FileOutputStream |
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.text.Editable | |
import android.text.TextWatcher | |
import android.widget.EditText | |
/** | |
* @author Hitesh | |
* @version 1.0 | |
* @since 14-08-2019 | |
*/ |
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 os | |
import shutil | |
import sys | |
if len(sys.argv)>1: | |
rootdir = sys.argv[1] | |
else: | |
# rootdir = os.path.dirname(os.path.realpath(__file__)) | |
#rootdir = 'D:\\example\\projects\\project name' | |
rootdir = 'D:\\AndroidStuioWS\\Good-work\\good-work-android' |
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.util.Base64; | |
import java.nio.ByteBuffer; | |
import java.security.SecureRandom; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
/** |
NewerOlder