XML代码: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_p ...
分类:
移动开发 时间:
2017-05-11 18:29:10
阅读次数:
234
(1)两种方法提冲Spinner中的数据源:通过list集合,或者是通过xml文件进行配置 (2)布局代码例如以下: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="htt ...
分类:
移动开发 时间:
2017-05-08 09:59:52
阅读次数:
153
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.c ...
分类:
其他好文 时间:
2017-05-02 23:44:44
阅读次数:
328
接着上两篇文章。我们基于Bmob提供的API实现用户登录功能。总体看一下代码。1.注冊页面xml:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schema ...
分类:
移动开发 时间:
2017-05-01 09:57:39
阅读次数:
306
RelativeLayout是一种相对布局。控件的位置是依照相对位置来计算的。后一个控件在什么位置依赖于前一个控件的基本位置,是布局最经常使用,也是最灵活的一种布局。下边来看一下他的经常使用属性 这里将这些属性分成组,便于理解和记忆。 a)、第一类:属性值为true或false android:la ...
分类:
其他好文 时间:
2017-04-24 23:06:52
阅读次数:
140
Fragment可以认为是Activity的一个界面的组成部分,Fragment必须依存于Activity。 在layout文件夹中新建一个xml文件,布局方式采用RelativeLayout,注意文件名最好都用小写 页面效果如下图所示 右击src文件夹,新建一个java文件(跟前面xml文件对应)... ...
分类:
移动开发 时间:
2017-04-24 10:18:07
阅读次数:
661
1. main layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layo ...
分类:
其他好文 时间:
2017-04-23 13:20:28
阅读次数:
198
1、因为Android界面上的全部控件一般都位于Layout控件(比方RelativeLayout)之上,而布局控件能够设置响应touch事件,所以能够通过布局控件的setOnTouchListen来截获touch事件。做进一步的处理。 2、关于界面滑动。涉及到gesture的处理,而gesture ...
分类:
移动开发 时间:
2017-04-18 11:26:52
阅读次数:
379
一.重要知识点:ArrayAdapter的使用android.R.layout.simple_list_item_1 内置组件 二.xml布局<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://sch ...
分类:
其他好文 时间:
2017-04-17 09:17:58
阅读次数:
142
四种布局: 一.LinearLayout:线性布局 二.RelativeLayout:相对布局1.根据父容器定位:android:layout_alignParentLeft 左对齐android:layout_alignParentRight 右对齐android:layout_alignPare ...
分类:
其他好文 时间:
2017-04-16 19:02:07
阅读次数:
243