原创 android onTouchEvent 中只有ACTION_DOWN的原因

在public boolean onTouchEvent(MotionEvent event) 函數中,返回true表示已經處理結束,不需要再向上傳遞ontouch事件了,false則繼續向上傳遞ontouch事件,我在使用的時候,返回r

原创 solution about ADB server didn't ACK error

errors: daemon not running. starting it now ADB server didn't ACK failed to start daemon  solution: 1.查看任務管理器,關閉所有adb.e

原创 Android 開發環境(Eclipse)

1)下載Eclipse最新版本的,去官網就好, http://www.eclipse.org/ 版本的一些區別 Eclipse IDE for Java Developers 是爲java開發的 Eclipse IDE for Java

原创 Android編譯問題分析

# Android編譯(1) java 未找到瑪命令 這裏寫代碼片 Your version is: /bin/bash: java: 未找到命令. The required version is: "1.8.x" 解決方案:

原创 瀏覽選擇圖片/音頻/視頻啓動程序讓其他程序進行選擇

(1)如果你需要通過瀏覽去選擇一個你需要的Picture/Music/Video://觸發代碼Intent intent = new Intent();  intent.setType(“image/*”); //audio/* vide

原创 爲程序員量身定製的12個目標

對程序員們來說挑戰自我非常重要,要麼不斷創新,要麼技術停滯不前。新年伊始,我整理了12個月的目標,每個目標都是對技術或個人能力的挑戰,而且可以年復一年循環使用。 01. 變得有耐心 02. 保持健康 03. 擁抱變化帶來的不適應 04

原创 APMServ提示“Apache啓動失敗,請檢查相關配置”的解決方法

今天開始做一點關於JavaWeb的東西,第一件事就是要搭建服務器,以前學php的時候,覺得APMServ不錯,除了PHP,裏面集成的 MySQL很好用,不用自己去配置任何東西,於是就直接拿來用了,但是服務器卻怎麼也起不來,下面的這些很快的

原创 進制轉換

[java] view plaincopy 十進制轉成十六進制:    Integer.toHexString(int i)    十進制轉成八進制    Integer.toOctalString(int

原创 利用半透明對話框實現新浪微博android客戶端首次運行時的提示界面

首先,設置要覆蓋在最上方的dialog的view [html] view plaincopy <?xml version="1.0" encoding="utf-8"?>   <RelativeLayout

原创 Android 中顏色對應的值

< ?xml version="1.0" encoding="utf-8" ?> < resources> < color name="white">#FFFFFF< /color>< !--白色 --> < color name=

原创 onSaveInstanceState和onRestoreInstanceState觸發的時機

先看Application Fundamentals上的一段話:    Android calls onSaveInstanceState() before the activity becomes vulnerable to b

原创 簡單的倒計時

public class CountdownTimerActivity extends Activity {private TimeCount time;private Button checking;@Overrideprotected

原创 Bitmap Drawable bitByte[] 互相轉換

(1)轉換Bitmap to Drawable  BitmapDrawable bitmapDrawable = (BitmapDrawable)bitmap;      Drawable drawable = (Drawabl

原创 final關鍵字的使用(Thinking In Java)

final關鍵字最基本的含義就是表明“這個東西不能改變”。之所以這樣,可能是考慮到兩方面的因素:設計或效率。 final關鍵字可應用在三種場合: 數據、方法以及類 1. final數據 表明某個數據是“常數”,永遠不會改變。使用f

原创 Dialog設置全屏

先設置一個style   <style name="Dialog_Fullscreen">         <item name="android:windowFullscreen">true</item>