龙哥it
- 浏览: 232380 次
- 性别:
- 来自: 武汉
社区版块
- ( 0)
- ( 0)
- ( 0)
最新评论
-
龙哥it:
把这些东西,放在一起,自己用的时候方便而已,不用到处找了
android权限uri.parse的几种用法 -
:
干货 哈哈哈
android权限uri.parse的几种用法 -
narutolzj:
楼主,apputils类是自定义的吗,找不到~~
-
black_smart:
...
android权限uri.parse的几种用法 -
liu_zheng:
博主 我想把文字换成图片 要怎么修改呢??
文章列表
第一中优化的方法
在adapter中,以后viewholder就调用一下方法
package com.wwl.canvas.adapter;
import android.content.context;
import android.util.sparsearray;
import android.view.layoutinflater;
import android.view.view;
import android.view.viewgroup;
public class viewholder {
private sparsearray
import android.content.context;
import android.graphics.drawable.drawable;
import android.support.v4.view.viewpager;
import android.view.viewgroup;
import android.widget.imageview;
import android.widget.linearlayout;
import net.youth.banner.indicator.baseindicatoradapter;
import net.youth. ...
implementation 'com.github.mzcretin:expandabletextview:v1.5.1'
public static boolean isdestory(activity activity){
if(activity==null){
return true;
}
else if(activity.isfinishing()){
return true;
}
else if(activity.isdestroyed()){
return true;
}
else{
...
小程序swiper轮播图标点样式设置
- 博客分类:
- swiper标点样式
rich-text图片大小设置样式
- 博客分类:
- rich-text
intent 的跳转--警示
- 博客分类:
- android_intent
activity 间通过隐式 intent 的跳转,在发出 intent 之前必须通过 resolveactivity 检查,避免找不到合适的调用组件,造成 activitynotfoundexception 的异常。
例如:
public void view {
intent intent = new intent(intent.action_view);
intent.setdataandtype(uri.parse(url), mimetype);
if (getpackagemanager().reso ...
- 2019-10-24 14:02
- 浏览 208
- 分类:移动开发
加载网络数据以及网页链接
- 博客分类:
- android-webview
用webview加载数据,如果只是http网页链接,直接用loadurl加载即可,如果是网页数据或者是js代码,直接用loaddatawithbaseurl方法即可, 如果想在webview中调起到某个app或者调起支付,则必须用webview.setwebchromeclient方法,可以操作javascript dialogs(js脚本对话框), favicons(添加收藏的标志), titles(标题), 和 progress(进度条)等页面点击事件以及自动跳转等事件处理,如果直接用webview.setwebviewclient达不到想要的效果,因为webview.setweb ...
tablayout样式规定
- 博客分类:
- tablayout
//viewpager指示器
api 'com.github.hackware1993:magicindicator:1.5.0'
- 2019-05-24 16:03
- 浏览 909
- 分类:移动开发
因为现在的手机版本升级了,虽然保存了文件到本地,但是手机本身是不识别他,需要去通知系统,放了文件到本地,让他去扫描识别
contentvalues values = new contentvalues();
values.put(mediastore.images.media.data, videopath);
values.put(mediastore.images.media.mime_type, "image/jpeg");
getcontentresolver().insert(mediastore.ima ...
我的列表界面,自定义布局
- 博客分类:
- android—view
基本上大多数项目,在我的界面或者是设置界面,有一个列表,这个列表布局简单,有没什么挑战性,还必须花很多时间去布局,
这里把这样的列表布局给封装起来,以后就可以直接使用
我这里也是找别人写的,拿过来用,保存着,自己用的时候容易找
当图片设置
android:scaletype="centercrop"
属性,又要实现圆角图片的时候,出现的一些问题,当设置centercrop的时候,圆角就没有了,
这个时候需要用到另一个方法,设置两个transformer
glide.with(mcontext)
.load(vo.getimage())
.dontanimate()
.placeholder(r.drawable.noinfo)
.error(r.drawable.noinfo)
.transform( ...
添加包:
implementation 'com.scwang.smartrefresh:smartrefreshlayout:1.0.3'
//recyclerview库
implementation 'com.android.support:recyclerview-v7:27.1.1'
//adapter
implementation 'com.github.cymchad:baserecyclerviewadapterhelper:2.9.35'
refreshlayout.setonrefreshlistener(new onrefreshlistener() ...
- 博客分类:
- android—image
/**
* 获取当前屏幕截图,不包含状态栏
* @param activity
* @return bp
*/
public static bitmap snapshotwithoutstatusbar(activity activity) {
view view = activity.getwindow().getdecorview();
view.setdrawingcacheenabled(true);
view.builddrawingcache();
b ...