原创 ubuntu 64位 使用androidstudio出現的問題----Adb not responding

http://simpledeveloper.com/adb-not-responding-android-solution/ sudo apt-get install lib32stdc++6

原创 在eclipse中搭建測試環境

在AndroidManifest.xml中的application中添加標籤: <uses-library android:name="android.test.runner"/> 在Application標籤外添加標籤: <instr

原创 ViewPage指示器

ViewPage指示器 1、先看佈局文件 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk

原创 ThreadLocal淺談

ThreadLocal 不知道怎麼定題 T.T 先看一下官方的解釋 Implements a thread-local storage, that is, a variable for which each thread has

原创 TableLayout不能佔滿屏幕問題解決

TableLayout不能設置寬度導致當前界面並沒有充分利用屏幕的寬度,右側還空出了一塊區 域 , 這 也 難 怪 , 因 爲 在 TableRow 中 我 們 無 法 指 定 控 件 的 寬 度 。 這 時 使 用 an

原创 ubuntu64編譯android程序提示缺少類庫

/home/catia/android-sdks/platform-tools/aapt: error while loading shared libraries: libz.so.1: cannot open shared obje

原创 Unable to recreate missing debug keystore.

翻譯自:http://stackoverflow.com/questions/20788875/android-studio-unable-to-recreate-missing-debug-keystore 找到android  SDK

原创 EventBus簡單使用

簡介: EventBus是基於觀察者/訂閱者模型 1.訂閱者訂閱自己希望的事件類型,發佈者將事件發送到EventBus後,由EventBus決定將事件交給哪個訂閱者處理 2.使用EventBus,EventBus最常用的幾個方法原型

原创 Android 中的Handler詳解

Android 中的Handler詳解 先看一下一個線程中使用Handler的步驟 class MyThread extends Thread { @Override

原创 AndroidStudio NDK開發

參考鏈接:http://tools.android.com/tech-docs/new-build-system/gradle-experimental 環境介紹:AndroidStudio2.1.2,NDK R12 拋棄之前的生成頭

原创 EventBus源碼解析一

在這一篇文章中,我們會介紹在調用 EventBus.getDefault().register(this); 之後都發生了什麼 首先介紹一下各種名詞的含義: subscriber 類的成員函數有用 @Subscribe() 註解修飾

原创 EventBus高級使用姿勢

如果你還沒用過EventBus,強烈建議你看這篇文章點這裏 配置適合業務的EventBus EventBus中有一個獲取默認實例的方法EventBus.getDefault(),默認的EventBus有以下幾個特點(包括但不限於) 打印

原创 安卓界面所有控件整體縮放

使用此種方法時,需要注意:要在佈局文件中把大小寫成px或者使用wrapcontent import android.app.Activity; import android.util.DisplayMetrics; import

原创 EventBus源碼解析二

EventBus的post過程 首先看post(Object event)函數實現 //EventBus.java /** Posts the given event to the event bus. */ pu

原创 calligraphy(高效加載字體包)使用方法

首先你要用的是AndroidStudio,Eclipse的話~~~~還是用AndroidStudio吧 首先需要在build.gradle中添加配置信息, compile 'uk.co.chrisjenx:calligraphy:2.1