上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: 日常开发中我们经常会有这种需求,就是希望不弹出安卓自带的输入法,那么搜索出来的结果经常是用InputType.TYPE_NULL这个方法, 如下代码: public void hideInput(EditText editText) { editText.setOnTouchListener(new 阅读全文
posted @ 2022-02-22 16:45 _Vincent 阅读(626) 评论(0) 推荐(0)
摘要: 首先在AndroidManifest.xml文件添加 <activity android:name=".MainActivity" android:screenOrientation="portrait" android:launchMode="singleTask"/> 然后再BaseActivi 阅读全文
posted @ 2021-10-26 11:43 _Vincent 阅读(627) 评论(0) 推荐(0)
摘要: 最近项目开发需要用到标签打印机去打印,一开始使用的是C#自带打印类去做。效果是可以实现,但是打印出来的标签效果不好,二维码有锯齿状。因为这个方案就给我否决了。 百度了下,知道了ZPL这种语言,其实就是斑马打印机得底层指令。 开发思路就是,先把需要设计的标签用ZPL指令来编辑,然后发送到打印机。指令看 阅读全文
posted @ 2021-08-17 22:47 _Vincent 阅读(2218) 评论(3) 推荐(0)
摘要: 远程桌面的时候提示这个,那么可以通过管理员命令,强制进行登陆(治标不治本),但是比较方便 mstsc /admin /v 192.168.1.11 治本: 打开注册表(regedit),删除: 删除注册表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Con 阅读全文
posted @ 2021-08-04 12:06 _Vincent 阅读(545) 评论(0) 推荐(0)
摘要: public void PaintToImage() { Bitmap bitmap = new Bitmap(500, 200); Graphics g = Graphics.FromImage(bitmap); Font font = new Font("宋体", 20, FontStyle.R 阅读全文
posted @ 2021-04-21 00:47 _Vincent 阅读(796) 评论(0) 推荐(0)
摘要: public string Post(string url, Dictionary<string, string> dic,string body="") { string result = ""; StringBuilder builder = new StringBuilder(); forea 阅读全文
posted @ 2021-04-01 14:54 _Vincent 阅读(1337) 评论(0) 推荐(0)
摘要: 前段时间有这么一个需求,需要ListView将每次最新进去得item显示在第一行,一开始我都是把data去排序,然后再填充进去。这样做其实倒几次后面的数据就乱套了。其实实现这个东西非常简单 ,只需要一代码 listdata.add(0,data);//0代表每添加数据直接放在list的第一位 阅读全文
posted @ 2021-02-09 16:23 _Vincent 阅读(357) 评论(0) 推荐(0)
摘要: 思路:把需要打印的图片保存到本地看看,如果保存到本地也是小和模糊,那么就是图片本身的问题。这里就不仔细说明如何打印的代码了。我们先看看有锯齿的代码是怎么样写的。 首先我将Zxing生成的Image包装成我需要的尺寸的新的Image,然后传入画出来,代码如下 Image qrCode = new Bi 阅读全文
posted @ 2020-11-27 14:47 _Vincent 阅读(1108) 评论(0) 推荐(0)
摘要: string dir = Environment.GetFolderPath(Environment.SpecialFolder.CommonPictures); string dir = Environment.GetFolderPath(Environment.SpecialFolder.Des 阅读全文
posted @ 2020-11-04 09:50 _Vincent 阅读(252) 评论(0) 推荐(0)
摘要: 看看效果图吧 然后看代码吧,为了方便大家,所有资源文件都是用系统自带的,所以可以直接copy build.gradle 文件添加 // 注意,对应得也必须是28 compileSdkVersion 28 implementation 'com.android.support:recyclerview 阅读全文
posted @ 2020-07-10 16:34 _Vincent 阅读(509) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 12 下一页