我的个人小站
03
16
常用的数学的数 常用的数学的数
表示 意义 约等于Math.E e 2.718Math.PI 圆周率 3.14Math.SQRT2 2的平方根 1.414Math.LN2 2的自然对数 0.693 方法 作用Math.abs(x) 求x的绝对值Math.pow(x,y)
2020-03-16
16
16
获取屏幕高度和宽度 获取屏幕高度和宽度
参考文章:https://blog.csdn.net/u012527802/article/details/44645731 前面有几个方法已经过时了,我们使用新的方法。 this是一个activity对象 WindowManager ma
2020-03-16
16
复制到剪贴板 复制到剪贴板
参考:https://blog.csdn.net/qq_22078107/article/details/53447905 //获取剪贴板管理器: ClipboardManager cm = (ClipboardManager) getS
2020-03-16
15
dialog旋转动画效果 dialog旋转动画效果
参考这篇文章:https://blog.csdn.net/student9128/article/details/77324498 自己定义一个旋转的类。 /** * An animation that rotates the view
2020-03-15
15
自定义dialog 自定义dialog
虽然网上的对话框还是挺好看的,但是实现不了我想要的效果,所以每办法,只能自己来实现了,不过好在其实实现并不是很难。 实际代码如下: public class FriendDialog extends Dialog{ private
2020-03-15
15
UI库整理 UI库整理
好用的悬浮按钮:https://github.com/Scalified/fab 好看的dialog:https://github.com/javiersantos/MaterialStyledDialogs 但是不能自定义控件颜色。。。所
2020-03-15
15
textview相关 textview相关
textview超出内容显示省略号可以使用line来实现 第一个是显示多少行第二个是省略的位置 android:lines="1" android:ellipsize="end"
2020-03-15
15
activity给fragment传值 activity给fragment传值
参考文章:https://www.jianshu.com/p/aba34f08e3bf activity端,使用bundle //Activity传值,通过Bundle Bundle bundle = new Bundle(); bund
2020-03-15
8 / 18