Time of Update: 2015-09-02
Android自學曆程—手把手教你使用OkHttp(基礎篇),androidokhttp安裝在使用OkHttp前,我們需要先匯入OkHttp的第三方庫。我們可以在Github上找到她的項目地址: https://github.com/square/okhttp我們可以在Android Studio中使用Gradle, 最後效果如下: 測試使用我們的OKHttp第三方庫1.第一步我們需要去建立一個 OKHttpClient 對象OkHttpClient
Time of Update: 2015-09-02
android 擷取application和activity下meta-data中的值,androidmeta-data
Time of Update: 2015-09-01
android 判斷手機中是否有SD卡,USB。靜態判斷,androidsd對SD卡的判斷分靜態和動態,動態通過註冊廣播,網上很多人都在寫,這裡就不做過多的闡述。對於這種靜態判斷我在網上找的都是 Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);寫代碼驗證之後發現判斷不成功。以下這種方法算是一種可行的判斷,希望對你們有所協助。 <pre
Time of Update: 2015-08-31
PullScrollView詳解(六)——延伸拓展(listview中getScrollY()一直等於0、ScrollView中的overScrollBy),listview與scrollview前言:經常說follow your
Time of Update: 2015-08-30
轉寄離線安裝 Android Studio 更新,androidstudio1、線上更新 隨著 Android Studio 的越來越完善與流行,無論從功能性,還是效能上,它正在成為廣大 Android 開發人員的首選。但是因為總所周知牆的原因,我們在 Android Studio 內更新時,會無法更新:
Time of Update: 2015-08-30
Android實戰簡易教程-第四十八槍(App引導頁面效果實現),androidapp經常使用APP的童鞋會發現,第一次進入APP會有引導頁面,裡面可以放一些APP的使用介紹或其他資訊等等,下面我們研究一下如何?這個功能,增加APP的體驗。一、自訂控制項繼承ViewGroup:package com.genius.scroll;import android.content.Context;import android.content.Intent;import
Time of Update: 2015-08-30
Android實戰簡易教程-第四十七槍(ListView多選-實現點餐系統),androidlistview一般在外賣的選單中常常會用到ListView的多選,大家可以改進後加入自己的項目中。下面看一下代碼:一、代碼1.main.xml:(由一個ListView和一個Button組成)<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http:/
Time of Update: 2015-08-29
Activity之間傳遞資料或資料包Bundle,傳遞對象,對象序列化,對象實現Parcelable介面,bundleparcelable 1 package com.gaojinhua.android.activitymsg; 2 3 import android.content.Intent; 4 import android.os.Bundle; 5 import android.support.v7.app.AppCompatActivity; 6 import
Time of Update: 2015-08-29
關於SVN下載代碼和Android Studio裡面匯入別人代碼build tools不一致問題總結,svnandroid項目build tools的sdk我沒有 網路問題沒法下載。解決問題 方法1.下載對應的SDK。需要VPN,或者FQ2.將bulid.gradle的內容用下面的內容替換// Top-level build file where you can add configuration options common to all
Time of Update: 2015-08-29
android開發環境搭建日記和嵌入式Android開發環境初探,android初探非常感謝部落格園的各位,按照你們的博文,還有利用百度和Google逐漸建立了android的開發環境,只是給自己備份參考查看,看過的人可以忽略這篇文章。本文章大部分參考了:http://www.cnblogs.com/zoupeiyang/p/4034517.html
Time of Update: 2015-08-29
Android線程間非同步通訊機制源碼分析,android源碼 本文首先從整體架構分析了Android整個線程間訊息傳遞機制,然後從源碼角度介紹了各個組件的作用和完成的任務。文中並未對基礎概念進行介紹,關於threadLacal和記憶體回收等等機制請自行研究。基礎架構
Time of Update: 2015-08-29
自訂圓形控制項 RoundImageView,控制項roundimageview1、自訂圓形控制項 RoundImageViewpackage com.ronye.CustomView;import android.content.Context;import android.content.res.TypedArray;import android.graphics.Bitmap;import android.graphics.Canvas;import
Time of Update: 2015-08-29
[HTTP那些事] JSON資料,http那些事json資料隨著Android的發展,各路大神的貢獻,我們可用的輪子越來越多。比如HTTP請求架構,有自家的Volley,Square的okhttp, async-http-lib,
Time of Update: 2015-08-29
關於FragmentManager findFragmentById 返回nul,findfragmentbyid先看Fragment的兩種產生方式一.用xml標籤產生在fragment的宿主activity中添加xml標籤1 <fragment2 android:id="@+id/fragment_newsContent"3 android:name="com.firstcode.section4_news.NewsContentFragment"
Time of Update: 2015-08-29
android 處理序間通訊資料(二)------parcel的實現,androidparcelSerialize是java原生就內建的東西,我們可以看到android的源碼所以看看android是如何?parcel的,這對我們自己代碼設計有什麼啟發。Parcel:在android中,parcel的源碼如下:Frameworks/base/core/java/android/os/Parcel.java /** * Write an integer value into the
Time of Update: 2015-08-29
Android報錯:The content of the adapter has changed...與Channel is unrecoverably broken and will be disposed的分析與解決辦法,hostchanneladapter在Android中adapter錯誤:The content of the adapter has changed but ListView did not receive a notification. Make sure the
Time of Update: 2015-08-29
Android 使用開源庫載入網狀圖片Android 使用開源庫載入網狀圖片,使用開源庫載入圖片。單擊listview彈出popupwindow彈出框詳情查看:Android 單擊listview彈出popupwindow彈出框,裡面還附帶listview右滑刪除按鈕詳情查看:Android 使用NineOldAndroids實現仿listview左滑出現刪除itembutton。項目就是這樣慢慢變得複雜,是往裡面逐漸加功能,效果,代碼。 本文項目源碼:點擊一、看實現的效果
Time of Update: 2015-08-29
android 首頁fragment切換方法一:布局檔案: android:layout_width=match_parentandroid:layout_height=match_parentandroid:orientation=vertical ><framelayoutandroid:layout_width=match_parentandroid:layout_weight=1android:layout_height=0dp
Time of Update: 2015-08-29
Android Ethernet從上至下解析一最近遇到不少架構問題,比如關於網口的,開機後拔掉有線網,狀態列和設定項中有線網顯示表徵圖不會更新,還有雙網口的需求,下面就帶著這個問題,以跟蹤網路狀態問題為引線,本篇將貫穿分析Ethernet從上至下的架構結構。因能力和時間有限,文中有分析不到位的地方,十分歡迎大俠們拍磚。首先看下應用程式層網路監聽相關的app 網路監聽一:設定
Time of Update: 2015-08-29
Android中ActionBar置中經常會用到將ActionBar文字置中的問題,這裡寫個代碼如下: //把actionBar的文字標題置中 public static void centerActionBarTitle(Activity activity) { int titleId = activity.getResources().getIdentifier(action_bar_title, id, android); if (