![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android基础
Unvs
这个作者很懒,什么都没留下…
展开
-
litepal创建数据库失败
提示错误 Process: com.example.litepaltest, PID: 4684 java.lang.NumberFormatException: s == null at java.lang.Integer.parseInt(Integer.java:577) at java.lang.Integer.parseInt(Integer.java:650) at org.litepal.parser.LitePalParser.原创 2020-08-19 17:03:46 · 542 阅读 · 0 评论 -
AndoridQ(10) 读写文件问题
使用IO读写文件,已经添加了 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>的情况下,还是提示权限不够这时候需要在AndroidManifest.xml文件的application中添加android:requestLeg原创 2020-08-10 09:55:16 · 179 阅读 · 0 评论 -
GetDuration获取时间显示与音频文件不符合原因
时间格式化问题,GetDuration获取到的时间需要再进行格式化day: (time / 86400000),hour: (time / 3600000) % 24,minute: (time / 60000) % 60,second: (time / 1000) % 60,millisecond: (time) % 1000原创 2020-08-04 11:38:14 · 593 阅读 · 0 评论 -
Android 8.0以后前台页面显示
转载博客https://blog.csdn.net/dandelionela/article/details/86092293转载 2020-08-03 15:31:57 · 140 阅读 · 0 评论 -
bitmap和drawable的相互转化以及setImageResource(),setImageDrawable(),setImageBitmap()
从本地获取drawable图片:getResources().getDrawable(R.drawable.**)获取bitmap:Bitmap b=BitmapFactory().decodeResource(context.getResource(),R.drawable.**);drawable转bitmap:Drawable a=**;Bitmap b=(BitmapDrawable)a.getBitmap()bitmap转drawable:Bitmap b=**Drawble a=转载 2020-07-28 10:43:13 · 441 阅读 · 0 评论 -
RecyclerView双列显示属性配置
StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);recyclerView.setLayoutManager(layoutManager);转载 2020-07-22 14:41:43 · 850 阅读 · 0 评论 -
androidx.recyclerview:recyclerview的使用
androidx.recyclerview:recyclerview的使用https://blog.csdn.net/lilongsy/article/details/91390343转载 2020-07-16 15:40:33 · 959 阅读 · 0 评论 -
Android基础入门教程——2.4.3 BaseAdapter优化
Android基础入门教程——2.4.4 ListView的焦点问题1.复用ConvertView:上面也说了,界面上有多少个Item,那么getView方法就会被调用多少次!我们来看看上一节我们写的getView()部分的代码:@Overridepublic View getView(int position, View convertView, ViewGroup parent) {convertView = LayoutInflater.from(mContext).inflate(R.l转载 2020-07-16 15:20:54 · 122 阅读 · 0 评论