一、布局
1.activity_main布局
android:id="@+id/refresh_view"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:id="@+id/gv"
...
分类:
其他好文 时间:
2016-05-21 10:19:10
阅读次数:
222
Android布局文件中的layout_weight属性仅在LinearLayout布局中有效。
google推荐:当设置了控件的layout_weight属性时,该控件相应的layout_width或者layout_height属性应该设置为0dp。
如果设置了控件的layout_weight属性同时,又设置了layout_width或者layout_height属性,此时有多种情况需要分析...
分类:
移动开发 时间:
2016-05-18 18:50:51
阅读次数:
255
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" an ...
分类:
其他好文 时间:
2016-05-18 10:29:47
阅读次数:
151
<?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" andr ...
分类:
其他好文 时间:
2016-05-18 10:21:03
阅读次数:
280
我们看一下下面的代码<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="...
分类:
其他好文 时间:
2016-05-12 23:53:03
阅读次数:
325
##1. 广播接收者概念
BroadCastReceiver,是Android四大组件之一。必须注册。
1. 注册方式:1)静态注册2)动态注册##2. IP拨号器 有序广播activity_main.xml
<EditText
android:id="@+id/et_ipnum"
android:layout_width="wrap_content"...
分类:
移动开发 时间:
2016-05-12 23:45:20
阅读次数:
422
实现思路:将手势写入GestureLibrary中,对其他手势进行匹配对比,进行识别
现在布局中加入GestureOverlayView组件
<android.gesture.GestureOverlayView
android:id="@+id/add_gesture"
android:layout_width="match_parent"
andr...
分类:
移动开发 时间:
2016-05-12 23:27:02
阅读次数:
170
首先,是布局文件,非常的简单,一个可以滑动的ScrollView包裹一个线性布局,线性布局里面无内容
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="...
分类:
移动开发 时间:
2016-05-12 23:22:08
阅读次数:
348
下面是一个LinearLayout,里面的内容超级简单,就是一个ListView
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_pa...
分类:
移动开发 时间:
2016-05-12 23:15:54
阅读次数:
293
xml version="1.0" encoding="utf-8"?>LinearLayoutandroid:gravity="center_horizontal"android:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"xmlns:android="htt...
分类:
微信 时间:
2016-05-12 20:20:15
阅读次数:
398