標籤:我們在定義一個drawable的時候可以通過xml定義的drawable對象。它使得一個圖片能在不同的狀態下顯示不同的圖案,比如一個Button,它有pressed,focused,或者其它狀態,通過使用state list drawable,你就可以為每種狀態提供不同的圖片。先看一個範例: XML file saved at res/drawable/button.xml:<?xml version="1.0" encoding="utf-8"?><
標籤: 根據以往在eclipse上的經驗,在Android studio上開發的時候也將assets目錄放在了src/main/res目錄下,build的時候出現如下異常: Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]Configuration on demand is an incubating
標籤:項目中有時需要將頂部的狀態列給隱藏掉,在網上搜了搜基本上都不能用,原因大概是當程式啟動並執行時候狀態列已經顯示出來,然後再調狀態列的set方法會不起作用(至於為什麼不起作用還不清楚)。 隱藏狀態列方法1: 修改plist檔案,添加 Status bar is initially hidden 當設定成為YES時,程式啟動的時候就隱藏了(啟動頁也不顯示) 添加View controller-based status bar appearance
標籤:opengl opengl es android opengl mapping coordinates 紋理壓縮 Android 目前支援下面幾個版本的OpenGL ES API :OpenGL ES 1.0 和 1.1 :Android 1.0和更高的版本支援這個API規範。OpenGL ES 2.0 :
標籤:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the
標籤:metadata在app開發過程中,經常需要顯示media檔案的meta data資訊,我們如何擷取這些資訊呢?MediaStore首先想到的就是MediaStore類了,它為我們提供的豐富的屬性,我們只要通過sqlite操作,就能擷取這些屬性提供的值啦。public static final String[] ItemImageProjection = new String[]