随笔分类 - Android
摘要:关于Android studio 连接不上adb问题,有人说重启机器,有人说重启工具,也有人说adb kill-server。然后我都尝试过依然没有解决。通过各种查询。最终成功的解决!!! adb nodaemon server 它会告诉你启动不了的原因。 我的问题error: could not
阅读全文
摘要:onMeasure()函数由包含这个View的具体的ViewGroup调用,因此值也是由其ViewGroup中传入的。子类View的这两个参数widthMeasureSpec, heightMeasureSpec由ViewGroup中的layout_width,layout_height和paddi
阅读全文
摘要:开发环境 Ubuntu 14.04 server nginx-1.8.1 nginx-rtmp-module nginx的服务器的搭建 安装nginx的依赖库 配置并编译nginx 切换到你的nginx 的下载目录,使用nginx的默认配置,添加nginx的rtmp模块。 如果发现 make时有 c
阅读全文
摘要:xml属性对应的方法说明 android:alpha setAlpha(float) 设置组件的透明度(0——1) android:background setBackgroundResource(int) 设置背景 android:clickable setClickable(boolean) 设
阅读全文
摘要:1、 android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 具体代码如下: <activity android:name=".myview.videoplayactivity.videoplayer.FullScreenPlayActi
阅读全文
摘要:1、 permission_group 直接取申请 group 不会弹出 申请权限的框 2、 onClieck(): 运行日志:
阅读全文
摘要:getMeasuredWidth()获取的是view原始的大小,也就是这个view在XML文件中配置或者是代码中设置的大小。getWidth()获取的是这个view最终显示的大小,这个大小有可能等于原始的大小也有可能不等于原始大小。 在布局文件中写入width 只是给了他一个初始化的默认值,而不是最
阅读全文
摘要:效果图: 1、菜单栏类 2、布局文件 3、 activity 4、 还可以编写 横竖的菜单栏 ,效果如下: 代码如下: 其中用到 沿Y轴为轴旋转的动画,代码如下:
阅读全文
摘要:1、移动补间动画:TranslateAnimation Animation animation = new TranslateAnimation(0,50,0,50); 参数1:x轴的起始位置 参数2:x轴的终止位置 参数3:y轴的起始位置 参数4:y轴的终止位置 相对于原图位置的原点(图片的右上角
阅读全文
摘要:1 /** 2 * 3 * px dip 转换 4 */ 5 public class DensityUtil { 6 7 /** 8 * 根据手机分辨率 dip 转 px 9 */ 10 static public int dip2px(Context context,float dpValue){ 11 ...
阅读全文
摘要:效果图: 1、 添加依赖 2、编写布局 DanmakuView 覆盖在 VideoView 3、 编写相关逻辑
阅读全文
摘要:注:本教程实验于android studio 3.1.2 1、下载git :https://gitforwindows.org/ 安装 git。 2、配置git 3、配置github 4、上传项目 (1) (2)建立git仓库 (3)选择上传文件 (4)上传成功 5、更新项目,提交 (1) (2)
阅读全文
摘要:打开AS的project试图,找到gradle目录下的wrapper下面的gradle wrapper.properities找到: distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-milestone-1-a
阅读全文
摘要:butterknife 注解框架的问题 删除项目中的有关butterknife 的 apply plgin、classpath 字段 把注解框架改为最新版本 implementation 'com.jakewharton:butterknife:8.8.1' annotationProcessor
阅读全文
摘要:implementation 'com.android.support:percent:27.1.1'// 百分比布局 implementation'com.android.support:recyclerview-v7:27.1.1'// 滚动栏 implementation'com.android.support:cardview-v7:27.1.1'// ...
阅读全文
摘要:1 2 7 8 11 12 18 19 20 21 22 23 24 29 30 35 36 37 38 39
阅读全文
摘要:Item 布局 MyRecyclerView >> MyAdapter >> ViewHolder
阅读全文
摘要:问题1. 运行Activity的时候出现Your content must have a TabHost whose id attribute is ‘android.R.id.tabhost’ 问题2. 运行Activity的时候出现Your TabHost must have a TabWidg
阅读全文
摘要:添加依赖: implementation'com.google.code.gson:gson:2.7'// 解析json
阅读全文

浙公网安备 33010602011771号