在登录或者注册的时候,有些软件中,需求要求密码可以查看和隐藏,其实实现起来也很简单。
首先定义布局:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="50.0dip"
android:layout_marginLeft="15dip"...
分类:
移动开发 时间:
2015-01-05 18:45:26
阅读次数:
211
RelativeLayout布局android:layout_marginTop="25dip" //顶部距离android:gravity="left" //空间布局位置android:layout_marginLeft="15dip //距离左边距// 相对于给定ID控件android:layo...
分类:
移动开发 时间:
2014-12-30 15:04:12
阅读次数:
110
RatingBar评分条系统UI控件main.xml文件写:<RatingBarandroid:id="@+id/ratingbar"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="10dip"android:isIndicator="true"android:numStars="5"android:rating="5"></..
分类:
移动开发 时间:
2014-12-20 18:23:01
阅读次数:
221
加速运动,即一个物体运动时速度越来越快;减速运动,即一个物体运动时速度越来越慢。现在用Javascript来模拟这两个效果,原理就是用setInterval或setTimeout动态改变一个元素与另外一个元素的距离,如xxx.style.left或xxx.style.marginLeft,然后每次运...
分类:
编程语言 时间:
2014-12-10 16:04:46
阅读次数:
256
小结: android:paddingLeft:指的是在本控件中,预留闲置多少空间 android:layout_marginLeft:指的是这个控件距离父控件的空间有多少当GridView中的一项被点中的时候显示的背景图片:android:listSelector="@drawable/choos...
分类:
其他好文 时间:
2014-11-25 23:14:39
阅读次数:
210
RelativeLayout布局android:layout_marginTop="25dip" //顶部距离android:gravity="left" //空间布局位置android:layout_marginLeft="15dip //距离左边距// 相对于给定ID控件android:layo...
分类:
移动开发 时间:
2014-11-10 01:05:38
阅读次数:
289
在写layout布局的时候,我们会发现有这样几个比较相似的属性:
MarginStart MarginLeft
MarginEnd MarginRight
这些属性的区别是什么? 根据api注释,我们得知MarginStart指的是控件距离开头View部分的间距大小,MarginLeft则指的是控件距离左边View部分的间距大小,MarginEnd和Mar...
分类:
移动开发 时间:
2014-10-17 12:03:24
阅读次数:
144
http://www.blogjava.net/anchor110/articles/342206.html当按钮分别设置以上两个属性时,得到的效果是不一样的。android:paddingLeft="30px"按钮上设置的内容(例如图片)离按钮左边边界30个像素android:layout_mar...
分类:
移动开发 时间:
2014-09-16 00:04:39
阅读次数:
229
RelativeLayout布局android:layout_marginTop="25dip" //顶部距离android:gravity="left" //空间布局位置android:layout_marginLeft="15dip //距离左边距// 相对于给定ID控件android:layo...
分类:
移动开发 时间:
2014-09-15 12:47:28
阅读次数:
253
实现起来最麻烦的其实是水平居中和垂直居中,其中垂直居中是最麻烦的。考虑到浏览器兼容性,网上看了一些资料,发现在页面中垂直居中确实没有什么太好的办法。于是就采用了position:fixed属性控制时钟的绝对位置,通过clientWidth和clientHeight来获取时钟的宽和高,利用javascript控制marginLeft和marginTop来居中时钟。...
分类:
编程语言 时间:
2014-08-31 11:57:01
阅读次数:
177