建立對話方塊Creating Dialogs對話方塊通常是一個顯示在當前活動前面的小視窗。下面的活動失去焦點而由對話方塊接受所有的使用者互動。對話方塊通常被用來當做通知或者運行中的應用程式相關的短暫活動。Android API支援下面的對話方塊物件類型:警告對話方塊AlertDialog這個對話方塊管理0,1,2,或3個按鈕,和/或一個可包含複選框和選項按鈕的可選項列表。這個警告對話方塊能夠組建大多數使用者介面而且是推薦使用的對話方塊類型。請查看下面的建立一個警告對話方塊Creating an
android的進度條有對話方塊進度條、標題進度條和水平進度條一、對話方塊進度條建立步驟1、覆蓋Activity的onCreateDialog()方法,並在其中建立對話方塊。2、調用Activity的showDialog()方法,顯示進度條對話方塊。 /Chapter04_UI_ProgressBar01/src/com/amaker/test/MainActivity.java代碼Code highlighting produced by Actipro CodeHighlighter
Android的Gallery控制項是個很不錯的看圖控制項,大大減輕了開發人員對於看圖功能的開發,而且效果也比較美觀。 /Chapter04_UI_Gallery01/src/com/amaker/test/MainActivity.java代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package
程式檔案/Chapter06_Intent_Category/src/com/amaker/test/MainActivity.java代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package com.amaker.test;import android.app.Activity;import android.content.Intent;
更新ADT20後出現This template depends on Android Support Library錯誤的解決辦法 蛋疼的google,不知道是怎麼回事,最新動向ADT20後,建立工程時無法點擊Finish。 解決辦法如下:1.進入安裝目錄“android-sdk-windows”下,開啟“SDK Manager.exe”;2.找到Extras,選中Android Support Library,Delete package卸載掉當前的Android Support
一、編譯一個簡單的APK LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) # Build all java files in the java subdirectory LOCAL_SRC_FILES := $(call all-subdir-java-files) # Name of the APK to build LOCAL_PACKAGE_NAME := LocalPackage # Tell it to build
TouchDelegates in Android allow to increase the touch area of a View, e.g. Button. This is very useful if you want to make it easier for the user to touch your button. Here is a small example for the usage of a touch delegate. The layout
One of the features I commonly see requested for Android applications is QR code reader or barcode scanner integration. Some native Android applications actually use an external application for QR code/barcode scanning. That, as far as I know, is