├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable │ │ │ │ ├── img_android.jpeg │ │ │ │ ├── shape_gradient_bar.xml │ │ │ │ ├── ic_build.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── activity_java.xml │ │ │ │ ├── toolbar.xml │ │ │ │ ├── activity_catalog.xml │ │ │ │ ├── activity_vibrator.xml │ │ │ │ ├── activity_sdcard.xml │ │ │ │ ├── activity_status_bar_slide.xml │ │ │ │ ├── activity_status_bar_image.xml │ │ │ │ ├── activity_toast.xml │ │ │ │ ├── activity_brightness.xml │ │ │ │ ├── activity_status_bar.xml │ │ │ │ ├── activity_app_info.xml │ │ │ │ ├── activity_keyboard.xml │ │ │ │ ├── activity_intent.xml │ │ │ │ ├── activity_navigation_bar.xml │ │ │ │ ├── activity_status_bar_change_color.xml │ │ │ │ ├── activity_spannable.xml │ │ │ │ ├── activity_view.xml │ │ │ │ ├── activity_time.xml │ │ │ │ ├── activity_regex.xml │ │ │ │ ├── activity_log.xml │ │ │ │ └── activity_screen.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── ic_launch-web.png │ │ ├── ic_launcher-web.png │ │ ├── java │ │ │ └── com │ │ │ │ └── lindroid │ │ │ │ └── androidutilsktdemo │ │ │ │ ├── activity │ │ │ │ ├── ToastActivity.kt │ │ │ │ ├── statusbar │ │ │ │ │ ├── StatusBarSlideActivity.kt │ │ │ │ │ ├── StatusBarActivity.kt │ │ │ │ │ ├── StatusBarImageActivity.kt │ │ │ │ │ └── StatusBarChangeColorActivity.kt │ │ │ │ ├── SDCardActivity.kt │ │ │ │ ├── AppInfoActivity.kt │ │ │ │ ├── NavigationBarActivity.kt │ │ │ │ ├── KeyboardActivity.kt │ │ │ │ ├── VibratorActivity.kt │ │ │ │ ├── SpannableActivity.kt │ │ │ │ ├── TimeActivity.kt │ │ │ │ ├── IntentActivity.kt │ │ │ │ ├── CatalogActivity.kt │ │ │ │ ├── ViewActivity.kt │ │ │ │ ├── RegexActivity.kt │ │ │ │ └── BrightnessActivity.kt │ │ │ │ ├── JavaActivity.java │ │ │ │ ├── app │ │ │ │ └── App.kt │ │ │ │ ├── base │ │ │ │ └── BaseActivity.kt │ │ │ │ ├── receiver │ │ │ │ └── ScreenActionReceiver.kt │ │ │ │ └── util │ │ │ │ └── PermissionUtil.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── lindroid │ │ │ └── androidutilsktdemo │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── lindroid │ │ └── androidutilsktdemo │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── androidutilskt ├── .gitignore ├── build.gradle ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── lindroid │ │ │ └── androidutilskt │ │ │ ├── extension │ │ │ ├── logcat │ │ │ │ ├── logstrategy │ │ │ │ │ ├── LogStrategy.kt │ │ │ │ │ ├── LogcatLogStrategy.kt │ │ │ │ │ └── DiskLogStrategy.kt │ │ │ │ ├── formatstrategy │ │ │ │ │ ├── FormatStrategy.kt │ │ │ │ │ └── CsvFormatStrategy.kt │ │ │ │ ├── logadapter │ │ │ │ │ ├── LogAdapter.kt │ │ │ │ │ ├── DiskLogAdapter.kt │ │ │ │ │ └── AndroidLogAdapter.kt │ │ │ │ ├── LogLevel.kt │ │ │ │ ├── printer │ │ │ │ │ └── Printer.kt │ │ │ │ ├── DiskConfig.kt │ │ │ │ ├── LogConfig.kt │ │ │ │ └── LogUtil.kt │ │ │ ├── NumberUtil.kt │ │ │ ├── ClipboardUtil.kt │ │ │ ├── DensityUtil.kt │ │ │ ├── SDCardUtil.kt │ │ │ ├── KeyboardUtil.kt │ │ │ ├── NavBarStatusWatcher.kt │ │ │ ├── NetworkUtil.kt │ │ │ ├── RegexUtil.kt │ │ │ ├── ResourceUtil.kt │ │ │ ├── BitmapUtil.kt │ │ │ ├── AppUtil.kt │ │ │ ├── ToastUtil.kt │ │ │ ├── BrightnessUtil.kt │ │ │ ├── KeyboarStatusWatcher.kt │ │ │ ├── ViewUtil.kt │ │ │ ├── statusbar │ │ │ │ └── DeviceUtil.kt │ │ │ ├── SpUtil.kt │ │ │ └── NavigationBarUtil.kt │ │ │ ├── statics │ │ │ ├── VibratorUtil.kt │ │ │ ├── IntentUtil.kt │ │ │ └── AppManager.kt │ │ │ └── app │ │ │ └── AndUtil.kt │ │ └── res │ │ └── values │ │ └── strings.xml └── proguard-rules.pro ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── markdown-navigator │ └── profiles_settings.xml ├── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── vcs.xml ├── render.experimental.xml ├── misc.xml ├── runConfigurations.xml ├── gradle.xml └── inspectionProfiles │ └── Project_Default.xml ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── .svn └── pristine │ └── 96 │ └── 96e650c5285528ac68052ac4a64de7bc4747b3fd.svn-base └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /androidutilskt/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':androidutilskt' 2 | -------------------------------------------------------------------------------- /androidutilskt/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/androidutilskt/build.gradle -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/ic_launch-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/ic_launch-web.png -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_android.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/drawable/img_android.jpeg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lindroy/AndroidUtilsKt/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/render.experimental.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | /.idea/caches 6 | /.idea/libraries 7 | /.idea/modules.xml 8 | /.idea/workspace.xml 9 | /.idea/navEditor.xml 10 | /.idea/assetWizardSettings.xml 11 | .DS_Store 12 | /build 13 | /captures 14 | .externalNativeBuild 15 | /.svn -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Feb 27 09:59:18 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #1976D2 4 | #1976D2 5 | #0288D1 6 | 7 | #CDCDCD 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /androidutilskt/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_gradient_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_java.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /androidutilskt/src/main/java/com/lindroid/androidutilskt/extension/logcat/logstrategy/LogStrategy.kt: -------------------------------------------------------------------------------- 1 | package com.lindroid.androidutilskt.extension.logcat.logstrategy 2 | 3 | import com.lindroid.androidutilskt.extension.logcat.LogLevel 4 | 5 | 6 | /** 7 | * @author Lin 8 | * @date 2019/3/19 9 | * @function Logcat日志打印策略 10 | * @Description 11 | */ 12 | 13 | interface LogStrategy { 14 | fun log(@LogLevel level: Int, tag: String?, message: String) 15 | } -------------------------------------------------------------------------------- /androidutilskt/src/main/java/com/lindroid/androidutilskt/extension/logcat/formatstrategy/FormatStrategy.kt: -------------------------------------------------------------------------------- 1 | package com.lindroid.androidutilskt.extension.logcat.formatstrategy 2 | 3 | import com.lindroid.androidutilskt.extension.logcat.LogLevel 4 | 5 | /** 6 | * @author Lin 7 | * @date 2019/3/19 8 | * @function 设置日志打印格式接口 9 | * @Description 10 | */ 11 | 12 | interface FormatStrategy { 13 | fun log(@LogLevel level: Int, tag: String?, message: String) 14 | } -------------------------------------------------------------------------------- /androidutilskt/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AndroidUtilsKt 3 | 请选择浏览器 4 | 5 | 昨天 6 | 前天 7 | 1分钟前 8 | 分钟前 9 | %d小时前 10 | 11 | -------------------------------------------------------------------------------- /app/src/test/java/com/lindroid/androidutilsktdemo/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.lindroid.androidutilsktdemo 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /androidutilskt/src/main/java/com/lindroid/androidutilskt/extension/logcat/logstrategy/LogcatLogStrategy.kt: -------------------------------------------------------------------------------- 1 | package com.lindroid.androidutilskt.extension.logcat.logstrategy 2 | 3 | import android.util.Log 4 | import com.lindroid.androidutilskt.extension.logcat.LogLevel 5 | 6 | /** 7 | * @author Lin 8 | * @date 2019/3/21 9 | * @function 日志策略 10 | * @Description 11 | */ 12 | private const val DEFAULT_TAG = "DEFAULT_TAG" 13 | 14 | class LogcatLogStrategy : LogStrategy { 15 | 16 | override fun log(@LogLevel level: Int, tag: String?, message: String) { 17 | Log.println(level, tag ?: DEFAULT_TAG, message) 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | -------------------------------------------------------------------------------- /androidutilskt/src/main/java/com/lindroid/androidutilskt/extension/logcat/logadapter/LogAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.lindroid.androidutilskt.extension.logcat.logadapter 2 | 3 | import com.lindroid.androidutilskt.extension.logcat.LogLevel 4 | 5 | /** 6 | * @author Lin 7 | * @date 2019/3/19 8 | * @function 9 | * @Description 10 | */ 11 | interface LogAdapter { 12 | 13 | /** 14 | * 设置是否打印日志 15 | */ 16 | fun isLoggable(@LogLevel level: Int, tag: String?): Boolean 17 | 18 | /** 19 | * 所有日志的打印通道 20 | */ 21 | fun log(@LogLevel level: Int, tag: String?, message: String) 22 | 23 | /** 24 | * 是否是临时的设置 25 | */ 26 | fun isTempAdapter(): Boolean 27 | } -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/lindroid/androidutilsktdemo/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.lindroid.androidutilsktdemo 2 | 3 | import android.support.test.InstrumentationRegistry 4 | import android.support.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.lindroid.androidutilsktdemo", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /androidutilskt/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /androidutilskt/src/main/java/com/lindroid/androidutilskt/extension/NumberUtil.kt: -------------------------------------------------------------------------------- 1 | package com.lindroid.androidutilskt.extension 2 | 3 | import java.text.NumberFormat 4 | 5 | /** 6 | * @author Lin 7 | * @date 2019/6/1 8 | * @function 9 | * @Description 10 | */ 11 | /** 12 | * 去除小数点后面的0 13 | * @see removeLastZero 14 | */ 15 | fun String?.removeLastZero(isGroupingUsed: Boolean = false) = when (isNullOrEmpty()) { 16 | true -> "" 17 | false ->this!!.toDouble().removeLastZero(isGroupingUsed) 18 | } 19 | 20 | /** 21 | * 去除小数点后面的0 22 | * @param isGroupingUsed:是否使用千分分隔符,默认为false不使用 23 | */ 24 | fun Double?.removeLastZero(isGroupingUsed: Boolean = false) = when (this == null) { 25 | true -> "" 26 | false -> { 27 | NumberFormat.getInstance().let { 28 | it.isGroupingUsed = isGroupingUsed 29 | it.format(this) ?: "" 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /androidutilskt/src/main/java/com/lindroid/androidutilskt/extension/ClipboardUtil.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("ClipboardUtil") 2 | package com.lindroid.androidutilskt.extension 3 | 4 | import android.content.ClipData 5 | import android.content.ClipboardManager 6 | import android.content.Context 7 | import com.lindroid.androidutilskt.app.AndUtil 8 | 9 | /** 10 | * @author Lin 11 | * @date 2018/11/21 12 | * @function 复制工具类 13 | * @Description 14 | */ 15 | 16 | /** 17 | * 复制纯文本 18 | * @param text: 需要复制的文本 19 | * @param label: 用户可见的对复制数据的描述 20 | * @return 是否复制成功 21 | */ 22 | @JvmOverloads 23 | fun clipPlainText(text: CharSequence, label: CharSequence = ""): Boolean { 24 | val cm = AndUtil.appContext.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager 25 | val clipData = ClipData.newPlainText(label, text) 26 | cm.primaryClip = clipData 27 | return cm.hasPrimaryClip() 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_vibrator.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 |