Time of Update: 2018-12-05
在寫 AndroidManifest.xml 的時候,到底什麼時候要給 Activity 添加android.intent.category.DEFAULT 過濾器呢? Android treats all implicit intents passed to startActivity() as if they contained at least one category: "android.intent.category.DEFAULT" (the CATEGORY_DEFAULT
Time of Update: 2018-12-05
上一篇http://blog.csdn.net/tibib/article/details/8753769簡單的介紹了下ViewPager的使用,上一次使用的是PagerAdapter來產生適配每一頁,但最常用的是 FragmentPagerAdapter, FragmentStatePagerAdapter,FragmentPagerAdapter, and FragmentStatePagerAdapter 這幾種適配器,分別在API 4+ Support 和API 13+
Time of Update: 2018-12-05
閱讀此文之前請先閱讀 http://blog.csdn.net/hmg25/article/details/8100896何為增量升級,簡單說下,當應用版本要更新時通常的做法是重新下載新的版本去覆蓋舊版本,但這樣有個比較明顯缺點,太浪費流量了,尤其是在GPRS模式下。我們能不能只更新新版本增加的內容呢,bsdiff/bzlib2可以協助我們實現這點。下面介紹下具體的做法第一、產生舊版和新版的差分比patch檔案,可以藉助bsdiff開源庫windows版本 bsdiff.exe ../
Time of Update: 2018-12-05
首先建立share.xml布局檔案<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &
Time of Update: 2018-12-05
今天在看一些源碼的時候,發現人家設定標題都不用樣式布局檔案,看了後感覺還是蠻方便的,具體操作如下:super.onCreate(savedInstanceState);requestWindowFeature(Window.FEATURE_NO_TITLE);setContentView(R.layout.share);添加代碼requestWindowFeature(Window.FEATURE_NO_TITLE);設定不要標題,然後在設定檔添加配置如下:<?xml version="1
Time of Update: 2018-12-05
package com.czp;import java.io.File;import android.app.Service;import android.content.Intent;import android.content.SharedPreferences;import android.media.MediaPlayer;import android.media.MediaPlayer.OnCompletionListener;import
Time of Update: 2018-12-05
URL fileURL = null;Bitmap bitmap = null;try {fileURL = new URL(picUrl);} catch (MalformedURLException err) {err.printStackTrace();}try {HttpURLConnection conn = (HttpURLConnection)
Time of Update: 2018-12-05
public class VideoActivity extends Activity {private static final String TAG = "VideoActivity";private EditText filenameText;private SurfaceView surfaceView;private MediaPlayer mediaPlayer;@Overridepublic void onCreate(Bundle savedInstanceState) {
Time of Update: 2018-12-05
1、在主機(server)上安裝和配置NFS 安裝nfs服務軟體 $sudo apt-get isntall nfs-kernel-server 修改nfs設定檔/etc/exports $sudo emacs exports 添加下面一行到檔案中: /srv *(rw,sync,no_root_squash,no_subtree_check) /srv是你允許客戶機訪問的檔案路徑,*是你允許的客戶機IP或機器名(用*表示全體客戶都可以訪問),()中的參數是存取控制方式:
Time of Update: 2018-12-05
Mg Android中背光系統架構Email:wei7758@126.comBlog:http://blog.csdn.net/yinwei520Author:YwwTime:2011-9-24Update:(轉載請註明出處,謝謝)
Time of Update: 2018-12-05
ubuntu上Android
Time of Update: 2018-12-05
廣播機制實現
Time of Update: 2018-12-05
步驟:通過new URL(目標網址字串)得到URL對象url---->調用url的openConnection方法獲得一個HttpURLConnection對象connection---->調用connection的getInputStream方法獲得一個InputStream對象,訪問結束,接下來就是io操作了。執行個體: 16 public class DownloadDemoActivity extends Activity { 17 /**
Time of Update: 2018-12-05
通過Socket + Instrumentation實現類比鍵盤滑鼠事件主要通過以下三個部分組成: Socket編程:實現PC和Emulator通訊,並進行迴圈監聽
Time of Update: 2018-12-05
網上找到些例子,功能都實現的很好,各種重新整理,功能多,也就意味著代碼多,想定製自己的下拉重新整理,無從下手。自己寫了個用於下拉重新整理的最簡單的例子,簡單到只有下拉的介面變化,什麼時候重新整理,什麼時候該處理什麼,請自己動手。此代碼就像寫程式的“Hello Word”,帶你入門,弄懂基本原理,高深的部分,網上已經有人做的很好了,推薦個各種重新整理的源碼:android-pulltorefresh-master。註:以下代碼不需要layout檔案,由代碼布局,由代碼產生ListView所需資料,
Time of Update: 2018-12-05
方式一:已將圖片儲存到drawable目錄下,通過圖片id獲得Drawable或者Bitmap,此方式最常用。(若只知道圖片的名稱,還可以通過圖片的名稱獲得圖片的id)(1)通過圖片id獲得DrawableDrawable drawable=getResource().getDrawable(R.drawable.xxx);(2)通過圖片id獲得BitmapResource res=gerResource();Bitmap bitmap=BitmapFactory.decodeResource(
Time of Update: 2018-12-05
1、 Android開發教程筆記完全版 pdf 2、 android各組件詳解 PDF3、 Android遊戲樣本大全(從培訓基礎到複雜遊戲開發) 4、 Android技術內幕系統篇PDF高清完整版.rar 5、 Android技術內幕.系統磁碟區 pdf 6、 最新Android4.0API原始碼 包含所有API 7、 Google Android SDK開發範例大全(第2版) 8、 10個實用Android應用程式源碼下載9、 安卓高仿手機QQ客服端 10、
Time of Update: 2018-12-05
下面是一個在Android ListView中實現多選的例子代碼:XML布局資源檔<?xml version="1.0" encoding="utf-8"?><LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.
Time of Update: 2018-12-05
廣大博友,看過後幫忙頂頂,謝謝大家!!! 轉載請註明:http://blog.csdn.net/richway2010/article/details/6600835【博主:各位博友,網友們,大家網上好!歡迎光臨本部落格。 歡迎多多交流,多提意見,互相學習,互相進步,我們的口號是:好好學習,天天向上。】 Content Provider 屬於Android應用程式的組件之一,作為應用程式之間唯一的共用資料的途徑,Content Provider
Time of Update: 2018-12-05
最近一時心血來潮,嘗試開發 Android 程式,練習的項目是個簡單的天氣預報程式。其中天氣預報自然要涉及全國各地各個地區,我把這些地區名以及地區代碼放在一個 SQLite 資料庫裡,當然 Android 對 SQLite 也支援的很好。問題是,學習過程中發現很多教程或者樣本,都是程式運行後即時建立一個資料庫,然後建表、插入資料什麼的,而我自己的想法是在電腦上把資料庫事先準備好,然後隨 APK 一起打包發布,否則在 Java 代碼裡面 hard code 幾千條 insert