下面先看看效果,这里我直接截取了模拟器里面的效果,嘻嘻,偷偷懒。 上布局代码: <?xml?version="1.0"?encoding="utf-8"?>
<RelativeLayout?xmlns:android="http://schemas.android.com/apk/res/android"
...
分类:
移动开发 时间:
2015-09-09 11:43:38
阅读次数:
521
第一类:属性值 true或者 falseandroid:layout_centerHrizontal 水平居中android:layout_centerVertical 垂直居中android:layout_centerInparent 相对于父元素完全居中android:layout_alignP...
分类:
移动开发 时间:
2015-09-09 09:37:43
阅读次数:
198
在前面的博客中,小编介绍了Android的极光推送以及如何实现登录的一个小demo,对于xml布局页面,摆控件这块的内容,小编还不是很熟练,今天小编主要简单总结一下在Android中的布局,学习过Android的小伙伴都知道,在安卓中有五大常用的布局,如下图所示: 接着,小编就来详细介绍这几种布局,小编是初学者,还请各位小伙伴多多指教哦。首先,我们来看:...
分类:
移动开发 时间:
2015-09-07 09:38:02
阅读次数:
311
涉及到滑动,就涉及到VIEW,大家都知道,android的UI界面都是由一个一个的View以及View的派生类组成,View作为基类,而常用的布局里面的各种布局就是它派生出来的ViewGroup的子类,ViewGroup作为各个组件的容器搭建了整体的UI。以下是android UI的结构示示意图:查...
分类:
移动开发 时间:
2015-09-06 12:35:04
阅读次数:
277
Android布局像素单位有dp、sp、px等三种。设置字体时使用sp,设置长度、高度等属性时可以使用dp或sp,px则表示屏幕实际的像素。dp、sp、px三者之间的区别:dp是与密度无关,sp除了与密度无关外,还与比例无关。在Android中规定以160dpi为基准,即如果每英寸屏幕密度为160,则dp..
分类:
移动开发 时间:
2015-09-04 22:44:42
阅读次数:
257
Android布局是所有带界面的Android应用的开端,布局应用的好坏直接决定了用户体验。Android共有五种布局,分别为FrameLayout(堆栈布局)、LinearLayout(线性布局)、RelativeLayout(相对布局)、TableLayout(表格布局)、AbsoluteLayout(绝对布局)。最常用的布局是FrameL..
分类:
移动开发 时间:
2015-09-04 22:43:16
阅读次数:
351
前言下拉刷新和上滑加载更多,是一种比较常用的列表数据交互方式。android提供了原生的下拉刷新容器 SwipeRefreshLayout,可惜样式不能定制。于是打算自己实现一个专用的。但是下拉刷新和上滑,非常考验对android布局与父子触摸机制的功底,因此参考gitHub上的一个热门的下拉刷新项...
分类:
移动开发 时间:
2015-08-29 20:14:53
阅读次数:
183
第一类:属性值 true或者 falseandroid:layout_centerHrizontal 水平居中android:layout_centerVertical 垂直居中android:layout_centerInparent 相对于父元素完全居中android:layout_alignP...
分类:
移动开发 时间:
2015-08-29 15:18:46
阅读次数:
218
public class MainActivity extends Activity {
AlphaAnimation animation_alpha;
RotateAnimation animation_rotate;
ScaleAnimation animation_scale;
TranslateAnimation animation_translate;
AnimationSet anim...
分类:
移动开发 时间:
2015-08-26 14:02:21
阅读次数:
208
android布局相对布局: 1 10 11 19 20 27 28 34 35 dp和px的区别:dp是像素密度,可以说变化是相对的。
分类:
移动开发 时间:
2015-08-25 23:40:35
阅读次数:
181