kotlin

MPAndroidChart: Change Shape of Bar Chart

不打扰是莪最后的温柔 提交于 2021-02-19 07:24:18
问题 i already read answers of question that similar to mine. but, i don't understand and i think that's so complex. maybe some of you have a trick how to make it simple. i am using 'com.github.PhilJay:MPAndroidChart:v2.2.4' library, btw. i want to make a bar chart style like this picture. the corner of rectangle has radius about 4dp . i haven't found any method to draw that. 回答1: Looks like there is no way to make it simple. Finally I came up with a clumsy, but working solution which worked well

MPAndroidChart: Change Shape of Bar Chart

家住魔仙堡 提交于 2021-02-19 07:22:38
问题 i already read answers of question that similar to mine. but, i don't understand and i think that's so complex. maybe some of you have a trick how to make it simple. i am using 'com.github.PhilJay:MPAndroidChart:v2.2.4' library, btw. i want to make a bar chart style like this picture. the corner of rectangle has radius about 4dp . i haven't found any method to draw that. 回答1: Looks like there is no way to make it simple. Finally I came up with a clumsy, but working solution which worked well

Kotlin Multiplatform - ERROR ITMS-90171: Invalid Bundle Structure

淺唱寂寞╮ 提交于 2021-02-19 06:07:30
问题 I've a problem trying to distribute my iOS app with Kotlin Multiplatform on the Apple App Store: ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'Smiledu_app.app/Frameworks/shared.framework/shared' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure." This

Kotlin Multiplatform - ERROR ITMS-90171: Invalid Bundle Structure

只愿长相守 提交于 2021-02-19 06:07:28
问题 I've a problem trying to distribute my iOS app with Kotlin Multiplatform on the Apple App Store: ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'Smiledu_app.app/Frameworks/shared.framework/shared' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure." This

Android UI Not Crashing When Modifying View off UI Thread

喜夏-厌秋 提交于 2021-02-19 01:35:29
问题 Scenario: I ran into a strange issue while testing out threads in my fragment. I have a fragment written in Kotlin with the following snippet in onResume(): override fun onResume() { super.onResume() val handlerThread = HandlerThread("Stuff") handlerThread.start() val handler = Handler(handlerThread.looper) handler.post { Thread.sleep(2000) tv_name.setText("Something something : " + isMainThread()) } } is MainThread() is a function that checks if the current thread is the main thread like so:

'ACTION_MEDIA_SCANNER_SCAN_FILE:String' is deprecated

左心房为你撑大大i 提交于 2021-02-19 00:44:26
问题 activity?.sendBroadcast(Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,Uri.fromFile(copyFile))) I got the warning "ACTION_MEDIA_SCANNER_SCAN_FILE is deprecated." in above code Is there a simple replacement code? Thank you 回答1: ACTION_MEDIA_SCANNER_SCAN_FILE Deprecated! You can use the following Java File file = new File(filePath); MediaScannerConnection.scanFile(context, new String[]{file.toString()}, null, null); Kotlin val file = File(filePath) MediaScannerConnection.scanFile(context, arrayOf

Koin Android: org.koin.error.NoBeanDefFoundException

南笙酒味 提交于 2021-02-18 22:35:08
问题 Got that message error java.lang.RuntimeException: Unable to create application com.app.name.application.MainApplication: org.koin.error.BeanInstanceCreationException: Can't create bean Bean[class=com.app.name.general.preferences.Preferences] due to error : org.koin.error.NoBeanDefFoundException: No definition found to resolve type 'android.app.Application'. Check your module definition at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5830) at android.app.ActivityThread

Why do Kotlin files appear as .java is Fabric Crashlytics with Proguard enabled?

淺唱寂寞╮ 提交于 2021-02-18 22:09:17
问题 I have recently turned on Proguard minimisation for an Android app which uses Crashylics reporting on the Fabric console. The project is written mainly in Kotlin. Crash reports are still received. The stack trace no longer lists Kotlin source files as .kt though, but as .java eg, MyFragment.java:20 instead of MyFragment.kt:20 From the information in the traces, such as function and variable names, the line numbers in the stack match up to those in the .kt file I have Proguard exclusions as

Why do Kotlin files appear as .java is Fabric Crashlytics with Proguard enabled?

流过昼夜 提交于 2021-02-18 22:07:44
问题 I have recently turned on Proguard minimisation for an Android app which uses Crashylics reporting on the Fabric console. The project is written mainly in Kotlin. Crash reports are still received. The stack trace no longer lists Kotlin source files as .kt though, but as .java eg, MyFragment.java:20 instead of MyFragment.kt:20 From the information in the traces, such as function and variable names, the line numbers in the stack match up to those in the .kt file I have Proguard exclusions as

Why do Kotlin files appear as .java is Fabric Crashlytics with Proguard enabled?

耗尽温柔 提交于 2021-02-18 22:04:19
问题 I have recently turned on Proguard minimisation for an Android app which uses Crashylics reporting on the Fabric console. The project is written mainly in Kotlin. Crash reports are still received. The stack trace no longer lists Kotlin source files as .kt though, but as .java eg, MyFragment.java:20 instead of MyFragment.kt:20 From the information in the traces, such as function and variable names, the line numbers in the stack match up to those in the .kt file I have Proguard exclusions as