Time of Update: 2018-12-04
我們來看一個樣本圖: 首先我們看到一篇很有吸引力的文章時候都會忍不住去評論,可是在我們評論時候,會突然蹦到登入頁面,才發現我們根本就沒有登入,這也是現在大部分應用的結構吧,目的是先吸引住你,然後你會不自覺的想註冊登入,反過來如果應用首先就登入,會覺得比較繁瑣,心情不好,直接就drop了。我個人認為啊.不多說了,看下面實現. 我們這裡主要用到的方法: 跳轉:startActivityForResult(new
Time of Update: 2018-12-04
詳細內容轉貼:http://www.kandroid.org/android_pdk/keymaps_keyboard_input.html Key layout maps are installed in /system/usr/keylayout and /data/usr/keylayout. Key layout maps are stored on the device as UTF-8 text files and have the following
Time of Update: 2018-12-04
對於新浪微博這塊一直很糾結,auth認證讓人吐血。之前項目用到的都是copy別人的,最近想詳細瞭解下,就簡單實現一二,以便以後自己更好的運用. 准別好以下常量 public String consumerKey = "2803926882";// key public String consumerSecret = "d41e6f2d605bd16c785879032ec431f5";// Secret
Time of Update: 2018-12-04
首先還是按照慣例給大家看下樣本. 用過多米音樂的都會知道, 這個UI可以上下滑動,作用嘛---無聊中可以劃劃解解悶,這被鎚子公司老羅稱呼為“情懷”,其實叫“情趣”更合適。嘿嘿.如今移動互連網發展這麼迅速,市場上已不再是那初期隨便敲個APP放上架就能擁有幾十萬使用者的階段了.最近蘋果公司,為了怕android下載量趕超蘋果商店,大勢聲稱:(第 500 億個下載應用的使用者就可以獲得 10,000 美元的 iTunes 禮品卡,除此之外,緊隨第 500 億之後的前 50 名使用者也可以獲得
Time of Update: 2018-12-04
前段時間在設計UI的時候看到UC的快顯功能表設計挺好 效果:於是就小小的模仿了下自己寫了這個這樣的效果,主要代碼如下:dlg = new AlertDialog.Builder(context).create();dlg.show();dlg.getWindow().setContentView(R.layout.alert_style);LayoutInflater factory = LayoutInflater.from(context);View view =
Time of Update: 2018-12-04
Android 的 monkey test 工具提供了 -f scriptfile 參數,可以指定 test 指令碼,然而翻遍了 Android 的網站也沒有找到這個指令碼的文檔,最終只在 monkey 的源碼 MonkeySourceScript.java 中找到了一小段注釋,裡面給了一個不到 10 行例子:/** * monkey event queue. It takes a script to produce events * * sample script format: *
Time of Update: 2018-12-04
http://justanapplication.wordpress.com/2009/08/22/a-standalone-android-runtime-application-installation/ It turns out that an application can be installed, such that it cansubsequently be run, simply by placing the package containing it in the data
Time of Update: 2018-12-04
Android之view重繪http://qaohao.javaeye.com/blog/478314 關鍵字: android android中實現view的更新有兩組方法,一組是invalidate,另一組是postInvalidate,其中前者是在UI線程自身中使用,而後者在非UI線程中使用。以下是我在android文檔中找到的說明,引用public void invalidate()Invalidate the whole view. If
Time of Update: 2018-12-04
android.os下的FileObserver類是一個用於監聽檔案訪問、建立、修改、刪除、移動等操作的監聽器,但是該監聽只針對監聽的那個檔案目錄下的一級子檔案起作用,而對它子目錄下的檔案目錄則不能夠實現。如下樣本:import com.example.androidemail.R;import com.example.androidemail.R.layout;import android.app.Activity;import android.os.Bundle;import
Time of Update: 2018-12-04
Android中關於任務和進程的概念有點混淆,網上看到一篇說得很好的文章,摘過來記錄一下~~~http://bbs.sjtu.edu.cn/bbstcon,board,MobilePhone,reid,1288709685,file,M.1288709685.A.html 我的個人理解:首先你看到的不是進程(process),是任務(Task)。用終端,輸ps,可以看到真正的運行中的linux
Time of Update: 2018-12-04
在Android應用開發中,使用系統案頭背景作為應用的背景,需要把應用的背景設定為透明背景,然後設定視窗的屬性為FLAG_SHOW_WALLPAPER即可顯示背景。修改AndroidManifest.xml檔案裡面activity屬性: <activity android:name=".WallPaperTest" android:label="@string/app_name" android:theme=
Time of Update: 2018-12-04
在寫網路傳輸程式時,常會將所要傳出的資料,以 base64 的方式將其編碼 (encoding) 起來。翻遍了 Android 的檔案,只看到這個 android.os.Base64Utils package 和 base64 有相關。不幸的是,這個 package 裡面只有一個 static byte[] decodeBase64(String data) 函式。為什麼,只有解碼 (decoding) 函式,沒有編碼函式?原本,想開始自己寫 base64
Time of Update: 2018-12-04
使用eclipse建立的android AVD模擬器,預設位置一般在使用者檔案夾下的.android檔案夾中,並且路徑不可有中文。而使用者檔案夾一般都在系統硬碟,所以當建立的模擬器過多並且佔用空間過大時,自然免不了導致系統硬碟空間緊張。那麼如何修改移動AVD建立的預設位置呢?方法參考如下。開啟:電腦-->系統屬性-->環境變數—>在“系統變數”那選擇“建立”-->變數名為 "ANDROID_SDK_HOME”
Time of Update: 2018-12-04
德國一所大學的三位研究員通過測試發現,超過99%搭載Android系統的智能手機能輕易地被移動駭客侵襲。侵襲者可以利用泄露的資料假扮成手機使用者本人,登入其Google和Facebook應用帳戶。研究員進行的測試發現,Android手機容易被移動駭客侵襲,主要是由於使用者搭載Android
Time of Update: 2018-12-04
1.Android背景平鋪android中達到類似於windows案頭背景的平鋪的效果,定義一個bitmap對象,在xml中和代碼中均可,設定其tileMode為repeat。在drawable檔案夾下建立如下檔案tilebg.xml:Java代碼 <?xml version ="1.0" encoding ="utf-8" ?> <bitmap xmlns:android ="http://schemas.android.com/apk/res/android"
Time of Update: 2018-12-04
Android源碼編譯的時候只支援6種語言,不包括中文,這樣導致的結果是如果編譯設定類的系統apk(如 Settings.apk, AccountAndSync.apk)時,就會出現編譯出的apk拷貝到系統裡不支援中文的問題,解決方案如下:多語言定製的實現步驟1) 進入build/target/product目錄,在languages_full.mk或languages_small.mk檔案中,修改 PRODUCT_LOCALES的值,來定製語言,比如PRODUCT_LOCALES := en_
Time of Update: 2018-12-04
大家都知道,很多Android手機帶有重力感應感應器,能夠對手機的翻轉做出響應。比如應用在螢幕的自動翻轉、重力感應遊戲等方面。 只要在androidmanifest.xml中對應的Activity中加入sensor屬性即可實現螢幕自動翻轉,如: Xml代碼 < activity android:name=".demo" android:label="@string/app_name" android:screenOrientation="sensor" > <
Time of Update: 2018-12-04
Android中幀動畫在Activity啟動時自動啟動並執行幾種方式http://www.eoeandroid.com/blog-468046-657.html幀動畫:第一種方式啟動幀動畫:(在Activity啟動時會自動運行動畫)AnimationDrawable ad;ImageView iv = (ImageView) findViewById(R.id.animation_view);iv.setBackgroundResource(R.drawable.animation);ad =
Time of Update: 2018-12-04
來自:http://android.tgbus.com/Android/tutorial/201106/357509.shtml 彈出popwindow的代碼如下,比較亂,多包涵: popupWindow = new PopupWindow(menuView, LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, true);
Time of Update: 2018-12-04
本文能解決的問題: 1.android sdk, ADT (Android SDK tools) 升級至16, SDK升級4.0 2.Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to http://10.159.192.62:8080 refused 3.Failed to rename directory