<GridView android:id="@+id/movie_list" android:layout_width="906dp" android:layout_height="654dp" android:layout_marginLeft="230dp" android:layout_mar ...
分类:
其他好文 时间:
2016-06-21 15:44:02
阅读次数:
158
(一)概述:
(二)RadioButton的基本用法与事件处理:
效果图:
实现代码:
xml文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_pa...
分类:
其他好文 时间:
2016-06-21 12:52:38
阅读次数:
299
先看一下xml代码:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@andr...
分类:
其他好文 时间:
2016-06-21 07:16:34
阅读次数:
275
在布局优化中,Android的官方提到了这三种布局、、,并介绍了这三种布局各有的优势,下面也是简单说一下怎么使用.
1、布局重用
1)标签可以使用单独的layout属性,这个也是必须使用的。
2)标签若指定了ID属性,而你的layout也定义了ID,则你的layout的ID会被覆盖
3)在include标签中所有的android:layout_*都是有效的,前提是必须要写layout_width和la...
分类:
移动开发 时间:
2016-06-21 06:57:34
阅读次数:
156
点击按钮模拟进度条下载进度,“下载”完成进度条消失。
代码如下:
xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android...
分类:
移动开发 时间:
2016-06-20 00:50:22
阅读次数:
200
(一)带阴影的TextView
涉及到的几个属性:
运行效果如下:
实现代码: <TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:la...
分类:
其他好文 时间:
2016-06-19 06:48:16
阅读次数:
295
1、制作一张启动图片splash.png,放置在res->drawable-hdpi文件夹中。
2,布局文件
<RelativeLayout xmlns:Android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="...
分类:
移动开发 时间:
2016-06-16 14:50:19
阅读次数:
176
android:layout_weight只适用于LinearLayout android:layout_weight的真实含义是:一旦View设置了该属性(假设有效的情况下),那么该 View的宽度等于原有宽度(android:layout_width)加上剩余空间的占比。 转自:http://b ...
分类:
移动开发 时间:
2016-06-14 16:10:07
阅读次数:
237
下面通过一个例子来总结实现滑动的几种方式,例子的主要功能就是让我们的自定义View能够随着手指的移动而移动。
布局文件如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width...
分类:
移动开发 时间:
2016-06-13 20:41:51
阅读次数:
269
Activity之间的数据传递: 创建新布局:<TextView android:layout_width="wrap_content" ...
分类:
移动开发 时间:
2016-06-07 22:13:17
阅读次数:
188