Note: This is just a quickly hacked together task
To Use:
- Paste the task below in a gradle build file
- Call
gradle invalidate -Pdependency=group:name:version
substituting the dependency you want to invalidate.
//Override in your touch-enabled view (this can be differen than the view you use for displaying the cam preview) | |
@Override | |
public boolean onTouch(View view, MotionEvent motionEvent) { | |
final int actionMasked = motionEvent.getActionMasked(); | |
if (actionMasked != MotionEvent.ACTION_DOWN) { | |
return false; | |
} | |
if (mManualFocusEngaged) { | |
Log.d(TAG, "Manual focus already engaged"); | |
return true; |
package bapspatil.pantheon.utils; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import java.io.IOException; | |
import bapspatil.pantheon.network.RetrofitAPI; | |
import okhttp3.Cache; |
object StringUtils { | |
fun format(context: Context?, value: Float?): String? { | |
return trimZero(context?.resources?.getString(R.string.float_format, value ?: 0f)) | |
} | |
fun format(context: Context?, value: Int?): String? { | |
return trimZero(context?.resources?.getString(R.string.int_format, value ?: 0)) | |
} | |
fun trimTrailingZero(value: String?): String? { |
package com.mirrordust.gpscellinfodemo; | |
public class BaseStation { | |
private int mcc; // Mobile Country Code | |
private int mnc; // Mobile Network Code | |
private int lac; // Location Area Code or TAC(Tracking Area Code) for LTE |
02/10 13:36:14: Launching 'app' on samsung SM-A505F. | |
Install successfully finished in 5 s 489 ms. | |
$ adb shell am start -n "com.bongobd.demo/com.bongobd.demo.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER | |
Connected to process 25935 on device 'samsung-sm_a505f-R58M848MENN'. | |
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. | |
D/ActivityThread: handleBindApplication()++ app=com.bongobd.demo | |
D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar | |
D/ActivityThread: handleBindApplication() -- skipGraphicsSupport=false | |
D/ActivityThread: ActivityThread::handleMakeApplication() data=AppBindData{appInfo=ApplicationInfo{eabdb33 com.bongobd.demo}} appContext=android.app.ContextImpl@8680ef0 appContext.mOpPackageName=com.bongobd.demo appContext.mBasePackageName=com.bongobd.demo appContext.mPackageInfo=android.app.LoadedApk@67bac69 data.restrictedBa |
@Module | |
@InstallIn(SingletonComponent::class) | |
object AppModule { | |
@Provides | |
@Singleton | |
fun provideRetrofit(client: OkHttpClient): Retrofit = Retrofit.Builder() | |
.baseUrl(BASE_URL) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.client(client) | |
.build() |
https://betterprogramming.pub/unit-testing-api-specific-code-on-android-cee08dd2dd1 | |
https://premsinghsodha7.medium.com/kotlin-how-to-write-code-more-readable-and-clean-best-practices-ac6cac160f3d | |
*** https://kapilvij.medium.com/kotlin-interview-cheat-sheet-c62e7850ba73 | |
https://medium.com/@bhakadepatil/design-patterns-in-android-with-kotlin-a64484665eeb | |
https://medium.com/androiddevelopers/dependency-injection-on-android-with-hilt-67b6031e62d | |
https://medium.com/androiddevelopers/room-coroutines-422b786dc4c5 | |
https://proandroiddev.com/how-we-reduced-our-gradle-build-times-by-over-80-51f2b6d6b05b | |
https://www.raywenderlich.com/7109-test-driven-development-tutorial-for-android-getting-started | |
Unit and Espresso Testing: https://www.youtube.com/watch?v=3weiK_qKuSI&ab_channel=DJMalone | |
MVI: https://medium.com/@soundhar.p03/android-mvi-architecture-230cd30e40b4 |
# This command sets the author name and email address respectively to be used with your commits. | |
# command : 'git config' | |
Usage: | |
git config –global user.name “[name]” | |
git config –global user.email “[email address]” | |
# Initialize git | |
Usage: | |
git init [repository name] | |
# Git clone repository |
package com.fourshop.customer.utils.extentions | |
import android.os.Handler | |
import androidx.annotation.DimenRes | |
import androidx.annotation.DrawableRes | |
import androidx.appcompat.widget.AppCompatImageView | |
import com.bumptech.glide.load.engine.DiskCacheStrategy | |
import com.bumptech.glide.load.resource.bitmap.CenterCrop | |
import com.bumptech.glide.load.resource.bitmap.RoundedCorners |