自定义控件
Android自定义控件学习笔记
lqfsharks
这个作者很懒,什么都没留下…
展开
-
android viewpager
一.XML文件android.support.v4.view.ViewPager android:id="@+id/vp" android:layout_width="match_parent" android:layout_height="match_parent"/>二.适配器 class MyAdapter ex原创 2015-04-02 06:17:55 · 313 阅读 · 0 评论 -
android drawableRight 添加点击事件
一.转载地址:https://github.com/xingty/XEditText缺点:会弹出系统“粘贴”提示转载 2015-11-10 17:38:22 · 759 阅读 · 0 评论 -
Android-EditText 自定义带删除功能的EditText
http://blog.csdn.net/xiaoganstar/article/details/43053991转载 2015-10-10 15:15:05 · 245 阅读 · 0 评论 -
android 自定义toast 开源项目
一.frenchtoast地址:https://github.com/pyricau/frenchtoast二.SuperToasts地址:https://github.com/JohnPersano/SuperToasts原创 2015-10-22 10:35:19 · 570 阅读 · 0 评论 -
android scrollview 嵌套自适应 listview 自动滚动
listView.setFocusable(false);原创 2015-09-08 16:32:09 · 478 阅读 · 0 评论 -
android scrollview viewpager 冲突
android scrollview viewpager 冲突转载 2015-07-31 15:59:22 · 363 阅读 · 0 评论 -
ViewPager不能高度自适应?height=wrap_content 无效解决办法
转载地址:http://www.tuicool.com/articles/nmIjymViewPager用的很多,主要用啦展示广告条。可是高度却不能自适应内容,总是会占满全屏,即使设置android:height="wrap_content"也是没有用的。。解决办法其实网上有很多,但是个人感觉不是很好比如:LinearLayout的时候, 使用weight来自动调整Vi转载 2015-07-31 15:53:56 · 1519 阅读 · 0 评论 -
android viewpager 禁止左右滑动
public class UnSlipViewPager extends ViewPager{ private boolean isCanSlip = false; public boolean isCanSlip() { return isCanSlip; } public void setIsCanSlip(boolean isCanSli原创 2015-06-09 07:49:01 · 802 阅读 · 0 评论 -
scrollview嵌套listview
public class MyListView extends ListView { public MyListView(Context context) { super(context); } public MyListView(Context context, AttributeSet attrs) { super(context, attrs); } public M原创 2015-06-16 10:21:13 · 355 阅读 · 0 评论 -
android checkbox 自定义选中背景
转载地址:http://blog.csdn.net/ym19860303/article/details/70937361. 先导入 checked.png 和 unchecked.png 两张图片2. 在res/drawable下面,添加selector (如 check_state.xml)文件: a转载 2015-04-21 18:31:45 · 2244 阅读 · 0 评论 -
android 圆形头像
转载地址:http://blog.csdn.net/cwcwj3069/article/details/42235761一.attr.xml 二.RoundImageViewpackage com.lqf.roundimagedemo;import android.content.Conte转载 2015-04-21 14:21:22 · 428 阅读 · 0 评论 -
android view 移动
一.真实移动视图位置 1.offsetLeftAndRight:左右移动2. offsetTopAndBottom:上下移动位置如果发生重叠,上层视图事件响应失效二.真实移动视图的child视图 1.scrollTo 2.scrollBy原创 2015-04-14 15:06:05 · 467 阅读 · 0 评论 -
android selector tab文字颜色 切换效果
一.在res目录下新建一个color文件夹二.在values文件夹下的colors文件里添加两种颜色selected和normal三.在color文件夹下新建一个btn_selector文件xmlversion="1.0"encoding="utf-8"?>selectorxmlns:android="http://schemas.android.com/apk/r原创 2015-04-06 14:10:46 · 869 阅读 · 0 评论 -
android 下拉刷新控件
https://github.com/zarics/ZrcListView转载 2015-04-22 14:16:16 · 275 阅读 · 0 评论 -
TextView——setCompoundDrawables用法
Drawable drawable = mContext.getResources().getDrawable(R.drawable.duringtime); drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());//必须设置图片大小,否则不显示holder.time.se转载 2015-11-21 14:11:56 · 993 阅读 · 0 评论