在一般开发中上传图片作为头像的功能非常常见,下面我们研究下具体实现,代码很简单,大家可以直接拿来使用哦!1.先看一下布局文件,很是丑陋:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
an...
分类:
移动开发 时间:
2015-07-26 15:47:56
阅读次数:
130
RelativeLayout相对布局相对布局RelativeLayout允许子元素指定它们相对于其父元素或兄弟元素的位置,这是实际布局中最常用的布局方式之一。它灵活性大很多,当然属性也多,操作难度也大,属性之间产生冲突的的可能性也大,使用相对布局时要多做些测试。下面是常用的一些属性RelativeL...
分类:
其他好文 时间:
2015-07-25 11:55:14
阅读次数:
176
启动第二个Activityactivity_main.xml文件:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:la...
分类:
其他好文 时间:
2015-07-23 23:53:43
阅读次数:
138
在上一篇中,我们已经把框架搭建的差不多了,只剩下最后一个需要的功能框架,就是右滑栏。对于右滑栏的使用,我们使用在github上比较火热的SlidingMenu来创建我们需要的侧滑栏。首先我们需要为我们的侧滑栏创建一个布局文件,在res/layout文件夹下面创建一个activity_left_layout.xml文件,并选择RelativeLayout布局。在我们的侧滑栏中肯定放一些选项,那么我们就...
分类:
移动开发 时间:
2015-07-23 12:08:06
阅读次数:
110
接着上两篇文章,我们基于Bmob提供的API实现用户登录功能,整体看一下代码。1.注册页面xml:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width=...
分类:
移动开发 时间:
2015-07-23 08:14:08
阅读次数:
396
基于Baas实现用户的注册功能。我们使用Bmob提供的API进行实战开发,首先在Bmob官网上下载SDK,然后将jar包拷入工程内。创建应用,获取应用key:1.main.xml:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.an...
分类:
移动开发 时间:
2015-07-22 23:03:59
阅读次数:
168
Android控件介绍多选按钮(CheckBox)CheckBox有两个常用的事件,OnClickListener事件和OnClickChangeListener事件
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"...
分类:
移动开发 时间:
2015-07-22 22:54:32
阅读次数:
277
效果图:
代码部分main_activity.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:...
分类:
移动开发 时间:
2015-07-22 16:10:30
阅读次数:
231
Android基础入门教程——2.2.3 TableLayout(表格布局)标签(空格分隔): Android基础入门教程本节引言:前面我们已经学习了平时实际开发中用得较多的线性布局(LinearLayout)与相对布局(RelativeLayout),
其实学完这两个基本就够用了,笔者在实际开发中用得比较多的也是这两个,当然作为一个好学的程序猿,
都是喜欢刨根问题的,所以虽说用得不多,但是还是...
分类:
移动开发 时间:
2015-07-21 10:48:05
阅读次数:
246
Android基础入门教程——2.2.2 RelativeLayout(相对布局)标签(空格分隔): Android基础入门教程本节引言:在上一节中我们对LinearLayout进行了详细的解析,LinearLayout也是我们
用的比较多的一个布局,我们更多的时候更钟情于他的weight(权重)属性,等比例划分,对屏幕适配还是
帮助蛮大的;但是使用LinearLayout的时候也有一个问题,就...
分类:
移动开发 时间:
2015-07-21 10:46:58
阅读次数:
271