原创 Android 獲取經緯度的服務

Android 獲取經緯度的服務 使用原生Android API 編寫一個Service類獲取經緯度信息(本文僅作爲學習筆記來使用,若侵犯到您的權益,請及時與

原创 Android 自定義View - 網絡加載 ProgressBar 加載與隱藏

在Android App 開發中需要進行頻繁的網絡訪問,在不同的業務邏輯以及頁面中需要頻繁的生成 ProgressBar 來進行調用與展示,想想就是一件麻煩的事情… 來一波圖 : start show hide SO 我們

原创 Android studio AIDL 文件導入

相應的aidl文件 文件內容只需要注意到文件中的包名即可 在Android studio中指定目錄下添加aidl文件夾 目錄結構爲 根據aidl的包名添加目錄 如第一步中的包名 pakage and

原创 Android 將項目上傳至github作爲庫引用

Android 將項目上傳至github作爲庫引用 1.新建一個Android 項目修改項目下的app.gradle文件 //apply plugin: 'com.android.application' apply plugi

原创 Android 騰訊地圖獲取當前縮放級別

Android 騰訊地圖獲取當前縮放級別 tencentMap.setOnCameraChangeListener(new TencentMap.OnCameraChangeListener() { @

原创 android 繼承自同一個BaseActivity的兩個Activity在加載AlertDialog時遇到的問題

題記,困擾了一天的問題!!!!!!!!!!!!!! 在項目中需要在每個Activity訪問網絡時,加載一個加載框。 實現的思路是在BaseActivity 裏面監聽網絡請求並顯示加載框,有兩個Activity同時繼承Ba

原创 Android 撥打電話,訪問瀏覽器

Android 撥打電話,訪問瀏覽器 1.撥打電話 Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone)); context.st

原创 Android Bug variant is not signed

currently selected variant is not signed. Please specify a signing configuration for this variant 1.簽名配置 android{

原创 Android 測量字符串在屏幕中的寬度以及兩個空格的表示

Android 測量字符串在屏幕中的寬度以及兩個空格的表示 1.兩個空格 <string name="spaceTwo">&#12288;</string> 2.獲取字符串在屏幕中的寬度 TextView content = f

原创 Kotlin butterknife build error @BindView fields must not be private or static

Kotlin butterknife build error @BindView fields must not be private or static 如何添加butterknife 請參考鏈接https://blog.c