Time of Update: 2018-12-03
原文:Posted by Foxykeep on 22/03/2012http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17在升級了我的Android SDK和ADT到版本17後,我又遇到了一個大問題:)在使用了第三方JAR包的工程中,我仍然能正常編譯,但只要在手機上一運行,程式就會直接崩潰,錯誤資訊如下:03-21 19:20:56.455: E/AndroidRuntime(24471)
Time of Update: 2018-12-03
在上一篇文章(http://blog.csdn.net/jiahui524/article/details/7269738)中我曾經用重寫Dialog的方法來實現過對於分組資訊的一些實現。後來在我的文章下面的評論中有人告訴我可以用PopupWindow來實現分組。並且新浪微博用的就是這種方法。非常感謝網友songfantasy的提醒。於是乎,今天特再寫上一篇文章的續集,希望能幫到大家一些。廢話不多說!看效果,繼續我的風格,先,再上代碼,最終上原始碼!最終實現效果: 實現思路:在一個Popup
Time of Update: 2018-12-03
上一節我們學習了Android的資料存放區採用File,但是這樣的資料是儲存在應用程式內的,那麼也就是說這樣的儲存的檔案大小還是有一定要限制的,有時候我們需要儲存更大的檔案,比如電影等,這就用到了我們的SDSard儲存卡。Android也為我們提供了SDCard的一些相關操作。Environment這個類就可以實現這個功能。Environmet類常用常量String MEDIA_MOUNTED當前Android的外部儲存空間可讀可寫String
Time of Update: 2018-12-03
1、什麼是藍芽Bluetooth是目前是使用的最廣泛的無線通訊協議之一;主要針對短距離設定通訊;5到10米常用語串連耳機、滑鼠和移動通訊裝置等;與藍芽相關的api:BluetoothAdapter:該類的對象代表了本地的藍芽適配器;BluetoothAdapter的常用方法: isEnabled()判斷藍芽是否開啟,已開啟返回true,否則,返回falsegetAddress()擷取本地藍芽地址 getName()擷取本地藍芽名稱startDiscovery()開始搜尋,這是搜尋的第一步isDi
Time of Update: 2018-12-03
深入Android通過Apache HTTP訪問HTTP資源 HttpClient介面實作類別:DefaultHttpClient這也是常用的一個用於實現HttpClient介面的子類,HttpClietnt中定義的常用抽象方法方法名稱描述public abstract HttpResponse execute (HttpUriRequest request)通過HttpUriRequest對象執行返回一個HttpResponse對象public abstract HttpResponse
Time of Update: 2018-12-03
1、GridView是宮格視圖,其定義很簡單,下面說一下裡面的主要屬性:android:horizontalSpacing="5dp"、android:verticalSpacing="5dp": 兩列之間的距離、兩行之間的距離android:stretchMode="columnWidth":縮放模式android:padding="10dp":內邊距android:numColumns="4":定義幾列SlidingDrawer是抽屜類,它的用法很簡單,主要包括handle和content,
Time of Update: 2018-12-03
1、跟上一遍部落格一樣,請參考Android動畫效果Animation之Tween實現簡單動畫;接下來直接java代碼實現如何?動畫:定義private Animation animation_alpha,animation_scale,animation_translate,animation_rotate;private AnimationSet animationSet;分別是透明度動畫、旋轉動畫、尺寸伸縮動畫、移動動畫具體實現代碼如下:private void
Time of Update: 2018-12-03
:1、首先是main.xml檔案的代碼<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView
Time of Update: 2018-12-03
Activity到底是什麼怎麼用,到現在感覺心裡還是沒底的,說不太清楚,看文檔的時候發現一大堆方法,這裡我唯寫了簡單布局的切換,至於以後Activity的用法方法,我會慢慢學習的。1、什麼是activityActivity是一種互動的介面,一個介面可能有多個Activity組成。2、示範activity的鍵盤及觸摸事件下面示範的是一個當鍵盤按下布局切換,鍵盤彈出布局切換的一個效果,已經觸摸事件的掩飾Info資訊public class ActivityTestActivity extends
Time of Update: 2018-12-03
安卓第七天TextView和EditText TextView: android:autoLink屬性的應用 android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/autotx" <TextView android:id="@+id/tvWebUrl" android:layout_width="fill_parent
Time of Update: 2018-12-03
安卓第六天菜單介紹android提供了三種菜單類型,分別為options menu,context menu,sub menu。options menu就是通過按home鍵來顯示.context
Time of Update: 2018-12-03
*/要想類比一個打電話程式,我們需要的是什麼呢?1.畫出Android的UI圖2.介面搭載在UI介面中我們的設計中,分析發現String字串有兩個,一個text文字框,一個button。首先在res-values-strings.xml中添加兩個字串<?xml version="1.0" encoding="utf-8"?><resources> <string name="hello">Hello World, MyPhoneActivity!<
Time of Update: 2018-12-03
table_layout.xml <?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:stretchColumns="1"
Time of Update: 2018-12-03
Main.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-03
main.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-03
Main.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-03
1、 Android的原始碼包括介面布局檔案、java源檔案、資源檔。2、 使用AssetManager類來訪問assets檔案夾的檔案。(瞭解一下AssetManager)。3、 資源檔分兩種:(1)res檔案下的檔案可以通過R檔案訪問。(2)無法直接存取的檔案要通過AssManager訪問。4、 /res/drawable檔案夾存放的Drawable對象的xml檔案:BitmapDrawable, NinePatchDrawable , SartateListDrawable
Time of Update: 2018-12-03
(1)定義一個Applicationpackage zxf.mobilesafe.tools;import java.util.HashMap;import java.util.Map;import zxf.mobilesafe.bean.TaskInfo;import android.app.Application;public class MobileSafeApplication extends Application { //在全域的盒子裡面定義一個變數 存放 appinfo的資料
Time of Update: 2018-12-03
一.“初次邂逅”在我們構建設定介面的時候會用到ListPreference這個控制項,預設(2.3之前)是單選,但我們現在想要多選,就像所示二.“先看外表”我們的項目結構如下:首先我們先看布局檔案preference_layout.xml<?xml version="1.0" encoding="utf-8"?><PreferenceScreen
Time of Update: 2018-12-03
1、一般在啟動虛擬機器的時候可以通過cmd中的命令來啟動對應的虛擬機器並載入sdcard虛擬鏡像。但是在eclipse中的對某個具體的project可以在它的run configurations中的target標籤中,設定application additional command中的額外的命令選項,在這裡加上對應的sdcard的啟動命令 : -sdcard F:/Android/mySmallSDcard