android構建複合組件

package andorid.j.awin;import android.content.Context;import android.graphics.Canvas;import android.util.AttributeSet;import android.view.View;import android.view.ViewGroup.LayoutParams;import android.widget.Button;import

Android UI小貼士

Android的官方開發人員部落格發了一份投影片,介紹了一些Android UI設計的小貼士,在這裡以看圖說話的形式發出來。Don’t: 1、不要照搬你在其它平台的UI設計,應該讓使用者感覺是在真正使用一個 Android 軟體,在你的商標顯示和平台整體觀感之間做好平衡2、不要過度使用模態對話方塊3、不要使用固定的絕對位置的布局4、不要使用px單位,使用dp或者為文本使用sp5、不要使用太小的字型Do: 1、為高解析度的螢幕建立資源(縮小總比放大好)2、需要點擊的元素要夠大3、表徵圖設計遵循

基於ubuntu12.04下下載android源碼

一.安裝Ubuntu12.04我個人更喜歡在Windows進行開發,所以Ubuntu的安裝選擇的是Virtual

Android 自訂分享列表ACTION_SEND

看到最近都在做自訂的東西,因為比較靈活,還可以擺脫系統自身不怎麼漂亮的UI,(大家都懂得)所以自己也做了下自訂的分享列表,用PopupWindow的方式彈出。先上:1、布局:popup_share.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout

經典的Android案例項目源碼

http://www.apkbus.com/android-20978-1-1.htmlandriod鬧鐘原始碼http://www.apkbus.com/android-20974-1-1.htmlandroid源碼分享之指南針程式http://www.apkbus.com/android-20973-1-1.html重力感應的測試程式andriod原始碼http://www.apkbus.com/android-20972-1-1.htmlandroid源碼分享之時光日誌個人議程管理http

Android中ListView放入PopupWindow產生問題解決

今天在做項目時候發現將ListView放入PopupWindow產生問題,ListView放入PopupWindow後對PopupWindow設定了setFocusable(true)這時候其他的控制項全部沒有響應了!我的解決方案是,ListView放入PopupWindow後對你對PopupWindow設定了setFocusable(true);讓PopupWindow獲得了焦點這時候你點擊其它控制項是無法響應的。這時候你可以通過pw(PopupWindow對象).getContextView

Android_多媒體

本文介紹多媒體的音頻和視頻播放。播放音頻和視頻的源檔案可以是一下三種:源檔案(即res/raw下或assets下)檔案系統(即sdcard)流媒體(即網路)1. 播放音頻檔案播放音頻檔案可以用MediaPlayer類或SoundPool類。下面我們來介紹這兩個類。1.1 MediaPlayer從源檔案(即res/raw下或assets下)播放音頻mMediaPlayer = MediaPlayer.create(this,

Android_FrameLayout的android:foreground屬性可以設定單擊時的前景色彩

觸摸之後,設定前景色彩,可以告訴使用者確實單擊了,增加使用者體驗。<FrameLayout android:foreground="@drawable/pressed_backgorund_corner" ><?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"><item

Android中ClipDrawable的用法

今天想把drawable下的所有Drawable Resources 弄清楚,看到Clip Drawable 的時候,把以下原文檔裡的列子考到自己建的項目下clip.xml<?xml version="1.0" encoding="utf-8"?><clip

Android拖動控制項

拖動控制項原理其實很簡單,重寫activity的onTouchEvent方法,根據手指所在位置得到x,y座標,再用AbsoluteLayout把指定的控制項設定到該位置。首先,必須用AbsoluteLayout絕對布局:<?xml version="1.0" encoding="utf-8"?><AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"

Android Service不被殺死

1.在service中重寫下面的方法,這個方法有三個傳回值, START_STICKY是service被kill掉後自動重寫建立@Overridepublic int onStartCommand(Intent intent, int flags, int startId) {return START_STICKY;}----------------@Overridepublic int onStartCommand(Intent intent, int flags, int startId)

android 4.2 dumpsys SurfaceFlinger 過程

class SurfaceFlinger : public BinderService<SurfaceFlinger>,                       public BnSurfaceComposer,                       private IBinder::DeathRecipient,                       private Thread,                       private HWComposer::

android面試集

真他媽的全面呢。1.    請描述下Activity的生命週期。2.    如果背景Activity由於某原因被系統回收了,如何在被系統回收之前儲存目前狀態?3.    如何將一個Activity設定成視窗的樣式。(Edited by Sodino)4.    如何退出Activity?如何安全退出已調用多個Activity的Application?5.    請介紹下Android中常用的五種布局。6.    請介紹下Android的資料存放區方式。(Edited by Sodino)7.  

Android 2.1閃屏問題

北福士志小本(MPRC)Android 2.1移植 Android 2.1 閃屏 移植過程中,小本的核心不支援double

Android Google 賬戶

Android2.1 移植 北大下本(MPRC)Google賬戶問題Android2.1 中連絡人和日曆可以和電子郵箱同步(必須為Gmail),實現移動互連網資料的雲端儲存。方便,挺好。  但是納悶的是賬戶的登入有兩個不同類型: 一個是公司

ubuntu 12.0.4 下 編譯 android x86

1. 下載完原始碼。準備開始編譯。【安裝sun-java6-jdksudo add-apt-repository ppa:ferramroberto/javasudo apt-get updatesudo apt-get install sun-java6-jdk沒有發現sun-java6-jdkcd  /etc/apt/sources.list.d/ 源的檔案,刪除即可 add-apt-repository "deb http://archive.canonical.com/ lucid

android OpenGL ES 座標系統 和android View座標系統

摘自文章:[Android源碼] Android 圖形繪製(Skia EGL OpenGL ES)android OpenGL ES 座標系統:它是三維的(當然也有二維的,只是沒有z軸,其他沒區別),座標系的座標原點在螢幕中心,X軸正向水平向右,Y軸正向垂直向上,Z軸垂直螢幕,正向向外。GLES的座標系可以這麼理解,XOZ平面是地平面,Y軸表示高度,以後開發中盡量保持這種風格,否則你會遇到很多座標轉換的問題。android

Android: 用Instrumentation類發送滑鼠或按鍵事件

類比滑鼠MotionEvent.ACTION_DOWN:new Thread () {public void run () {try { Instrumentation inst=new Instrumentation(); inst.sendPointerSync(MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(),

android部分編譯

在android的頂層目錄裡,運行下面的命令:source build/envsetup.sh 運行命令後,就添加了很多命令到sh解譯器,具體命令如下:-croot:   Changes directory to the top ofthe tree.-m:       Makes from the top of the tree.-mm:      Builds all of the modules in thecurrent directory.-mmm:     Builds all

android property_service add

for exzample:in AduioService.javaadd code in order to comand for Voice In Call: if (streamType == AudioSystem.STREAM_VOICE_CALL){Log.w(TAG,"sendVolumeUpdate STREAM_VOICE_CALL,");String Callvoice_lev =

總頁數: 2771 1 .... 2099 2100 2101 2102 2103 .... 2771 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.