上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 31 下一页
摘要: 注意点 screenBrightness 取值范围0-1 不是0-255一定要注意 scanForActivity(context) 是根据上下文获取所在的activity如果直接在activity 调用的话使用 this.window.attributes /** * 获取当前屏幕亮度 */ fu 阅读全文
posted @ 2019-07-23 17:09 荣超 阅读(852) 评论(0) 推荐(0)
摘要: 定义接受电源信息的BroadCastReceiver private val batteryBroadcastReceiver = object :BroadcastReceiver(){ override fun onReceive(p0: Context?, p1: Intent?) { whe 阅读全文
posted @ 2019-07-23 14:19 荣超 阅读(178) 评论(0) 推荐(0)
摘要: 新建RoundProgressBar class RoundProgressBar : View { private val paint = Paint() var max = 100 //最大进度 var progress = 0 //当前进度 取值范围 0-max set(value) { fi 阅读全文
posted @ 2019-07-22 16:46 荣超 阅读(448) 评论(0) 推荐(0)
摘要: int color_black = Color.BLACK; int color_white = Color.WHITE; String content = ""; int size = 240; Hashtable<EncodeHintType, String> hints = new Hasht 阅读全文
posted @ 2019-07-20 10:04 荣超 阅读(5563) 评论(2) 推荐(0)
摘要: 使用不显示的fragment来监控activity生命周期,fragment生命周期基本上跟随宿主activity变化。我们通过fragment的生命周期就可以知到activity的生命周期 我们自定义的控件持有这个fragment就可以利用接口监控其生命周期 我这里是在自定义视频播放器的时候使用的 阅读全文
posted @ 2019-07-18 17:17 荣超 阅读(531) 评论(0) 推荐(0)
摘要: item的xml 根标签下添加如下三个属性 android:clickable="true" android:focusable="true" android:background="?android:selectableItemBackground" selectableItemBackgroun 阅读全文
posted @ 2019-07-12 10:30 荣超 阅读(686) 评论(0) 推荐(0)
摘要: <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false"> <!--android:oneshot 是否仅播放一次 false为循环播放--> <item an 阅读全文
posted @ 2019-07-12 09:01 荣超 阅读(485) 评论(0) 推荐(0)
摘要: builder.addInterceptor(chain -> { Request request = chain.request(); Response response = chain.proceed(request); String content = response.body().stri 阅读全文
posted @ 2019-07-08 19:22 荣超 阅读(433) 评论(0) 推荐(0)
摘要: <!-- 背景透明样式 --> <style name="AppTheme.transparent" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowBackground">@color/transparen 阅读全文
posted @ 2019-07-06 10:43 荣超 阅读(2161) 评论(0) 推荐(0)
摘要: springboot 是一样的 我这里就是从springboot哪里拿过来的 (nutzboot2.x已测试可以使用) 排除指定文件 在pom 文件 build 标签内添加 resources <build> <resources> <resource> <filtering>false</filt 阅读全文
posted @ 2019-07-04 16:11 荣超 阅读(496) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 31 下一页