自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 Android ImageView的scaleType属性

center 保持原图的大小,显示在ImageView的中心。当原图的size大于ImageView的size时,多出来的部分被截掉。 center_inside 以原图正常显示为目的,如果原图大小大于ImageView的size,就按照比例缩小原图的宽高,居中显示在ImageView中。如果原图size小于ImageView的size,则不做处理居中显示图片。 center_crop ...

2018-08-23 16:51:16 118

原创 andorid shape

<?xml version="1.0" encoding="utf-8"?><!-- shape drawable xml文件中定义的一个几何图形,定义在res/drawable/目录下,文件名filename称为访问的资源ID 在代码中通过R.drawable.filename进行访问,在xml文件中通过@[package:]drawable/filename...

2018-08-23 16:45:02 120

原创 html中点击<a>链接,页面跳到顶部的问题

1.点击链接,页面滚动条跳到顶部的解决办法:&amp;lt;a href=&quot;#&quot;&amp;gt;改为&amp;lt;a href=&quot;###&quot;&amp;gt;2.点击链接,调用JS,页面滚动条跳到顶部的解决办法:&amp;lt;a href=&quot;#&quot; onclick=&quot;javascript:method();&q

2018-08-15 17:47:11 8967 1

原创 Android WebView文件上传(关键代码)

WebChromeClient webChromeClient = new WebChromeClient() { @Override public void onProgressChanged(WebView webView, int i) { super.onProgressChanged(webView, i); }...

2018-08-15 15:37:14 1763

原创 Android与H5交互

h5调用回调的线程不是主线程@JavascriptInterfacepublic void back(){ //不是主线程}

2018-08-13 15:25:31 126

原创 Android Json-判断json是JSONObject还是JSONArray

通过JSONTokener来判断json是JSONObject还是JSONArraypublic static String getJsonJointString(String top, String jsonStr) { StringBuffer sb = new StringBuffer(); try { Object objec...

2018-08-13 10:28:16 3329

原创 TextView跑马灯-xml

&lt;TextView ...... android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:focusableInTouchMode="true" android:focusable="true" android:singleLine="tr...

2018-08-13 10:22:14 236

原创 加载更多的RecyclerView的Adapter - LoadMoreAdapter

public abstract class LoadMoreAdapter&lt;B&gt; extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt; { protected List&lt;B&gt; datas; private int page = 1; //标记底部显示状态 protected i...

2018-08-07 16:33:25 1046

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除