原创 淡入動畫
本節講解AlphaAnimation 動畫,窗口的動畫效果,淡入淡出什麼的,有些遊戲的歡迎動畫,logo的淡入淡出效果就使用AlphaAnimation。 直接看代碼: public class MainActivity extends
原创 debug簽名 和 release簽名
使用keytool 簽名的時候得到的是debug簽名 步驟直接複製: 第1步:運行進入控制檯 第2步:定位到.android文件夾下,輸入cd .android(C盤用戶文件下) 第3步:輸入keytool -list -v -keys
原创 Dialog中有EditText無法彈出輸入法解決方法
今天在做項目的時候在Dialog中添加EditText的時候不能彈出輸入法: 我用了下面的方法: 在dialog.show後加 dialog.getWindow().clearFlags(WindowManager.LayoutPara
原创 Dialog的圓角 自定義
在用的AlertDialog的時候發現Dialog的邊框是直角感覺不好看,準備自定義,從網上查了半天發現有人分享了一個自定義Dialog的源碼,我大概看了一下,感覺源碼裏面最主要代碼的就是 dialog.setContentView(l
原创 Android動態實現文字顏色選擇器 ColorStateList
在公司做項目的時候設計到了動態設置選擇器的內容今天我來寫一下關於動態實現選擇器的內容: 應爲才進公司所以被分配到的是簡單的活,修改按鈕的字體顏色,也就是實現字體顏色的選擇器,因此我先說ColorStateList : ColorStat
原创 分享的Intent實現
private void shareApplication() { Intent intent = new Intent(); intent.setAction("android.intent.action.SEND"); i
原创 線程本地化ThreadLocal
class Accessor implements Runnable { private final int id; public Accessor(int idn) { id = idn; } public v
原创 Android Studio 新建Activity顯示ActionBar
在AS新建Activity的時候一直不顯示ActionBar,嘗試修改成AppCompatActivity後App就一直不能正常運行,點開Theme看了一下原來顯示的主題不對,嘗試修改後就好了 原來的: <style name="A
原创 自定義ListView顯示項
public class PriceAdapter extends BaseAdapter { Map gasPrice;//加油站價格 Map price;//省控基準油價 Context contxt;
原创 Git的使用
以下是我在http://www.liaoxuefeng.com/ 學習過程的總結方便以後使用 一、安裝git 1. ubuntu 安裝git的步驟 sudo apt-get install git(或者git-core) 2.設置
原创 ScaleAnimation 縮放動畫效果
ScaleAnimation(float fromX, float toX, float fromY, float toY,int pivotXType, float pivotXValue, int pivotYType, float
原创 linux下打開windows txt文件中文亂碼解決方法
iconv -f gbk -t utf8 筆記.txt > 筆記.txt.utf8筆記.txt.utf8 打開後不是亂碼在windows環境中中文壓縮一般爲gbk,而在linux環境中爲utf8,這就導致了在windows下能正常顯示t
原创 Ubuntu Android Studio NDK開發
Android Studio版本:release 1.2.3 創建一個空的project。創建一個空的activity。 在該類裏面定義一個native方法。如下: [java] view plaincopy
原创 Ubuntu下的NDK配置
NDK官方下載地址 從官網下載後得到一個bin文件 然後輸入 ndk$ chmod a+x android-ndk-r10e-linux-x86_64.bin ndk$ ./android-ndk-r10e-linux-x86_64.b
原创 ubuntu android studio ADB問題
ubuntu下的android studio 一直不能啓動後來在網上找了半天有人說在 SDK包下的platform-tools目錄下執行了adb start-server命令 當我執行的時候報 adb: error while loadi