Time of Update: 2018-12-04
android 圖片疊加效果——兩種方法轉自:http://www.cnblogs.com/not-code/archive/2011/08/18/2145126.html:第一種:第二種: 第一種是通過canvas畫出來的效果:public void first(View v) { // 防止出現Immutable bitmap passed to Canvas constructor錯誤 Bitmap bitmap1 =
Time of Update: 2018-12-04
詳見官網http://source.android.com/source/downloading.htmlInstalling RepoRepo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Version Control.To install, initialize, and configure Repo,
Time of Update: 2018-12-04
錯誤:在進行android-sdk-windows中進行 update all時, 報錯 folder failed to be renamed or moved...,goole了一下,有外國網友解決辦法如下:方法一:1, 複製 tools目錄,粘貼到android-sdk-windows下面改名為tools-copy ,此時在android-sdk-windows 目錄下有兩個目錄 tools 和 tools-copy2, 在tools-copy目錄運行 android.bat
Time of Update: 2018-12-04
1、訪問sd卡時報null 指標錯誤的原因是手機USB模式,沒有將disk drive關掉,導致手機端sd卡無法訪問。2、Caused by: java.lang.ClassNotFoundException: your.shot.namespace.MainActivityA in loader
Time of Update: 2018-12-04
Abends: Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 11.0.0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0.0.v201105251008-128486)
Time of Update: 2018-12-04
因為代碼相對邏輯還比較簡單,經過簡單的刪減調整關係之後,基本上第一次關係理順。
Time of Update: 2018-12-04
This is the first time to study Android for me, I referred to the Android Zone. When i saw Android at the first time, i fall in love with it. I feel that it is very interesting. Compared to IOS, i prefer to Android development. Due to open source, i
Time of Update: 2018-12-04
package andorid.j.awin;import android.content.Context;import android.graphics.Canvas;import android.util.AttributeSet;import android.view.View;import android.view.ViewGroup.LayoutParams;import android.widget.Button;import
Time of Update: 2018-12-04
近日,在項目開發中,涉及到一些關於EditText彈出鍵盤的問題,現涉及到如下幾種,以後再遇到,再來更新~ 1.自動彈出鍵盤 <activity android:name=".ui.WriteFeedBackActivity" android:windowSoftInputMode="stateVisible|adjustResize"/> 2.不自動彈出鍵盤
Time of Update: 2018-12-04
android.view.View已知直接子類:AnalogClock, ImageView, KeyboardView, ProgressBar, SurfaceView, TextView, ViewGroup, ViewStub已知間接子類:AbsListView, AbsSeekBar, AbsSpinner, AbsoluteLayout, AdapterView<T extends Adapter>, AppWidgetHostView,
Time of Update: 2018-12-04
轉自:http://android.yaohuiji.com/archives/299android2.2開始增加了match_parent這個屬性,這個屬性和原來的fill_parent一樣,如果作程式時,向考慮自己的程式向下相容的話,就要用fill_parent,下面是兩者相同的證據,看android.view.ViewGroup裡的靜態嵌套類LayoutParams中的代碼:public static final int FILL_PARENT = -1; /** *
Time of Update: 2018-12-04
android完成色彩坡形是可以靠代碼實現的,那麼我簡單介紹一下實現的方法,是我在項目開發中的一個,其中上方顏色值為#e8e8e8,下方顏色值為#dbdbdb,想要實現漸層並且在漸層的結束有一條明顯的線,那麼就需要漸層結束時的顏色略深於dbdbdb就OK了, 在drawable中建立一個test_gradient.xml檔案內容如下:<?xml version="1.0" encoding="utf-8"?><shape
Time of Update: 2018-12-04
近日研究通話記錄 查詢資料去重,一直在研究 getContentResolver().query這個方法,對其中的幾個參數也小研究了一下。找到了通話記錄去重的辦法。 如果只取一列資料可以用distinct(number) as distinct_number ,Cursor mCallLogCursor = getContentResolver().query(CallLog.Calls.CONTENT_URI, -------------
Time of Update: 2018-12-04
一、全屏設定public void updateFullscreenMode() { ///將下面的變數isFullscrean置為false,問題解決。google也是這麼解釋的~~ boolean isFullscreen = mShowInputRequested && onEvaluateFullscreenMode();//YES,IT IS HERE!! boolean changed =
Time of Update: 2018-12-04
最近做項目要做廣告位的展示,所以就簡單的做了這個小項目。代碼很簡單:1、實現功能代碼:package com.my.zx;import java.util.Timer;import java.util.TimerTask;import android.app.Activity;import android.content.Context;import android.os.Bundle;import android.os.Handler;import
Time of Update: 2018-12-04
看到最近都在做自訂的東西,因為比較靈活,還可以擺脫系統自身不怎麼漂亮的UI,(大家都懂得)所以自己也做了下自訂的分享列表,用PopupWindow的方式彈出。先上:1、布局:popup_share.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout
Time of Update: 2018-12-04
之前用的舊版的SDK管理器,最高只能安裝Android 3.2 API,需要更新SDK管理器版本後才能安裝Android 4.0、Android 4.1,方法如下: 第一步:開啟SDK管理器,選擇Available packages,點擊“Add Add-on Site...”,輸入網址 http://developer.android.com/sdk/index.html 第二步:將Android
Time of Update: 2018-12-04
EntityDao.java代碼如下:import java.io.Serializable;import java.util.List;/** * 基本DAO介面 * @author EwinLive * * @param <T> * @param <PK> */public interface EntityDao<T, PK extends Serializable> {/** * 添加 * @param entity */void save(final
Time of Update: 2018-12-04
Toast用於向使用者顯示一些協助/提示。下面我做了4中效果,來說明Toast的強大,定義一個屬於你自己的Toast。1.預設效果代碼Toast.makeText(getApplicationContext(), "預設Toast樣式", Toast.LENGTH_SHORT).show();2.自訂顯示位置效果代碼toast = Toast.makeText(getApplicationContext(), "自訂位置Toast", Toast.LENGTH_LONG);
Time of Update: 2018-12-04
在很多時候,我們需要訪問android中的資源檔,這些資源檔主要分為兩類,一種出於asset目錄下,稱為原生檔案,這類檔案在被打包成apk檔案時是不會進行壓縮的;另一類則是res下的檔案,這類檔案在打包成apk檔案時,會進行小記憶體最佳化的哦。兩種不同類型的檔案,對應著不同的訪問模式。我們先來看看asset檔案的訪問: