Time of Update: 2015-12-05
Android JSON資料解析軟硬體環境Macbook Pro MGX 72Android Studio 1.3.2Genymotion模擬器前言如今的APP很少有不跟伺服器打交道的,其中在輕量級的通訊互動中,JSON(JavaScript Object Notation)和XML,並稱為用戶端和服務端互動解決方案的倚天劍和屠龍刀,本文主要介紹JSON相關的知識。JSON對象JSON中對象包括在一對大括弧裡面,對象中的每一個item都是一個"key:value"資料對,資料對之間以逗號來分隔。
Time of Update: 2015-12-09
Android ListView ArrayAdapter
Time of Update: 2015-12-09
【Linux/Ubuntu學習6】unbuntu 下載android源碼,unbuntuandroid 在Windows下安裝Cygwin,通過Cygwin也可在Windows裡通過本文的下載步驟下載Android源碼。以下為在Ubuntu下下載Google Android4.4源碼的步驟: 1. 安裝curl 與 git sudo apt-get install curl sudo apt-get install git-core 2 安裝
Time of Update: 2015-12-09
掌眾android面試題,android試題1,android動畫分類?http://www.cnblogs.com/angeldevil/archive/2011/12/02/2271096.html2,android
Time of Update: 2015-12-09
Android
Time of Update: 2015-12-09
來自GitHub的Android UI開源項目,githubandroid最近在搞Android開發,做了一個項目後感覺,Android開發入門很是簡單,但要能做出使用者體驗比較完美的APP實在是一件很不容易的事情!要達到一定的水準,估計還需要慢慢的積累,這裡先儲存一個GitHub的UI項目,對UI的開發做一些研究!GitHub連結:https://github.com/wasabeef/awesome-android-ui下面是一些該項目彙總的一個開源項目的: 先簡單的放上這幾個圖,
Time of Update: 2015-12-09
開發首屏廣告(Android)簡述作為一個成熟的應用, 必須要有廣告. 那麼, 如何優雅地開發廣告呢? 需要注意一些細節.本文提供一個簡單的樣本, 代碼僅供參考.需求:具體來說, 就是1. 顯示本機存放區廣告圖片, 點擊圖片, 跳轉廣告連結, 並提供分享功能.2. 非同步下載廣告資訊, 提高啟動速度; 非同步下載並儲存廣告和分享圖片, 提高載入速度.開發過程中, 使用了一些小技巧, 我會詳細講解注意的要點, 包括:(1) 使用RxAndroid庫, 在新線程上做非同步下載廣告資訊.(2)
Time of Update: 2015-12-08
新浪微博登入介面上下展開圖片--第三方開源--PullToZoomListViewEx(一),新浪微博第三方登入 Android PullZoomView是github上面的一個第三方開源項目,該項目實現的功能被新浪微博的移動端廣泛使用,其效果就是,當使用者在下拉過程中,頭部的圖片會有一定的展開,當使用者鬆開時候,圖片又收縮複位,:https://github.com/Frank-Zhu/PullZoomViewPullZoomView要實現兩類,一類是典型的Android
Time of Update: 2015-12-09
(轉)onTouchEvent方法的使用,ontouchevent方法手機螢幕事件的處理方法onTouchEvent。該方法在View類中的定義,並且所有的View子類全部重寫了該方法,應用程式可以通過該方法處理手機螢幕的觸摸事件。該方法的簽名如下所示。public boolean onTouchEvent(MotionEvent event)
Time of Update: 2015-12-09
43.Android Base64Util43.Android Base64Utilpublic class Base64Util { /** * bitmap轉成base64 * * @param bitmap bitmap * @return base64 */ public String bitmapToBase64(Bitmap bitmap) { // 將Bitmap轉換成字串 String base64;
Time of Update: 2015-12-08
MD5簡單一實例,md5執行個體當點擊按鈕時,會先判斷是否第一次登陸,如果是第一次登陸登陸則會彈出設定密碼的彈窗,若果登陸過則彈出登陸彈窗其中輸入的密碼會用MD5加密下package com.org.demo.wangfeng.demo;import com.org.wangfeng.R;import android.app.Activity;import android.app.AlertDialog;import
Time of Update: 2015-12-09
Android上在兩個Activity之間傳遞Bitmap對象Android上在兩個Activity之間傳遞Bitmap對象因為我做Android應用的時間不長,所以當我第一次在android之間傳遞Bitmap對象的時候我直接用了Intent.putExtra的方法實現了,當時我選擇的是一張映像的ROI地區,所以工作的很好,但是當我嘗試將整個圖片做為Bitmap對象傳到另外一個Activity中的時候總是得到一個錯誤fatal bind
Time of Update: 2015-12-08
Android 自訂控制項的使用,android自訂控制項首先自訂一個attrs.xml的資源檔,聲明自訂屬性<?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="TopBar"> <attr name="titleText" format="string"></attr> <attr
Time of Update: 2015-12-07
電商、商城類APP常用標籤"hot"--第三方開源--LabelView,app--labelview LabelView是在github上一個開源的標籤庫。其項目首頁是:https://github.com/linger1216//labelview LabelView為一個TextView,ImageView或者為ListView中適配器getView返回的View,增加一個左上方或者右上方的標籤這種需求設計在商城類APP、電商類APP中比較常用,這些
Time of Update: 2015-12-06
Android 複製文本安卓中,用戶端中提供直接複製相關內容的功能,已經算是比較實用的功能了,Android 也提供了相關的API。需要說明的是,相容低版本手機在使用時,注意判斷API版本呢,法代碼如下:new View.OnClickListener() { @SuppressLint("NewApi") @Override public void onClick(View v) {
Time of Update: 2015-12-08
Android5.x Notification應用解析Notification可以讓我們在獲得訊息的時候,在狀態列,鎖定畫面來顯示相應的資訊,很難想象如果沒有Notification,那我們的qq和以及其他應用沒法主動通知我們,我們就需要時時的看手機來檢查是否有新的資訊和提醒著實讓人煩心,也體現出Notification重要性。這裡會介紹三種Notification,分別是普通的Notification,摺疊式Notification和懸掛式Notification。1.
Time of Update: 2015-12-05
TextView來實現單行跑馬燈的效果,textview跑馬燈<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
Time of Update: 2015-12-05
讓TextView出現跑馬燈效果,textview跑馬燈效果只需要在TextView中添加一些屬性即可:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
Time of Update: 2015-12-05
Android整合Facebook sdk,Key Hashes產生步驟如所示,使用facebook sdk進行login和share的時候,需要建立android平台,用到key hashes,產生方法有兩種:方法一:keytool -exportcert -alias 'Nom Nom Eat' -keystore nomnom.jks |openssl sha1 -binary | openssl base64注意事項:1,使用上述命令請替換-alias 和
Time of Update: 2015-12-05
關於安卓的TranslateAnimation的使用安卓的Tween Animation分為4種動畫效果,分別是:alpha (透明變化) translate(位置移動) scale(縮放) rotate(旋轉)。其中Translate動畫就是定義一個開始的位置和一個結束位置,定義移動時間,然後就能自動產生移動動畫,實現控制項的動態位移。Android的translate移動方向有 橫向(X) 豎向(Y)TranslateAnimation(float fromXDelta, float