iT邦幫忙

kotlin相關文章
共有 1295 則文章
鐵人賽 Software Development DAY 28
Kotlin for Android 系列 第 28

技術 Day 28. Android RecyclerView - 2/2

  今天的主題是點擊項目後的動作,首先我們要知道點到的是清單中的哪個項目,因此要擴充一下 groupRecycleAdapter。   首先在類別建構子加上第三...

鐵人賽 Software Development DAY 26

技術 Android Kotlin 實作 Day 16:PushMessaging(下)(AlertDialog+發送 FCM)

<< 接續上篇 Method AlertDialog 一種小型視窗,用來提示使用者資訊或讓使用者輸入所需資訊。 利用 AlertDialog.Bu...

鐵人賽 Software Development DAY 26

技術 Day26_Thread, Handler, Runnable 簡介

Thread, Handler, Runnable Runnable 什麼是 Runnable 呢? 我們從官方的文件可以看到 Runnable 是一個 int...

鐵人賽 Software Development DAY 27
Kotlin for Android 系列 第 27

技術 Day 27. Android RecyclerView - 1/2

  今天要來應用新的元件 RecyclerView:   使用之前必須到 Gradle Scripts > build.gradle (Module:...

鐵人賽 Software Development DAY 25

技術 Day25_MediaPlayer_2

播放暫停停止按鈕 private fun checkButtonStatus() { when (buttonStatus) {...

鐵人賽 Software Development DAY 26
Kotlin for Android 系列 第 26

技術 Day 26. Android ListView - 2/2

  清單的排版會受到主版與子版兩個 xml 的排版影響,在 group_list_item.xml 中可以設計成左右滿版貼齊邊緣,並將高度固定,此外若需要各項目...

鐵人賽 Software Development DAY 24

技術 Day24_MediaPlayer_1

MediaPlayer 今天嘗試做一個非常簡單陽春的音樂撥放器。 需要實現的有一個旋轉的動畫、流程條、播放暫停停止按鈕、聲音調整條。 就讓我們來看看怎麼做吧。...

鐵人賽 Software Development DAY 25
Kotlin for Android 系列 第 25

技術 Day 25. Android ListView - 1/2

  今天開始的課程為資料清單,建立一個新的專案,專案的選擇與先前課程相同,並新增三類 Package 資料夾,分別命名為:Controllers、Models、...

鐵人賽 Software Development DAY 23

技術 Android Koltin 實作 Day 15:Notification(Notification)

使用語言 Kotlin 使用元件 Button Method: 這次實作主要為使用 Notification 由系統發出通知,向使用者顯示通知訊息。...

鐵人賽 自我挑戰組 DAY 28
Kotlin and Android 30 days 系列 第 28

技術 Day 28 GoogleMap Polygons

今天學習如何在 Google Map 上畫多邊形 首先在開啟新專案的時候選擇 Google Maps Activity 載入完成後,會跳出一個提示頁 goog...

鐵人賽 Software Development DAY 24
Kotlin for Android 系列 第 24

技術 Day 24. Android Activity 物件傳遞 - 6/6

  今天一開始要來整理一下昨天新增的檔案,自其它教學中學到的概念,到目前為止我們新增了許多 Activity,又建立了 ExtraConstants,檔案有點多...

鐵人賽 Software Development DAY 23

技術 Day23_更新 RecyclerView 畫面

更新 RecyclerView 畫面 最近在寫一個練習一個 sideproject 實遇到需要當使用者更新資料時,要同時更新資料至 RecyclerView 上...

鐵人賽 Software Development DAY 22

技術 Day22_Notification

Notification 實作流程 建立 Notification 我們想要使用者能夠擊點 Notification 進入 Activity val inten...

鐵人賽 自我挑戰組 DAY 27
Kotlin and Android 30 days 系列 第 27

技術 Day 27 Kotlin 的迴圈控制

在學習 Kotlin 語言的過程中,發現迴圈的用法有很多很方便的地方,這邊將常用的做個整理。 For 迴圈 Kotlin 中基本的 for 迴圈寫法可以用兩個...

鐵人賽 Software Development DAY 23
Kotlin for Android 系列 第 23

技術 Day 23. Android Activity 物件傳遞 - 5/6

  讓我們把焦點從流程的部分轉回應用程式上,現在第二頁面還缺少一個下一步的按鈕,同時得做一些邏輯驗證,首先在版面上新增一個按鈕及程式上加入點擊的監聽,這些相信難...

鐵人賽 自我挑戰組 DAY 26
Kotlin and Android 30 days 系列 第 26

技術 Day 26 Shake

今天要學習如何獲取裝置的加速器資訊並在感應到搖晃時切換圖片和震動 準備圖片資源 首先先把需要的圖片資源放到 drawable 中,並建立一個變數來存放它們的...

鐵人賽 自我挑戰組 DAY 25
Kotlin and Android 30 days 系列 第 25

技術 Day 25 GoogleVoice

今天學習如何使用 Google 的語音辨識功能 流程為按下按鈕後先 reset 三個圖形的顏色然後 Intent 到語音辨識的 Activity Intent...

鐵人賽 自我挑戰組 DAY 24
Kotlin and Android 30 days 系列 第 24

技術 Day 24 LocalDatabase

今天學習如何儲存資料到 SQLite 資料庫 SQLiteOpenHelper 首先自訂一個類別繼承 SQLiteOpenHelper,建構子帶入 Conte...

鐵人賽 自我挑戰組 DAY 23
Kotlin and Android 30 days 系列 第 23

技術 Day 23 LayoutSwitch

今天學習如何動態切換 Layout 的排版模式 建立右上角切換的圖示 第一步先建立要使用的 menu ,跟之前的做法一樣,在 res 資料夾中建立 menu...

鐵人賽 自我挑戰組 DAY 22
Kotlin and Android 30 days 系列 第 22

技術 Day 22 ActivityTransition

這次要實現的是在 Activity 間的轉場效果 MainActivity Explode、Slide 和 Fade 這三個是使用相同的轉場方法首先在對應的按...

鐵人賽 自我挑戰組 DAY 21
Kotlin and Android 30 days 系列 第 21

技術 Day 21 MediaPlayer/MediaRecorder (下)

接續上篇對播放器的操作,這篇要加上動畫效果和錄音的部分。 顯示動畫 這邊使用到以前使用過的 ObjectAnimator 來達成效果以下為設定 rotati...

鐵人賽 Software Development DAY 22
Kotlin for Android 系列 第 22

技術 Day 22. Android Activity Switch - 4/6

  第二個頁面一開始先介紹背景底圖調色技巧,及控制項 ToggleButton 與 Switch,先切換至 activity_second.xml,點一下 Co...

鐵人賽 Software Development DAY 21

技術 Day21_BallAnimator

BallAnimator 這次我們打算來實作 Animator 看看 ValueAnimator 我們可以透過使用 ValueAnimator 來設定動畫 c...

鐵人賽 Software Development DAY 20

技術 Android Kotlin 實作 Day 12:GithubStars(下)(OkHttp)

<< 接續上篇 Method OkHttp 用來做網路請求的第三方 library 原生的網路請求方法為使用 HttpURLConnection...

鐵人賽 Software Development DAY 21
Kotlin for Android 系列 第 21

技術 Day 21. Android Activity 生命週期 - 3/6

  今天一開始先來改良流程步驟追蹤的程式片段,因為使用很多重複的 Log.d 很雜亂,應該要將它們整合一下,在 FlowActivity 加入一個函式,使用變數...

鐵人賽 自我挑戰組 DAY 20
Kotlin and Android 30 days 系列 第 20

技術 Day 20 MediaPlayer/MediaRecorder (上)

今天學習使用 MediaPlayer 來播放 mp3 檔案首先要建立 MediaPlayer 類別這邊的想法是,建構類別時,把完成後 UI 要做的事情當作 C...

鐵人賽 自我挑戰組 DAY 19
Kotlin and Android 30 days 系列 第 19

技術 Day 19 SideMenu

今天要學習如何使用 DrawerLayout 首先先到 build.gradle 中加入 dependencies { ... i...