Time of Update: 2018-12-04
android:theme="@android:style/Theme.Dialog" : Activity顯示為對話方塊模式android:theme="@android:style/Theme.NoTitleBar" : 不顯示應用程式標題欄android:theme="@android:style/Theme.NoTitleBar.Fullscreen" : 不顯示應用程式標題欄,並全屏android:theme="Theme.Light ":
Time of Update: 2018-12-04
在這裡, 我將每種動畫分別應用於四個按鈕為例: (1) main.xml 代碼如下:(聲明四個按鈕控制項)XML代碼:<?xml version="1.0"
Time of Update: 2018-12-04
1、android與本機伺服器(同一台電腦)通迅,必須為電腦添加一個IP: 10.0.0.2,否則無法串連上本機伺服器。 2、伺服器接收端 這裡就不寫了 直接在model裡面設定要獲到的屬性名稱字就行,如要接收 title,就直接用this.model.getTitle(); 3、用戶端(發送端) public void httpPost2(){try{show.setText(" post2 "+new Date().toString());//
Time of Update: 2018-12-04
1、定義style:<resources> <style name="dialog_fullscreen"> <item name="android:windowFullscreen">true</item> <item name="android:windowNoTitle">true</item> <item
Time of Update: 2018-12-04
斷點續傳下載,其實就是記錄下原來下載的位置,然後從那個位置開始下載就是了。代碼如下。/** * 作用:斷點續傳下載<BR> * 作者:peijiangping<BR> * 日期:2011-6-11 */public static int doDownloadTheFile_test(String strPath, String filePath,String filename, int mode, long size, Handler handler)
Time of Update: 2018-12-04
在這裡給出自己的一個測試DEMO,裡面注釋很詳細。簡單的視頻錄製功能.package com.video;import java.io.IOException;import android.app.Activity;import android.content.pm.ActivityInfo;import android.graphics.PixelFormat;import android.media.MediaRecorder;import android.os.Bundle;import
Time of Update: 2018-12-04
http://www.eoeandroid.com/forum.php?mod=viewthread&tid=96904Android IME遮擋問題http://www.eoeandroid.com/thread-23360-1-1.html在Android系統中,由於手機螢幕大小的限制,一般需要字元輸入的時候,彈出的IME面板往往會佔據大半個螢幕,如果輸入框正好在下方,那經常會出現被IME面板遮擋的尷尬,給使用者帶來不小的困擾,使用者體驗很不友好。 查了一下android
Time of Update: 2018-12-04
首先,開發環境,google建議在ubuntu10.0.4下,並且最好是64位,既然是為了工作和學習,就盡量按照官方要求的來吧。Python 2.5 -- 2.7 ubuntu10.0.4已經預設安裝了,所以不需要安裝,其他環境需要安裝JDK 6 編譯4.0需要jdk 6 ,sdk的編譯需要jdk 5Git 1.7 or
Time of Update: 2018-12-04
android:scaleType是控製圖片如何resized/moved來匹對ImageView的size。ImageView.ScaleType / android:scaleType值的意義區別:CENTER /center 按圖片的原來size置中顯示,當圖片長/寬超過View的長/寬,則截取圖片的置中部分顯示CENTER_CROP / centerCrop 按比例擴大圖片的size置中顯示,使得圖片長(寬)等於或大於View的長(寬)CENTER_INSIDE /
Time of Update: 2018-12-04
今天在看API學習ProgressDialog時遇到的一個問題 Android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an applicationpackage
Time of Update: 2018-12-04
為啥括弧(一)呢,是因為知道肯定會有二。有木有二,有木有!!!!話說。第一個坑:我是用我的HTC Desire Z開發的,我最愛的Sense介面啊。。。刷都是官方的ROM。每次調試,NDK模組死掉後都是木有堆棧函數名顯示的。那天心血來潮,換我老婆的V880(CM7系統)。
Time of Update: 2018-12-04
An Android project contains all the files that comprise the source code for your Android app. The Android SDK tools make it easy to start a new Android project with a set of default project directories and files.This lesson shows how to create a new
Time of Update: 2018-12-04
protected static boolean isTopActivity(Activity activity){ String packageName = "xxxxx"; ActivityManager activityManager = (ActivityManager) activity.getSystemService(Context.ACTIVITY_SERVICE); List<RunningTaskInfo>
Time of Update: 2018-12-04
首先,你要有linux環境或其他可以mmm交叉編譯的環境,因為這個用到的是隱藏api,SDK中沒有的,ecilipse裡面會提示包不存在,但交叉編譯可以,如果你不知道 import android.app.Activity;import android.os.Bundle;import android.content.Intent;import android.content.pm.PackageInfo;import
Time of Update: 2018-12-04
在這裡我就對自訂ListView進行講解下吧,直入真題吧,首先我新建立一個項目:listDemo; 其次,我們需要建立一個XML檔案,在這裡我就直接寫在main.xml裡:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
Time of Update: 2018-12-04
android 圖片疊加效果——兩種方法轉自:http://www.cnblogs.com/not-code/archive/2011/08/18/2145126.html:第一種:第二種: 第一種是通過canvas畫出來的效果:public void first(View v) { // 防止出現Immutable bitmap passed to Canvas constructor錯誤 Bitmap bitmap1 =
Time of Update: 2018-12-04
詳見官網http://source.android.com/source/downloading.htmlInstalling RepoRepo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Version Control.To install, initialize, and configure Repo,
Time of Update: 2018-12-04
1、訪問sd卡時報null 指標錯誤的原因是手機USB模式,沒有將disk drive關掉,導致手機端sd卡無法訪問。2、Caused by: java.lang.ClassNotFoundException: your.shot.namespace.MainActivityA in loader
Time of Update: 2018-12-04
android完成色彩坡形是可以靠代碼實現的,那麼我簡單介紹一下實現的方法,是我在項目開發中的一個,其中上方顏色值為#e8e8e8,下方顏色值為#dbdbdb,想要實現漸層並且在漸層的結束有一條明顯的線,那麼就需要漸層結束時的顏色略深於dbdbdb就OK了, 在drawable中建立一個test_gradient.xml檔案內容如下:<?xml version="1.0" encoding="utf-8"?><shape
Time of Update: 2018-12-04
安裝步驟: 1. 下載android ndk,這個就不多說了,我的是ndk-r6b。 2.解壓縮即是安裝。我放在 ~下面了。 寫個HELLO WORLD 1.用Eclipse IDE產生一個預設的最簡單的工程,就是那個只有一個TextView的Hello world. 注意包名,比如我的