Log.v()
verbose 級別,用於打印那些最爲瑣碎的、意義最小的日志信息。級別最低的一種。
Log.d ()
debug 級別,用於打印一些調試信息。
Log.i ()
info 級別,用於打印一些比較重要的數據可以分析用戶行爲的數據。
Log.w ()
warm 級別,用於打印一些警告信息,提示程序在這個地方可能會有潛在的風險,最好去修復一下。
Log.e ()
error 級別,用於打印程序中的錯誤信息。
文章作者: MYW
版權聲明: 本部落格所有文章除特別聲明外,均採用CC BY-NC-SA 4.0 授權協議。轉載請註明來源 CrazyWong!
相關推薦

2018-07-05
第一行代碼筆記-ListView
手機屏幕空間有限,能顯示的內容不多。可以藉助ListView來顯示更多的內容。ListView允許用户通過上下滑動來將屏幕外的數據滾動到屏幕內,同時屏幕內原有的數據滾動出屏幕,從而顯示更多的數據內容。 ListView的簡單用法修改activity_main.xml1234567891011<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="match_parent" android:orientation="vertical" tools:context=".MainActivity"> <ListView...

2018-07-19
9Patch 介紹
9Patch圖片介紹9Patch圖片是一種特殊的png圖片,以.9.png結尾,它在原始的圖片四周各添加一個寬度為1像素的像條,這4條線條決定了該圖片的縮放規則、內容顯示規則。 在Android Studio 上編輯.9.png,具體是在Android Studio上右鍵點擊你要編輯的照片,選擇Create 9-Patch file就可以進入編輯界面。 這就是9-Patch的編輯界面 Optional controls include: Zoom: Adjust the zoom level of the graphic in the drawing area. Patch scale: Adjust the scale of the images in the preview area. Show lock: Visualize the non-drawable area of the graphic on mouse-over. Show patches: Preview the stretchable patches in the drawing area (pink...

2018-06-26
第一行代碼筆記-四大Layout
LinerLayout 線性布局LinerLayout, 中文名為線性布局。這個布局會將它所包含的控件在線性方向上依次排列。 我們可以通過android:orientation屬性來指定排列方向。 vertical為垂直方向,horizontal為水平方向 123456789101112131415161718192021<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <Button android:layout_width="wrap_content" android:layout_heigh...

2018-06-08
第一行代碼筆記-Android Studio工程目錄結構介紹
bulid.gradle 解析

2018-06-08
第一行代碼筆記-bulid.gradle 解析
bulid.gradle 解析

2018-07-15
第一行代碼筆記-RecyclerView
RecyclerView是Android一個更強大的控件,其不僅可以實現和ListView同樣的效果,還有優化了ListView中的各種不足。其可以實現數據縱向滾動,也可以實現橫向滾動(ListView做不到橫向滾動)。接下來講解RecyclerView的用法。 RecyclerView 基本用法因為RecyclerView屬於新增的控件,Android將RecyclerView定義在support庫裏。若要使用RecyclerView,第一步是要在build.gradle中添加對應的依賴庫。 添加RecyclerView 依賴庫在app/build.gradle中的dependencies閉包添加以下內容: 1implementation 'com.android.support:recyclerview-v7:27.1.1' 然後點擊頂部的Sync Now進行同步 修改 activity_main.xml12345678910111213<LinearLayout xmlns:android="http://schemas.android...
評論


