Time of Update: 2018-12-04
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
Time of Update: 2018-12-04
Android的官方開發人員部落格發了一份投影片,介紹了一些Android UI設計的小貼士,在這裡以看圖說話的形式發出來。Don’t: 1、不要照搬你在其它平台的UI設計,應該讓使用者感覺是在真正使用一個 Android 軟體,在你的商標顯示和平台整體觀感之間做好平衡2、不要過度使用模態對話方塊3、不要使用固定的絕對位置的布局4、不要使用px單位,使用dp或者為文本使用sp5、不要使用太小的字型Do: 1、為高解析度的螢幕建立資源(縮小總比放大好)2、需要點擊的元素要夠大3、表徵圖設計遵循
Time of Update: 2018-12-04
一.安裝Ubuntu12.04我個人更喜歡在Windows進行開發,所以Ubuntu的安裝選擇的是Virtual
Time of Update: 2018-12-04
看到最近都在做自訂的東西,因為比較靈活,還可以擺脫系統自身不怎麼漂亮的UI,(大家都懂得)所以自己也做了下自訂的分享列表,用PopupWindow的方式彈出。先上:1、布局:popup_share.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout
Time of Update: 2018-12-04
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
Time of Update: 2018-12-04
今天在做項目時候發現將ListView放入PopupWindow產生問題,ListView放入PopupWindow後對PopupWindow設定了setFocusable(true)這時候其他的控制項全部沒有響應了!我的解決方案是,ListView放入PopupWindow後對你對PopupWindow設定了setFocusable(true);讓PopupWindow獲得了焦點這時候你點擊其它控制項是無法響應的。這時候你可以通過pw(PopupWindow對象).getContextView
Time of Update: 2018-12-04
本文介紹多媒體的音頻和視頻播放。播放音頻和視頻的源檔案可以是一下三種:源檔案(即res/raw下或assets下)檔案系統(即sdcard)流媒體(即網路)1. 播放音頻檔案播放音頻檔案可以用MediaPlayer類或SoundPool類。下面我們來介紹這兩個類。1.1 MediaPlayer從源檔案(即res/raw下或assets下)播放音頻mMediaPlayer = MediaPlayer.create(this,
Time of Update: 2018-12-04
觸摸之後,設定前景色彩,可以告訴使用者確實單擊了,增加使用者體驗。<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
Time of Update: 2018-12-04
今天想把drawable下的所有Drawable Resources 弄清楚,看到Clip Drawable 的時候,把以下原文檔裡的列子考到自己建的項目下clip.xml<?xml version="1.0" encoding="utf-8"?><clip
Time of Update: 2018-12-05
拖動控制項原理其實很簡單,重寫activity的onTouchEvent方法,根據手指所在位置得到x,y座標,再用AbsoluteLayout把指定的控制項設定到該位置。首先,必須用AbsoluteLayout絕對布局:<?xml version="1.0" encoding="utf-8"?><AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
Time of Update: 2018-12-05
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)
Time of Update: 2018-12-05
class SurfaceFlinger : public BinderService<SurfaceFlinger>, public BnSurfaceComposer, private IBinder::DeathRecipient, private Thread, private HWComposer::
Time of Update: 2018-12-05
真他媽的全面呢。1. 請描述下Activity的生命週期。2. 如果背景Activity由於某原因被系統回收了,如何在被系統回收之前儲存目前狀態?3. 如何將一個Activity設定成視窗的樣式。(Edited by Sodino)4. 如何退出Activity?如何安全退出已調用多個Activity的Application?5. 請介紹下Android中常用的五種布局。6. 請介紹下Android的資料存放區方式。(Edited by Sodino)7.
Time of Update: 2018-12-05
北福士志小本(MPRC)Android 2.1移植 Android 2.1 閃屏 移植過程中,小本的核心不支援double
Time of Update: 2018-12-05
Android2.1 移植 北大下本(MPRC)Google賬戶問題Android2.1 中連絡人和日曆可以和電子郵箱同步(必須為Gmail),實現移動互連網資料的雲端儲存。方便,挺好。 但是納悶的是賬戶的登入有兩個不同類型: 一個是公司
Time of Update: 2018-12-05
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
Time of Update: 2018-12-05
摘自文章:[Android源碼] Android 圖形繪製(Skia EGL OpenGL ES)android OpenGL ES 座標系統:它是三維的(當然也有二維的,只是沒有z軸,其他沒區別),座標系的座標原點在螢幕中心,X軸正向水平向右,Y軸正向垂直向上,Z軸垂直螢幕,正向向外。GLES的座標系可以這麼理解,XOZ平面是地平面,Y軸表示高度,以後開發中盡量保持這種風格,否則你會遇到很多座標轉換的問題。android
Time of Update: 2018-12-05
類比滑鼠MotionEvent.ACTION_DOWN:new Thread () {public void run () {try { Instrumentation inst=new Instrumentation(); inst.sendPointerSync(MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(),
Time of Update: 2018-12-05
在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
Time of Update: 2018-12-05
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 =