Time of Update: 2013-12-11
實現功能 下面的撥號部分 實現原理: 1.地下是一個Popupwindow(裡面填充多個ImageView)2. 每個ImageView點擊的時候. 觸發 onKeyDown和onKeyUpint keyCode =KeyEvent.KEYCODE_DEL; //這裡是退格鍵KeyEvent keyEventDown = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode); KeyEvent
Time of Update: 2013-12-11
對自己現在所瞭解的layout_weight屬性進行記錄,不求全面,只求正確!layout_weight意為"權重",我的理解就是給組件設定一個顯示大小的比例。layout_weight設定一個值,會出現兩種情況。第一種:當組件的“layout_width”屬性為“fill_parent”時,值越小,組件越大。第二種:當組件的“layout_width”屬性為“wrap_content&rdq
Time of Update: 2013-12-11
在button在底部的多個view切換<執行個體二3D切換>
Time of Update: 2013-12-11
Java代碼 public class Main extends Activity implements OnGestureListener, OnTouchListener { //
Time of Update: 2013-12-11
點擊第一個按鈕,然後再第二個頁面中輸入文字,就會在第一個的EditText中出現在第二個Activity中輸入的文字,、代碼一看就能明白startActivityForResult函數第一個Activity import android.app.Activity; import android.content.Intent; import android.os.Bundle; import
Time of Update: 2013-12-11
四月份的時候就寫過一次,由於種種原因放棄了Android的開發,現在QQ也換了,也要重新拾起Android開發,所以重新寫一次。好了不廢話了,本文開始。。。---------------------------------華麗的分割線--------------------------------1、安裝JDK 6 下載最新版本的JDK:32位的http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-windows-
Time of Update: 2013-12-11
看了些許文章,有很多都是用到了BitmapFactory.Options,設定裡面的一些參數來實現圖片的壓縮 現在有一個更好的方法來解決Bitmap OutOfMemory的問題,例 比如你的原始bitmap只有176*144,但是畫面更新卻要352*288,那麼每次你都要通過BitmapFactory來進行展開。 Matrix matrix = new Matrix(); float
Time of Update: 2013-12-11
在android中的布局有五大類,有的時候你可能用到一種,但有的時候你也可能需要兩種或者三種布局同時一起使用。這五種布局為別為:LinearLayout(線性布局),FrameLayout(架構布局),RelativeLayout(相對布局),TableLayout(表格版面配置),AbsoluteLayout(座標布局);LinearLayout:被稱為線性布局,分為水平和垂直,設定的垂直或水平的屬性值,來排列所有的子項目。所有的子項目都被堆放在其它元素之後,因此一個垂直列表的每一行只會有一個
Time of Update: 2013-12-11
打算以測試代碼中所使用的介面為點,以介面間調用關係為線,逐步撕開Android中Audio的面紗。*****************************************源碼************************************************* public void testPlaybackHeadPositionAfterInit() throws Exception {
Time of Update: 2013-12-11
[java] TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); telephonyManager.listen(new PhoneListener(), PhoneStateListener.LISTEN_CALL_STATE); [java] private class
Time of Update: 2013-12-11
我們需要做的是需要取消下載限制,看效果。 關鍵詞:啟用提示[plain] grep -rn "啟用提示" . ./poetry_java/hxb/poetry/MainActivity.java:285: new
Time of Update: 2013-12-11
MainActivity如下:[java]package com.example.asynctasktest; import java.io.ByteArrayOutputStream; import java.io.InputStream; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import
Time of Update: 2013-12-11
複製流化的資料 你可以複製和粘貼被流化的大文本和位元據。這種資料可以是以下形式: 1. 儲存在實際裝置上的的檔案; 2. 來自通訊端中的資料流; 3. 儲存在底層資料庫系統中的大資料。 針對資料流的內容提供器使用一個檔案描述對象(如AssetFileDescriptor,而不是Cursor對象)來提供對資料的訪問。粘貼資料的應用程式會使用這個檔案描述對象來讀取資料流。 按照以下步驟建立使用提供其來複製資料流的應用程式: 1.
Time of Update: 2013-12-11
做Android項目,退出程式時,有時不能退出所有的activity,這時我們就需要在退出時,關閉所有的activity。思路:當activity建立的時候把當前的Activity對象存放起來,等到退出的時候,關閉所有的Activity。為此,寫了一個MyApplication類,用於存放所有的Activity。代碼如下: [java] package com.dt5000.ischool.util; import
Time of Update: 2013-12-11
現在要來實現一個自訂的Dialog,主要涉及到樣式檔案style。參考案例,自己寫代碼來實現。首先建立一個Android Project——CustomDialog,然後res/drawable檔案夾下建立一個xml檔案filled_box.xml,其內容為:<?xml version=”1.0″ encoding=”utf-8″?><shape
Time of Update: 2013-12-11
昨天收到一個bug,描述如下:1 Enter Settings-->Language&input2 Choose personal dictionary3.Choose add in menu4.Input some word and choose personal dictionary[Expected result]The word can be added to dictionary and no any
Time of Update: 2013-12-11
2013-01-05 16:42 11人閱讀 評論(0) 收藏 舉報①.使用listView或者gridView時,當列表為空白時,有時需要顯示一個特殊的empty view來提示使用者,一般情況下,如果你是繼承ListActivity,只要<ListView android:id="@id/android:list".../><TextView
Time of Update: 2013-12-11
使用板子的交叉編譯工具鏈,自己做Makefile來編譯一個二進位檔案,adb push到板子上運行。 會出現No such file or directory問題。 明明該檔案是存在的,為什麼會出現這個問題呢? 檔案是存在,但是該檔案所需要的一些庫檔案,是不存在的。這個時候就需要靜態連結。 在Makefile中增加一行 LDFLAGS += --static 在編譯可執行檔的命令中,比如 26
Time of Update: 2013-12-11
當ListView的記錄超過4頁時才會顯示滑塊 java代碼:[html] package com.example.test0123; import java.lang.reflect.Field; import android.app.Activity; import android.graphics.drawable.Drawable; import android.os.Bundle;
Time of Update: 2013-12-11
Activities提供了一種方便管理的建立、儲存、回複的對話方塊機制,例如 onCreateDialog(int), onPrepareDialog(int, Dialog),