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.example.db.dao | |
import android.annotation.SuppressLint | |
import android.os.AsyncTask | |
import android.os.Process | |
import android.os.Process.THREAD_PRIORITY_BACKGROUND | |
import android.util.Log | |
import java.util.ArrayList |
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.example | |
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.graphics.Rect | |
import android.view.View | |
import android.view.ViewTreeObserver | |
import androidx.lifecycle.LiveData | |
import java.lang.ref.WeakReference |
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.example | |
import android.content.res.Resources | |
val Int.iPx2Dp: Int get() = (this / Resources.getSystem().displayMetrics.density).toInt() | |
val Int.iDp2Px: Int get() = (this * Resources.getSystem().displayMetrics.density).toInt() | |
val Int.fPx2Dp: Float get() = this / Resources.getSystem().displayMetrics.density | |
val Int.fDp2Px: Float get() = this * Resources.getSystem().displayMetrics.density | |
val Float.iPx2Dp: Int get() = (this / Resources.getSystem().displayMetrics.density).toInt() | |
val Float.iDp2Px: Int get() = (this * Resources.getSystem().displayMetrics.density).toInt() |
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 ir.dariacard | |
import android.text.Editable | |
import android.text.TextUtils | |
import android.text.TextWatcher | |
import androidx.annotation.NonNull | |
import androidx.appcompat.widget.AppCompatEditText | |
import java.lang.Exception | |
import java.text.NumberFormat |
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 ir.dariacard.view | |
import android.animation.AnimatorSet | |
import android.animation.ObjectAnimator | |
import android.view.View | |
import androidx.recyclerview.widget.RecyclerView | |
import kotlinx.android.extensions.LayoutContainer | |
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.PorterDuff |
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.Manifest | |
import android.annotation.SuppressLint | |
import android.app.* | |
import android.content.* | |
import android.content.pm.PackageManager | |
import android.content.pm.ShortcutInfo | |
import android.content.pm.ShortcutManager | |
import android.content.res.ColorStateList | |
import android.content.res.Configuration | |
import android.content.res.Resources |
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
... | |
buildTypes { | |
debug { | |
debuggable true | |
minifyEnabled true | |
shrinkResources true | |
... | |
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), | |
'PathToProjectsDir\\proguard-rules-debug.pro' | |
} |
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
val width = getScreenWidth() | |
val height = getScreenHeight() | |
val min = min(width, height) | |
val radius = min/2 * 4/5 | |
val center = PointF(0f, 0f) | |
val points = Array(5) { PointF() } | |
val angle36 = toRadians(36.0) | |
val angle72 = toRadians(72.0) |
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
#! /bin/zsh | |
# Buttery powered state | |
adb shell dumpsys battery | grep powered | |
# Unplug battery | |
adb shell dumpsys battery unplug | |
# Reset battery | |
adb shell dumpsys battery reset |
OlderNewer