Time of Update: 2015-12-02
android 快顯功能表,android快顯功能表<!-- 定義基礎布局LinearLayout --><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height=
Time of Update: 2015-12-02
android 按兩次物理返回鍵退出程式,android兩次<?xml version="1.0" encoding="utf-8"?><!-- 定義當前布局的基本LinearLayout --><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height=
Time of Update: 2015-12-01
android 程式退出的對話方塊,android退出package com.example.yanlei.yl;import android.graphics.Color;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.view.Menu;import android.view.MenuItem;import
Time of Update: 2015-12-01
通過百度地圖API實現搜尋地址--第三方開源--百度地圖(三),api開源搜尋地址功能是建立在能夠通過百度地圖API擷取位置的基礎上通過百度地圖定位擷取位置詳情:http://www.cnblogs.com/zzw1994/p/5008134.html 1 package com.zzw.baidumappoint; 2 3 import com.baidu.location.BDLocation; 4 import
Time of Update: 2015-12-01
android 加一個按鈕,退出程式,android退出 package com.example.yanlei.yl;import android.graphics.Color;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.view.Menu;import android.view.MenuItem;import
Time of Update: 2015-12-01
android 拍照預覽,android拍照<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation=
Time of Update: 2015-12-01
android 獲得螢幕寬度和高度,android寬度<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"
Time of Update: 2015-12-01
對圖片進行各種樣式裁對圖片進行各種樣式裁剪:圓形、星形、心形、花瓣形等剪:圓形、星形、心形、花瓣形等--第三方開源--CustomShapeImageView,CustomShapeImageView在github上的項目首頁是:https://github.com/MostafaGazar/CustomShapeImageView 如果僅僅是需要擷取圓形、心形、花瓣形頭像圖片(具體看Demo),那麼經過Android CustomShapeImageView簡單XML設定就可以實現。
Time of Update: 2015-12-01
android 獲得螢幕狀態,android獲得螢幕<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"
Time of Update: 2015-11-29
演算法—7.無序鏈表中的順序尋找,演算法無序1.基本思想符號表中使用的資料結構的一個簡單選擇是鏈表,每個結點儲存一個索引值對,如演算法中的代碼所示。get()的實現即為遍曆鏈表,用equals()方法比較需被尋找的鍵和每個結點中的鍵。如果匹配成功我們就返回相應的值,否則我們返回null。put()的實現也是遍曆鏈表,用equals()方法比較需被尋找的鍵和每個結點中的鍵。如果匹配成功我們就用第二個參數指定的值更新和該鍵相關聯的值,否則我們就用給定的索引值對建立一個新的結點並將其插入到鏈表的開頭。
Time of Update: 2015-11-30
演算法—8.有序數組中的二分尋找,演算法數組二分1.具體演算法/** * 演算法3.2 二分尋找(基於有序數組) * Created by huazhou on 2015/11/29. */public class BinarySearchST<Key extends Comparable<key>, Value> { private Key[] keys; private Value[] vals; private int N; public
Time of Update: 2015-11-29
Android 之
Time of Update: 2015-12-01
starting Intent from ProcessRecord with revoked permission android.permission.CALL_PHONE 的錯誤,androidintent 昨天寫個電話撥號器,很簡單就一個Edittext和一個button,用來輸入號碼並且點擊按鈕撥打到電話,但是寫好以後報的是安全錯誤,我上網查了下,原來是缺少授權,於是我在AndroidManifest.xml檔案中加了一行授權碼<uses-permission
Time of Update: 2015-11-30
android 之 animations 動畫,androidanimationsandroid 提供的了兩種機制你可以用來建立簡單的動畫:tweedned animation(漸層動畫) 和 frame-by-frame animation(逐幀動畫)(有道翻譯的,汗!!!) 。這裡主要介紹tweedned animation中的四種動畫形式:alpha(淡入淡出效果)、scale(放縮)、rotate(旋轉)
Time of Update: 2015-11-30
自訂 EditText 和 Button,edittextbutton 實現 1.edittext 布局中添加控制項 <EditText android:layout_width="150dp" android:layout_height="45dp" android:layout_gravity="center" android:layout_marginTop="20dp"
Time of Update: 2015-11-28
兩個activity之間傳遞資料用startActivityForResult方法。,startactivityresult 1 package com.example.testactivityresquest; 2 3 import android.app.Activity; 4 import android.content.Intent; 5 import android.os.Bundle; 6 import android.view.View; 7 import
Time of Update: 2015-11-29
Android開發技巧——自訂控制項之使用styleAndroid開發技巧——自訂控制項之使用style回顧在上一篇《Android開發技巧——自訂控制項之自訂屬性》中,我講到了如何定義屬性以及在自訂控制項中擷取這些屬性的值,也提到了關於這些屬性除了可以在布局檔案中指定之外,也可以在主題中指定。接下來將分享我所瞭解的關於在主題中指定屬性值的兩種方式。在主題中指定屬性值我們在開發過程中,雖然關於自訂控制項學會了如何在布局檔案中指定它的值,以應對不同的
Time of Update: 2015-11-29
演算法—符號表,演算法符號定義:符號表是一種儲存索引值對的資料結構,支援兩種操作:插入(put),即將一組新的索引值對存入表中;尋找(get),即根據給定的鍵得到相應的值。1.有序符號表2.成本模型尋找的成本模型:在學習符號表的實現時,我們會統計比較的次數(等價性測試或是鍵的相互比較)。在內迴圈不進行比較(極少)的情況下,我們會統計數組的訪問次數。 3.符號表的用例/** * 符號表用例 */public class FrequencyCounter {public static
Time of Update: 2015-11-28
提高效率的 Android Studio 技巧匯總,androidstudio這是從Philippe Breault的系列文章《Android Studio Tips Of the Day》中提取出來的自認為精華的部分。這些技巧在實際應用中能夠非常大的提高工作效率。關於快速鍵The File Structure Popupctrl+f12此快速鍵可以調出當前檔案的大綱,並通過模糊比對快速跳轉至指定的方法。勾選上“show anonymous
Time of Update: 2015-11-29
Android WebView頁面載入最佳化 目前webapp越來越多,體驗也越來越好,為了能夠更好的使用WebView展示出流暢的的頁面,可以從以下幾點做最佳化:WebView緩衝資源檔本機存放區減少耗時操作用戶端UI最佳化可能有人會說了,為什麼不做成native的呢,這樣就不用那麼的麻煩了。如果我需要載入的內容都是靜態,當然做成native的是最好的,為什麼我們要使用WebView呢,因為它可以載入一些容易改變的內容,同時也方便製作多平台應用。WebView可以最佳化的哪些地方呢?