參考:https://developers.google.com/maps/documentation/android/start?hl=zh-CN#getting_the_google_maps_android_api_v2 老版本的 google Map Api Key好像已經申請不到了,而且以前網上流行的教程中所給的申請地址點進去後的頁面和教程中所給的不一樣。下面簡單介紹下Google Maps Android API v2版本的 API Key的申請方法,希望能幫到想看到這篇文章的你。
1.擷取狀態列高度:decorView是window中的最頂層view,可以從window中擷取到decorView,然後decorView有個getWindowVisibleDisplayFrame方法可以擷取到程式顯示的地區,包括標題列,但不包括狀態列。 於是,我們就可以算出狀態列的高度了。view plaincopy to clipboardprint?01.Rect frame = new Rect();
I started a project to "demonstrate" Android on existing handsets by way of a VNC server running inside the Android emulator. After further exploration I discovered that one already exists, apparently inside of /system/lib/libsurfaceflinger.so and
MainActivity:package potter.back;import android.app.Activity;public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) {
如果發現匯入工程的時候,出現”No projects are found to import” 的提示,首先查看項目目錄中是否有隱藏檔案.project,還有目錄結構也還要有一個隱藏檔案.classpath, 如果沒有的解決辦法。方法1:最直接的操作,可以把其它項目的.project, .classpath檔案拷貝過來,修改相應的地方則可。1).project檔案只需要修改<name>AboxTVExchange</name>這個項目名稱則可2)