Time of Update: 2017-05-13
FloatingActionButton(懸浮按鈕),floatingactionbutton一、介紹這個類是繼承自ImageView的,所以對於這個控制項我們可以使用ImageView的所有屬性二、使用準備, 在as 的 build.grade檔案中寫上compile 'com.android.support:design:22.2.0'三、使用說明<android.support.design.widget.FloatingActionButton android:id=
Time of Update: 2017-05-12
想要在launcher中類比按home鍵。,launcherhome Intent mHomeIntent = new Intent(Intent.ACTION_MAIN); mHomeIntent.addCategory(Intent.CATEGORY_HOME); mHomeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Time of Update: 2017-05-11
Fragment 重疊 遮蓋問題,fragment遮蓋1.導致Fragment 重疊 和遮蓋的原因 主要還是因為Fragment的狀態儲存機制,當系統記憶體不足時,Fragment的主Activity被回收,Fragment的執行個體並沒有隨之被回收。Activity被系統回收時,會主動調用onSaveInstance()方法來儲存視圖層(View
Time of Update: 2017-05-11
解決關於 在android studio 出現的 DELETE_FAILED_INTERNAL_ERROR Error while Installing APK 問題,whileinstallingapk在ionic2開發中,用android studio 打包apk的時候出現DELETE_FAILED_INTERNAL_ERROR Error while Installing APK。我的android studio 版本是 解決方案:Android
Time of Update: 2017-05-13
仿底部TAG完美漸層,tag漸層viewpager+fragment仿底部TAG完美漸層,在圖片漸層的同時字的顏色也在變,注意,是漸層哦!:activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:zhy="http://schemas.android.com/apk/res/com.Sing.weixin" xmlns:tools="http:
Time of Update: 2017-05-10
Android開發筆記(5)——方法調用(基礎),android筆記轉載請註明——部落格園igoslly:http://www.cnblogs.com/igoslly/p/6833544.html 在實際方法調用中,程式按順序逐句執行,直到“}”結束。為避免程式大量重複的代碼(如相同的布局設定、相同的功能),往往將重複的代碼定義為新的方法,如display()、displayPrice(),在原主體方法中我們只需進行調用即可。執行順序如下:1、定義方法 調用範圍:public公用函數&
Time of Update: 2017-05-12
moveTaskToback退背景用法及作用,movetasktoback後台1方法:public boolean moveTaskToBack(boolean nonRoot)activity裡有這個方法,參數說明如下:nonRoot=false→ 僅當activity為task根(即首個activity例如啟動activity之類的)時才生效nonRoot=true→
Time of Update: 2017-05-11
自動匹配關鍵字並且標紅,匹配關鍵字標紅1. 單關鍵字匹配若只需匹配
Time of Update: 2017-05-11
android開發,許可權擷取,android開發許可權轉:http://blog.csdn.net/yawinstake/article/details/6748897訪問登記屬性android.permission.ACCESS_CHECKIN_PROPERTIES ,讀取或寫入登記check-in資料庫屬性工作表的許可權擷取錯略位置android.permission.ACCESS_COARSE_LOCATION,通過WiFi或移動基站的方式擷取使用者錯略的經緯度資訊,定位精度大概誤差在3
Time of Update: 2017-05-09
Android--字串和Drawable之間互相轉化,android--drawable //將字串轉化成Drawable public synchronized static Drawable StringToDrawable(String icon) { if (icon == null || icon.length() < 10) return null; byte[] img =
Time of Update: 2017-05-11
Android開發筆記(6)——類的設定與繼承,android筆記轉載請註明http://www.cnblogs.com/igoslly/p/6838991.html 【類】的設定與繼承當設定相同格式的TextView時,已提出在styles.xml自訂格式統一TextView格式,類似【類】即為自訂方法來統一同類型的變數。 1、定義【類】圖設定了一個名為TextView的【類】,【類】看作【模板】以TextView類命名可命名多個對象(不同ID),應用【類】設定的格式和函數
Time of Update: 2017-05-08
Android中EditText設定輸入條件,androidedittext一、應用情境之前做商城應用時,會有對使用者資料的設定情況進行限制,如下:(1)使用者郵箱,應當只允許輸入英文字母,數字和@.兩個符號,(2)使用者手機,應當只能輸入數字,禁止輸入其他字元。(3)使用者密碼,應當不能輸入空格以及中文字元等。二、解決方案針對使用者郵箱以及使用者手機,有以下兩種解決方案:(1)EditText中的android:digits屬性:它表示EditText能夠接受的字元集合。通過配置此屬性,就可以
Time of Update: 2017-05-09
『原創』手把手教你搭建一個實用的油耗App(一),油耗app 前言: 入行快10年,有點積蓄,三年前買了代步車。於是乎,汽車油耗開銷就成了每個月都必須關注的問題。三年來,用過了無數油耗記錄軟體,比如最知名的“小熊油耗”,從第一次用,一直到最新一版,感覺越來越“臃腫”,功能實在是太豐富了,甚至都做到“大資料”這一層面,作為一個小白車主,其實,我只關心:我的車油耗如何。 後來體驗了幾款應用市場上的油耗app,感覺都不盡如人
Time of Update: 2017-05-08
匿名社交3--訊息評論,匿名社交3--1.描述:擷取訊息評論資料 2.介面out.print("{\"status\":1,\"page\":1,\"perpage\":20,\"msgId\":\"12133\",\"comments\":["+"{\"content\":\"Hehe1\",\"phone_md5\":\"dasdasdbkas\"},"+"{\"content\":\"Hehe2\",\"phone_md5\":\"dasdasdbkas\"},"+"{\"con
Time of Update: 2017-05-07
ArcGIS Android工程遷移到其他電腦不能開啟的問題,arcgisandroid問題描述:當我把已經做好的ArcGIS Android工程想在其他電腦運行時,總是會提示報錯。而報錯的地方,正是出現在下面這條語句上。 compile 'com.esri.arcgisruntime:arcgis-android:100.0.0'解決方案:把這行注釋掉,重新Sync(同步)一下;再把注釋去掉,再Sync一下。你會發現工程可以運行了。如果代碼編輯器右上方沒有找到 SyncNow
Time of Update: 2017-05-08
SharedPreferences詳解,sharedpreferences原文連結:http://blog.csdn.net/zhang31jian/article/details/23258065擷取SharedPreferences的兩種方式:1 調用Context對象的getSharedPreferences()方法2
Time of Update: 2017-05-07
安卓OKhttp請求封裝,安卓okhttp封裝 目前安卓開發中使用的網路工具為OKhttp,但是okhttp的使用還不是很方便,在okhttp的基礎上再對請求進行封裝會極大的方便網路調用。 下面直接上代碼。請求封裝public class HttpUtil { public static void sendOKHttpRequest(String address, Map<String,String> head,Map<String,String>
Time of Update: 2017-05-07
androidj基礎:從網上下載圖片,一、布局檔案設定介面,添加一個ImageView,和兩個Button按鈕,設定其屬性及id <ImageView android:id="@+id/ImageView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true"
Time of Update: 2017-05-07
匿名社交1--登陸,匿名社交1--1.登入功能使用者登陸使用手機號+簡訊驗證碼的方式登陸,伺服器端並不儲存使用者手機號。登陸成功後用戶端可以擷取到登陸標識,用戶端可以通過登陸標識保持相對長時間的訪問伺服器的許可權。 2.介面 獲得驗證碼:{\"status\":1}匿名Login:{\"status\":1,\"token\":\"asdasdasdsadasd\"} 3.代碼MainActivity@Overrideprotected void
Time of Update: 2017-05-07
在Kotlin上怎樣用Mockito2 mock final 類(KAD 23),kotlinmockito2作者:Antonio Leiva時間:Mar 2,