Time of Update: 2017-04-05
訂單流程view,訂單viewactivity_main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
Time of Update: 2017-04-01
Android系統的“程式異常退出”,android退出 Android系統的“程式異常退出”,給應用的使用者體驗造成不良影響。為了捕獲應用運行時異常並給出友好提示,便可繼承UncaughtExceptionHandler類來處理。通過Thread.setDefaultUncaughtExceptionHandler()方法將異常處理類設定到線程上即可。1、異常處理類,代碼如下:public class CrashHandler implements
Time of Update: 2017-04-05
Xamarin android 的WebClient Json下載並儲存本地及sqlite資料庫,xamarinsqlite這一點雕蟲小技可能對熟悉的人來說已經不值一提。但是我想,既然這些都是常用的功能,整合在一起做個筆記也有點意義吧。首先,json 是傳遞資料的事實標準了。所以先說一下將它從伺服器端下載下來。.net 裡的庫是極好的,這也是我對Xamarin頗有好感的一個原因。一個WebClient就可以將任何資料下載下來,爽極了。System.Net.WebClient wc = new
Time of Update: 2017-04-01
BottomBar之Android底部菜單,bottombarandroidBottomBar之Android底部菜單 前言:開源項目BottomBar,實現Android底部菜單(常用菜單,BottomBar實現動畫(上下式)+訊息菜單,BottomBar+ViewPager+Fragment實現炫酷的底部導航效果) 效果: 開發環境:AndroidStudio2.2.1+gradle-2.14.1 引入依賴: compile
Time of Update: 2017-04-03
填坑實錄 Android Studio 利用 ADB WIFI 外掛程式實現真機無線調試,androidadb總是用模擬器,小破本的渣記憶體無法承受,同時模擬器的版本大多停在4.4,無法體現Android 5.0、6.0 的版本特性,因此決定利用 Android Studio 的外掛程式實現真機無線調試。步驟如下:1. 手機開啟 USB 偵錯模式 :把手機通過 USB 資料線串連到電腦,開啟 USB調試,步驟如下:(以MEIZU PRO6 ,flyme5.2.3.0A為例)
Time of Update: 2017-04-01
踩坑實錄 Android studio中關於 No cached version of **** available for of處理辦法,androidcached當我們添加某些依賴庫(Okhttp、Retrofit)時, Android studio 會報如下錯誤:Error:A problem occurred configuring project ':app'.> Could not resolve all dependencies for
Time of Update: 2017-04-02
Application,applicationformBase class for maintaining global application state. You can provide your own implementation by creating a subclass and specifying the fully-qualified name of this subclass as the "android:name" attribute in your
Time of Update: 2017-03-30
購物車動畫(Android),購物車動畫android購物車動畫(Android) 前言:當我們寫商城類的項目的時候,一般都會有加入購物車的功能,加入購物車的時候會有一些拋物線動畫,最近做到這個功能,藉助別人的demo寫了一個。 效果: 開發環境:AndroidStudio2.1.2+gradle-2.10 涉及知識:1.沈浸式狀態列,2.單位精度計算(價格),3.List之Iterator。 部分代碼:public
Time of Update: 2017-03-31
自訂控制項詳解(一):Paint類與Canvas類,paintcanvas 前言: 自訂控制項必需的兩個類:Paint與Canvas Paint --- 相當於繪圖的"筆" Canvas --- 相當於繪圖的"紙" 一、Paint 繪圖筆,即用來設定比如 顏色、線條寬度、線條透明度等熟悉的。 看一下Paint類所有的setXX()
Time of Update: 2017-03-30
弧形菜單(Android),弧形菜單android弧形菜單(Android) 前言:公司需求,自己寫的一個弧形菜單! 效果: 開發環境:AndroidStudio2.2.1+gradle-2.14.1 涉及知識:1.自訂控制項,2.事件分發等 部分代碼:public class HomePageMenuLayout extends ViewGroup { private Context context; //
Time of Update: 2017-03-29
[Android]資料篇,android資料 轉載請標註:轉載於http://www.cnblogs.com/Liuyt-61/p/6637515.html ---------------------------------------------------------------Android資料的四種儲存方式: 1、SharedPreferences 2、SQLite 3、Content Provider 4、File------
Time of Update: 2017-03-29
EventBus通訊小能手,EventBus通訊能手 1、EventBus簡介 EventBus 是由 greenrobot 組織開發的一個 Android 事件發布/訂閱輕量級架構,特點:代碼簡潔,是一種發布訂閱設計模式(觀察者設計模式)。EventBus 可以代替 Android 傳統的 Intent, Handler, Broadcast或介面函數,在 Fragment, Activity, Service
Time of Update: 2017-03-29
Android CursorAdapter的使用,cursoradapter使用CursorAdapter繼承於BaseAdapter,為Cursor和ListView串連提供了橋樑。首先看一下CursorAdapter的部分源碼:/** * @see android.widget.ListAdapter# getView(int, View, ViewGroup) */ public View getView( int position, View
Time of Update: 2017-03-29
Android菜單(動畫菜單、360波紋菜單),android波紋 Android菜單(動畫菜單、360波紋菜單)前言:Android菜單常用集合:FragmentTabHost系統功能表、上移式菜單、360波紋菜單、展開式菜單。詳解注釋,可直接拿來用! 效果:
Time of Update: 2017-03-29
Native SBS for Android,nativeandroid Native SBS for Android是一款非常棒的軟體,支援安卓在2D介面下左右分屏顯示,並可以設定縮放比例及左右間距,橫屏自動切換為左右分屏顯示模式,豎屏則為正常顯示。啟動左右分屏模式後,將手機放到Google Cardboard或者Daydream View中,即可在VR模式下體驗原生的2D遊戲。該軟體有免費版(帶廣告)可試用,也有付費版。免費版在Nexus
Time of Update: 2017-03-27
微博API常用方法,博API常用方法1.擷取24小時內前20條使用者的微博資訊List<Status> statuses = weibo.getFriendsTimeline();for (Status status : statuses) {System.out.println(status.getUser().getName() + ":" +status.getId()+":"+ status.getText() + status.getOriginal_pic()); }2.
Time of Update: 2017-03-27
學習《第一行代碼》使用實機測試所遇問題(一),《第一行代碼》在java代碼中使用Button時,Button變紅Button button1 = (Button) findViewById(R.id.button_1);button1.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){
Time of Update: 2017-03-26
Kotlin操作符重載:把標準操作加入到任何類中(KAD 17),kotlinkad作者:Antonio Leiva時間:Mar 21,
Time of Update: 2017-03-27
Android 中基於 Binder的處理序間通訊,androidbinder 摘要:對 Binder 工作機制進行了分析。 首先簡述 Android 中 Binder 機制與傳統的 Linux 進程間的通訊比較,接著對基於 Binder 處理序間通訊的過程分析 最後結合開發執行個體 (AIDL),瞭解 基於 Binder的處理序間通訊。 1、Android 採用 Binder 作為 IPC (Internet Process
Time of Update: 2017-03-26
仿網易Tab分類排序控制項實現,網易tab排序控制項1、XML布局引入<com.net168.lib.SortTabLayout android:id="@+id/layout" android:layout_width="match_parent" android:layout_height="wrap_content" />2、設定資料來源資料,也就是每個item的對應文本資料//構造資料來源,暫時僅支援StringList<String>