android sdks
Hello______world
这个作者很懒,什么都没留下…
展开
-
LinearLayout和RelativeLayout 属性
LinearLayout和RelativeLayout 属性对比 共有属性: java代码中通过btn1关联次控件 android:id=”@+id/btn1″ 控件宽度 android:layout_width=”80px” //”80dip”或”80dp” android:layout_width =“wrap_content” android:layout_width =“match_par原创 2013-10-26 01:27:56 · 516 阅读 · 0 评论 -
android 自定义主题和风格
#987456 24sp true @drawable/icon ?android:windowFrame <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="h原创 2014-04-03 12:37:02 · 966 阅读 · 0 评论 -
android intent 用法总结
1. [代码]调用拨号程序 // 给移动客服10086拨打电话 Uri uri = Uri.parse("tel:10086"); Intent intent = new Intent(Intent.ACTION_DIAL, uri); startActivity(intent); 2. [代码]发送短信或彩信 // 给10086发送内容为“Hello”的短信 Uri u转载 2014-03-22 23:46:05 · 559 阅读 · 0 评论 -
spinners
package com.example.spinners; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.View; import android.widget.AdapterView; import android.widget.Ad原创 2013-11-14 23:23:31 · 751 阅读 · 0 评论 -
ScrollView
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:layout_widt原创 2013-11-14 23:22:43 · 743 阅读 · 0 评论 -
Basic view
package com.example.ba; import android.os.Bundle; import android.app.Activity; import android.app.ListActivity; import android.view.Menu; import android.view.View; import android.widget.ArrayAdapter;原创 2013-11-14 22:50:28 · 839 阅读 · 0 评论 -
Gallery
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextV原创 2013-11-14 16:36:35 · 866 阅读 · 0 评论 -
生命周期
package com.example.lifecycle; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.widget.*; public class MainActivity extends Activity { @Override pro原创 2013-11-14 16:34:15 · 694 阅读 · 0 评论 -
通过事件启动另外一个Activity
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >原创 2013-11-13 22:13:56 · 742 阅读 · 0 评论 -
响应触摸事件
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button ex = (Button)findViewById(R.id.ex_button); ex.setOnClickListen原创 2013-11-13 21:07:24 · 830 阅读 · 0 评论 -
SQLite
package mars.sqlite3; import mars.sqlite3.db.DatabaseHelper; import android.app.Activity; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDa原创 2013-11-20 21:19:43 · 641 阅读 · 0 评论 -
摄像头
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation ="vertical" android:layout_width="fill_parent" android:layout_height ="fill_parent"> <SurfaceView an原创 2013-11-19 14:26:48 · 759 阅读 · 0 评论 -
录制音频
package com.creative.RecorderDemo; import java.io.File; import java.io.IOException; import android.app.Activity; import android.media.MediaPlayer; import android.media.MediaRecorder; import android.原创 2013-11-19 13:36:56 · 1001 阅读 · 0 评论 -
shared Prefernces
Shared Prefernces 是一种相对简单的数据存储方式,实质上它把需要记录的数据以“键——值”的方式写入到一张xml文件中,然后这张XML文件并不是用户手动生成的。在本实例中想xml文件存放在以下的目录中:data/data/com.creative.SharedPreferencesTest/shared_prefs <LinearLayout xmlns:android=原创 2013-11-19 18:28:53 · 780 阅读 · 0 评论 -
音乐播放器
先把一个名字为wish.mp3的文件复制到工程的res/raw目录下。 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation ="vertical" android:layout_width ="fill_parent" android:转载 2013-11-19 13:47:48 · 777 阅读 · 0 评论 -
basic view
package net.learn2develop.BasicViews5; import android.app.ListActivity; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ListView; import原创 2013-10-31 17:59:39 · 548 阅读 · 0 评论 -
Android 调试
最后附上Eclipse 在开发中使用到的快捷键很实用噢(转载) Ctrl+1 快速修复(最经典的快捷键,就不用多说了) Ctrl+D: 删除当前行 Ctrl+Alt+↓ 复制当前行到下一行(复制增加) Ctrl+Alt+↑ 复制当前行到上一行(复制增加) Alt+↓ 当前行和下面一行交互位置(特别实用,可以省去先剪切,再粘贴了) Alt+↑ 当前行和上面一行交互位置(同上) Alt+← 前一转载 2014-12-23 20:26:47 · 598 阅读 · 0 评论