原创 Android之Inflate()方法用途

Inflate()作用就是將xml定義的一個佈局找出來,但僅僅是找出來而且隱藏的,沒有找到的同時並顯示功能。最近做的一個項目就是這一點讓我迷茫了好幾天。 android上還有一個與Inflate()類似功能的方法叫findViewBy

原创 android中Baseadapter的getItem和getItemId的作用和重寫

       重寫Baseadapter時,我們知道需要重寫以下四個方法:getCount,getItem(int position),getItemId(int position),getView方法,getCount決定了listv

原创 tools:context與xmlns:tools學習筆記

【tools:context】 <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"

原创 android:showAsAction="always|withText"分析

在actionBar只顯示了icon但是沒有顯示title,這是怎麼回事呢?於是又在官網深挖了.... 看到了這一段... https://developer.android.com/guide/topics/ui/actionbar.h

原创 android:persistentDrawingCache含義

        網上很多人在尋找這個答案,下面將API中的解釋進行翻譯:   Defines the persistence of the drawing cache. The drawing cache might be enabl