随笔分类 -  Android

百度应用市场 app 认领
摘要:jarsigner -verbose -keystore E:\test\aaa.jks -signedjar E:\test1\Baidu_Claim_unsigned.apk E:\test\Baidu_Claim_unsigned.apk san123 备注: 为签名文件 E:\test\aa 阅读全文

posted @ 2022-10-27 18:33 lvlv岁月流逝 阅读(40) 评论(0) 推荐(0)

app:layout_scrollFlags 标识说明
摘要:scroll 直接像是给recycleView加上了一个头一样,上滑下拉 scroll | enterAlways 上滑和scroll一样,下拉的时候,先拉出tablayout,再拉出recycleView的其他内容 scroll | enterAlways | enterAlwaysCollaps 阅读全文

posted @ 2021-01-27 17:28 lvlv岁月流逝 阅读(224) 评论(0) 推荐(0)

retrofit2.0缓存设置
摘要:如果你设置retrofit缓存出现了 okhttp或者retrofit实现网络缓存504错误原因错误请使用以下方法设置缓存 class Factory { private static String TAG = "factory"; public static MovieApiService cre 阅读全文

posted @ 2020-12-24 09:53 lvlv岁月流逝 阅读(564) 评论(0) 推荐(0)

android 模拟用户点击事件
摘要:模拟用户点击事件 private void setSimulateClick(View view, float x, float y) { long downTime = SystemClock.uptimeMillis(); final MotionEvent downEvent = Motion 阅读全文

posted @ 2020-03-21 14:57 lvlv岁月流逝 阅读(928) 评论(0) 推荐(0)

android模拟器不能上网设置
摘要:进行sdk目录中的platform-tools目录: 系统会罗列出所有设置 最后设置网关 192.168.1.1 代表你物理机的网关,根据实际情况修改 阅读全文

posted @ 2017-07-04 22:37 lvlv岁月流逝 阅读(174) 评论(0) 推荐(0)

android 4.0 webview 无法播放视频
摘要:Android4.0+webview中不能播放网页视频解决方法: 1.修改AndroidManifest.xml文件 在application中添加如下属性 2.代码中添加如下设置 阅读全文

posted @ 2016-11-30 21:16 lvlv岁月流逝 阅读(611) 评论(0) 推荐(0)

android 使用webview 加载网页
摘要:1、 2、 3、在AndroidManifest.xml设置访问网络权限: 注意: 如果只是在onCreate中使用使用下面方法,会出现空白问题一定要注意 阅读全文

posted @ 2016-11-26 21:06 lvlv岁月流逝 阅读(527) 评论(0) 推荐(0)

android 打开新窗口
摘要:ImageView loginBtn = (ImageView)findViewById(R.id.login_button); loginBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClic 阅读全文

posted @ 2016-05-04 09:06 lvlv岁月流逝 阅读(2303) 评论(0) 推荐(0)

Imageview 按比例适应屏幕大小
摘要:需要注意: 必须设置ImageView 的属性。 android:adjustViewBounds="true" 阅读全文

posted @ 2016-05-03 08:38 lvlv岁月流逝 阅读(435) 评论(0) 推荐(0)

android LinearLayout 实现两端对齐
摘要:转载来自:http://airshiplay.iteye.com/blog/1855799 阅读全文

posted @ 2014-09-20 07:14 lvlv岁月流逝 阅读(1427) 评论(0) 推荐(0)

android 带边框的圆角按钮
摘要:新建buttonstyle.xml 代码如下 ... 阅读全文

posted @ 2014-08-13 09:39 lvlv岁月流逝 阅读(5609) 评论(0) 推荐(0)

linearlayout 水平垂直居中
摘要: 阅读全文

posted @ 2014-08-12 09:42 lvlv岁月流逝 阅读(2855) 评论(0) 推荐(0)

Android开发如何在4.0及以上系统中自定义TitleBar
摘要:本文将通过一个实例讲解怎么实现在4.0及以上系统版本中实现自定义TitleBar,这只是我自己找到的一种方法;xml布局文件activity_main.xml 自定义的Titlebar的布局文件titlebar.xml 为布局文件修改style.xml此处的style.xml在value... 阅读全文

posted @ 2014-08-06 07:55 lvlv岁月流逝 阅读(218) 评论(0) 推荐(0)

Android配置时,点击eclipse里Window->Preferences里的android选项出错
摘要:An error has occurred when creating this preference page.解决方法:重起eclipse 阅读全文

posted @ 2014-08-02 06:26 lvlv岁月流逝 阅读(428) 评论(0) 推荐(0)

You may want to manually restart adb from the Devices view.
摘要:adb kill-serveradb start-server 阅读全文

posted @ 2014-07-24 08:29 lvlv岁月流逝 阅读(580) 评论(0) 推荐(0)

Android通过代码获取View
摘要:View view = LayoutInflater.from(mContext).inflate(R.layout.song_item_adapter, null);LayoutInflater inflater = (LayoutInflater)context.getSystemService... 阅读全文

posted @ 2014-05-27 09:27 lvlv岁月流逝 阅读(203) 评论(0) 推荐(0)

android udp 无法收到数据 (模拟器中)
摘要:解决方法:1. 运行模拟器2. 打开window 命令行执行:telnet localhost 55545554是模拟器的端口,执行之后会进入android console3. 在console下执行:redir add udp:22221:22221其中,第一个端口号是PC的端口,第二个端口号是模拟器端口。(端口映射)执行此命令之后,会把PC 22221 端口接收到的数据转到模拟器的22221端口,就能从22221端口接收UDP数据包了 阅读全文

posted @ 2014-03-29 23:41 lvlv岁月流逝 阅读(382) 评论(0) 推荐(0)

android DatagramSocket send 发送数据出错
摘要:安卓4.0以后好像不能在主线程里面使用 socket 所以不管是发送数据还是接收数据需要新开一个了线程:以下代码是我点击发送是代码:new Thread(new Runnable() { @Override public void run() { try { sendData(); ... 阅读全文

posted @ 2014-03-27 22:44 lvlv岁月流逝 阅读(736) 评论(0) 推荐(0)

导航