Time of Update: 2015-01-12
標籤:android 網路 區域網路 判斷 Android裡判斷是否可以上網,常用的是如下方法:/** * 檢測網路是否串連 * * @return */private boolean isNetworkAvailable() {// 得到網路連接資訊ConnectivityManager manager =
Time of Update: 2015-01-12
標籤:Error:Execution failed for task ':app:dexDebug'.> com.android.ide.common.internal.LoggedErrorException: Failed to run command:D:\Android\android-sdk\build-tools\21.1.1\dx.bat --dex --no-optimize --output
Time of Update: 2015-01-12
標籤:android 自訂旋轉進度條AsyncTask在處理過程中,我們一般會使用一個轉動的“菊花”來顯示提示目前使用者當前的進度,一般呢,我們都不會用系統內建的ProgressDialog,而是自己設計個動畫來實現,菊花轉動時,不允許使用者點擊頁面,那麼把這個菊花放在AlertDialog自訂的頁面上,如果轉動過程中,允許使用者點擊頁面其他位置,比如搜尋城市,那麼把這個進度圖片直接放在該頁面的xml檔案上就可以了。給出轉動的菊花實現代碼 :
Time of Update: 2015-01-12
標籤:第一步:準備工作,準備下載sdk:http://developer.android.com/sdk/index.html:jdk的下載:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html eclipse的下載:https://eclipse.org/downloads/;首先安裝sdk,jdk,都只是下一步安裝完成和安裝普通軟體一樣!並且安裝的時候記住安裝的路徑,為
Time of Update: 2015-01-12
標籤:解決2個Activity互相跳轉,並且棧中只保留每個Activity一個對象的存在。在2個Activity中分別都要用到onActivityResult,所以就不能用launchMode="singleTask"。如:http://www.cnblogs.com/tt_mc/p/3586834.html解決辦法:
Time of Update: 2015-01-12
標籤: Android開發的寶庫越來越多,我開發中有需要的組件,主要參考Trinea的大作Android開源項目分類匯總(包含了後面的絕大多數)、CSDN上直接拿來用!最火的Android開源項目還有CSDN上的直接拿來用!十大Material
Time of Update: 2015-01-12
標籤:在Activity中,因為要監聽觸控螢幕的觸摸事件和手勢時間,所以該Activity必須實現OnTouchListener和OnGestureListener兩個介面,並重寫其中的方法。本人根據android 5.0的原始碼總結下OnTouchListener 首先,Android的事件處理機制是基於Listener(監聽器)來實現的,比我們今天所說的觸控螢幕相關的事件,就是通
Time of Update: 2015-01-12
標籤:onTouchEvent同樣也是在view中定義的一個方法。處理傳遞到view 的手勢事件。手勢事件類型包括ACTION_DOWN,ACTION_MOVE,ACTION_UP,ACTION_CANCEL等事件。貼上android 5.0原始碼 1 public boolean onTouchEvent(MotionEvent event) { 2 final float x = event.getX(); 3 final float y =
Time of Update: 2015-01-12
標籤:from http://blessht.iteye.com/blog/2121845 Spring架構提供了構建Web應用程式的全功能MVC模組,叫Spring MVC,通過Spring Core+Spring MVC即可搭建一套穩定的Java Web項目。本文通過Spring MVC源碼分析介紹它的核心實現原理。
Time of Update: 2015-01-12
標籤:eclipse android_development_tool adt_bundle eclipse_adt_plugin adt-bundle-windows-x86_64 自從Android Studio1.0正式版推出後, 官網只有提供Android
Time of Update: 2015-01-12
標籤:android;notification在UI主線程中構建,不可進行耗時操作;生命週期短暫,主要是起到一個過渡作用;目標組件:Notification、Activity、Service;兩種註冊方式:(1)動態註冊,通常情況下在onResume()中調用Context.registerReceiver()註冊,在onPause()中調用unRegisterReceiver()登出;(2)靜態註冊,在註冊檔案中進行註冊;通常情況下,觸發率過高的事件不宜採用靜態註冊;發送的廣播分為普通廣播和有
Time of Update: 2015-01-12
標籤:public localhost success @RequestMapping修飾類@RequestMapping("/springmvc")//此路徑是相對於web應用根目錄的路徑@Controllerpublic class SpringMVCTest { private static&
Time of Update: 2015-01-12
標籤:apk一、產生APKBuild-->Generate Signed APK...650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/58/85/wKioL1Szf9mCaQgCAAE-qy8AEak310.jpg" title="捕獲1.PNG" alt="wKioL1Szf9mCaQgCAAE-qy8AEak310.jpg"
Time of Update: 2015-01-12
標籤:android view hierarc此文著作權屬於作者所有,任何人、媒體或者網站轉載、借用都必須徵得作者本人同意!class YouClass extends View{ @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info);
Time of Update: 2015-01-12
標籤:android button onclick 一、在XML中<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"<!-- 現行排序 -->> xmlns:tools="http://schemas.android.com/
Time of Update: 2015-01-12
標籤:這是GitHub上的開源項目android-menudrawer,效果如下: 效果非常好,不過在一開始的時候匯入Eclipse時出現各種錯誤,現在總結一下問題和解決方案。 1、匯入項目的問題 先把官網下載的zip檔案解壓,然後在Eclipse中File—>Import—>Android—>Existing Android Code Into
Time of Update: 2015-01-12
標籤:網上介紹Android上http通訊的文章很多,不過大部分只給出了實現代碼的片段,一些注意事項和如何設計一個合理的類用來處理所有的http請求以及返回結果,一般都不會提及。因此,自己對此做了些總結,給出了我的一個解決方案。首先,需要明確一下http通訊流程,Android目前提供兩種http通訊方式,HttpURLConnection和HttpClient,HttpURLConnection多用於發送或接收流式資料,因此比較適合上傳/下載檔案,HttpClient相對來講更大更全能,但是速
Time of Update: 2015-01-12
標籤:#import "ViewController.h"@interface ViewController (){ CALayer *_l1;//定義能夠全域使用 CALayer *_l2;}@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad];
Time of Update: 2015-01-12
標籤:I get one Original Autel MaxiDAS® DS708 Update Service, after complete update, I got a message "Fatal Application Error", reading: Application AutoRun.exe has performed an illegal operation and will be shut down. If the problem persists,
Time of Update: 2015-01-12
標籤:android Layout_weight的理解SDK中的解釋:Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams. Specify 0 if the view should not be stretched. Otherwise the extra pixels will