随笔分类 - Android
对Android的学习笔记,及资料的整理
摘要:MediaPlayer是Android系统多媒体android.media包中的类,主要用于控制音频文件,视频文件或者流媒体的播放。 1,导入图片到...\src\main\res\drawable 这个文件中 2,新建一个放音频的文件夹 ...\src\main\res\raw 3,编写activ
阅读全文
摘要:1,编写activity_main.xml 代码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="ht
阅读全文
摘要:1,编写xml代码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.an
阅读全文
摘要:ListView类 ListView类是Android程序开发中经常用到的组件,该组件必须与适配器配合使用,由适配器提供显示样式和显示数据。 适配器接口 Adapter 适配器Adapter是连接后端数据和前端显示的接口,是数据和UI(View)之间一个重要的纽带。 在常见的ListView、Gri
阅读全文
摘要:1,编写xml代码 <?xml version="1.0" encoding="utf-8"?> <!-- 线性布局LinearLayout 将组件按照水平或垂直方向排列。 1) 设置线性布局为水平方向 android:orientation = "horizontal” 2) 设置线性布局为垂直方
阅读全文
摘要:1,编写xml代码 <?xml version="1.0" encoding="utf-8"?> <!-- 相对布局RelativeLayout --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android
阅读全文