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.yourapp.ui | |
import android.content.ClipboardManager | |
import android.content.Context | |
import android.graphics.Rect | |
import android.util.AttributeSet | |
import android.view.KeyEvent | |
import android.view.View | |
import androidx.appcompat.widget.AppCompatEditText | |
import androidx.core.widget.doAfterTextChanged |
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 kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.TestCoroutineDispatcher | |
import kotlinx.coroutines.test.TestCoroutineScope | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.setMain | |
import org.junit.jupiter.api.extension.AfterEachCallback | |
import org.junit.jupiter.api.extension.BeforeEachCallback | |
import org.junit.jupiter.api.extension.ExtensionContext |
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
### Keybase proof | |
I hereby claim: | |
* I am alvindizon on github. | |
* I am admdizon (https://keybase.io/admdizon) on keybase. | |
* I have a public key ASDGH9f1Dlyjd5ca8lSGN1qEZTRMN14md_MdfUeYyI5FuAo | |
To claim this, I am signing this object: |
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 you are using a drawable on an imageview on a layout, --> | |
<!-- in order for the night color values to take effect, use/reference color attributes in this manner: --> | |
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="24dp" | |
android:height="24dp" | |
android:viewportWidth="24" | |
android:viewportHeight="24"> | |
<path | |
android:fillColor="?attr/colorOnSurface" |
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
defaultConfig { | |
applicationId "com.internal.app" | |
... | |
} | |
buildTypes { | |
debug{ | |
... | |
} | |
release { | |
... |
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 ThreadPoolExecutor( | |
3, | |
Integer.MAX_VALUE, | |
60, | |
TimeUnit.SECONDS, | |
new SynchronousQueue<Runnable>() | |
); |
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
try(FileChannel in = new FileInputStream(src).getChannel(); | |
FileChannel out = new FileOutputStream(dest).getChannel() ) { | |
in.transferTo(0, in.size(), out); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} |
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 Thread(() -> { | |
String errorPath = Environment.getExternalStorageDirectory().getPath() + | |
File.separator + Const.TEST_FILE_FOLDER; | |
File exceptionFolder = new File(errorPath); | |
if(!exceptionFolder.exists()) { | |
exceptionFolder.mkdir(); | |
} | |
File errFile = new File(errorPath + File.separator + Const.TEST_FILE); | |
if(!errFile.exists()) { | |
try { |
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
public class UDPClient { | |
private static final String TAG = UDPClient.class.getSimpleName(); | |
private static class Holder{ | |
public static UDPClient udpClient = new UDPClient(); | |
} | |
public static UDPClient getUdpClient() { | |
return Holder.udpClient; | |
} |