Time of Update: 2015-02-01
標籤:先來看看圖:布局代碼: 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" 5
Time of Update: 2015-02-01
標籤:先看2張圖一、5.1寸二、3.7寸三、代碼 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="fill_parent" 4 android:layout_height="fill_parent" 5
Time of Update: 2015-02-01
標籤: 如果有一個需求是這樣的,在標題中的右上方有一個button 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_parent" 4
Time of Update: 2015-02-02
標籤:在ASP.NET MVC中,可以使用RegularExpression特性來驗證手機號碼。 public class Customer { [Required(ErrorMessage = "必填")] [Display(Name = "手機號")] [RegularExpression(@"^1[3458][0-9]{9}$", ErrorMessage = "手機號格式不正確")] public
Time of Update: 2015-02-02
標籤: WebView(網路視圖)能載入顯示網頁,可以將其視為一個瀏覽器。它使用了WebKit渲染引擎載入顯示網頁,實現WebView有以下兩種不同的方法:第一種方法的步驟:1.在要Activity中執行個體化WebView組件:WebView webView = new WebView(this);2.調用WebView的loadUrl()方法,設定WevView要顯示的網頁: 互連網用:webView.loadUrl("http:/
Time of Update: 2015-02-02
標籤:1.下載安裝JDK網址:http://www.oracle.com/technetwork/java/javase/downloads/index.html (需要點擊上面的接受許可才能下載)設定環境變數①建立JAVA_HOME,變數值為: C:\Program Files\Java\jdk1.6.0_10②建立ClassPath,變數值為:
Time of Update: 2015-02-02
標籤:本文轉載至 http://dingran.iteye.com/blog/1773573 對於真機,日誌沒法儲存,不好分析問題。所以有必要將日誌儲存到應用的Docunment目錄下,並設定成共用檔案,這樣才能取出分析。 首先是日誌輸出,分為c的printf和標準的NSLog輸出,printf會向標準輸出(sedout)列印,而NSLog則是向標準出錯(stderr),
Time of Update: 2015-01-30
標籤:android listview 載入更多 定位問題 我們用Android在做Listview載入更多資料時,如果每次都重新new Adapter的話,視圖就會滑動到第一條。後來我發現listview有一個方法可以擷取最頂部時哪一個int position =
Time of Update: 2015-01-30
標籤:移動終端開發隨著智能手機的普及變得越來越熱,什麼項目都想移動一把,但反觀要去學這些各個終端的控制項使用,實屬不易,又特別是每個終端的控制項及所用語言都各不相同,使得這種學習變得更加困難.有沒有一種簡單的方式能夠快速構建移動終端程式並能在各個終端平台上快速打包並正常使用? 答案是肯定的,並且這種架構還不少,本文簡單的介紹通過Cordova(原名為phonegap)這個平台構建一個android 程式.開發環境準備.
Time of Update: 2015-02-02
標籤:drawerlayout navigation drawer 抽屜導航 轉載請註明出處:http://blog.csdn.net/allen315410/article/details/42875231概述本篇部落格是對developer.android.com/上的Training課程的簡單翻譯,若是覺得翻譯出來的理解有困難,請點擊下方連結查看原文!關於
Time of Update: 2015-01-31
標籤:第一、dispatch_apply 是同步函數,會阻塞當前線程直到所有迴圈迭代執行完成。當提交到並發queue時,迴圈迭代的執行順序是不確定的樣本: dispatch_queue_t queue=dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_apply(10, queue,
Time of Update: 2015-01-30
標籤:androidstudio 相關操作 刪除項目: 右鍵項目選擇“Open Module Settings” 選定要刪除的項目, 然後點擊左上方的-號,此時項目在程式中呈現灰色, 該狀態下右鍵可delete.匯入jar: 右鍵項目選擇“Open Module Settings” 選擇Libraries添加項目運行方式:
Time of Update: 2015-01-31
標籤:@Overrideprotected void onStart() {// TODO Auto-generated method stubsuper.onStart();BufferedWriter writer ;try {String path = getFilesDir().getAbsolutePath() ;File file = new File(path + "/etc") ;if(!file.exists()){file.mkdirs() ;}File file2 =
Time of Update: 2015-02-02
標籤:簡單介紹:播放聲音有兩種、一種是SoundPool,一種是MediaPlayer。SundPool用於播放短小的音樂,比如遊戲裡面的特效音,按鍵音等等。MediaPlayer可以播放視頻和音頻。1、使用SoundPoolpackage com.shao;import android.app.Activity;import android.media.AudioManager;import android.media.MediaPlayer;impor
Time of Update: 2015-01-30
標籤:JNI加入標準C++檔案本文地址: http://blog.csdn.net/caroline_wendy其餘參考: http://blog.csdn.net/caroline_wendy/article/details/39032551假設須要調用標準C++庫, 則須要在jni目錄下, 加入Application.mk方法.在當中聲明使用C++的標準模板庫(STL): APP_STL := gnustl_staticAPP_STL :=
Time of Update: 2015-02-02
標籤:還在Android入門中,寫點東西總結記錄一下,提高效率,促進學習。 (有些地方會被和諧,所以拆開了,比如on click) 首先瞭解一下Android中button類的幾種常用實現方法: 第一種:匿名內部類作為事件監聽器 推薦使用這種方法。 第二種:內部類作為事件監聽器 &
Time of Update: 2015-02-02
標籤:1.布局檔案代碼如下: 實現過程中,EditText提出警告the text field does not specify an inputType or a hint,原因是EditText控制項需要定義inputType屬性,其屬性可以自行在網上尋找,Android:inputType="number|phone"表示輸入為數字或號碼;還出現警告unexpected text found in layout
Time of Update: 2015-01-30
標籤:著作權說明:本文參考列表1) 問題1:http://blog.csdn.net/lilu_leo/article/details/7753421 問題列舉:1. FragmentManagerImpl.saveFragmentBasicState這個問題經常發生在Fragment跳轉至另外一個FragmentActivity的時候,例如以下一段代碼:@Override public void onActivityCreated(Bundle
Time of Update: 2015-01-31
標籤:1. 空layout<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
Time of Update: 2015-01-31
標籤:一、開啟vitualstudio2010,建立一個網站,然後添加新項,建立一個login.aspx和index.aspx頁面。再添加新項,選擇全域應用程式類,該頁面為Global.asax。 第一步:開啟Global.asax頁面,在Application_start()方法下寫入以下代碼: Application.Lock();