For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
| <!-- Drop Shadow Stack --> | |
| <item> | |
| <shape> | |
| <padding | |
| android:bottom="1dp" | |
| android:left="1dp" | |
| android:right="1dp" |
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
| val compressWork = OneTimeWorkRequestBuilder<CompressPhotoWorker>().build() | |
| val uploadWork = OneTimeWorkRequestBuilder<UploadPhotoWorker>().bu1ld() | |
| workManager.beginWith(compressWork).then(uploadWork).enqueue() |
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
| val constraints= Constraints.Builder() | |
| .setRequiredNetworkType(NetworkType.CONNECTED) | |
| .build() | |
| val request= OneTimeWorkRequestBuilder<UploadPhotoWocker>() | |
| .setConstraints(constraints) | |
| .build() | |
| WorkManager.getInstance().enqueue(request) |
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
| class UploadPhotoWorker : Worker(){ | |
| override fun doWork(): Worker Result{ | |
| //Upload Task | |
| uploadPhoto() | |
| return WorkerResult.SUCCESS | |
| } | |
| } | |
| val request: WorkRequest= OneTimeWorkRequestBuilder<UploadPhotoWorker>().build() | |
| WorkManager.getInstance().enqueue (request) |