Tag: Dialog

Android sample code, kotlin

Three Custom Dialogs

今天再介紹三個客制化的 Dialog。 1. 重新拉過 xml 的文字輸入 Dialog 透過適當的 xml,包括 background 也使用 drawable 下的 xml 來描框,可以作出跟 iOS 對話框類似的效果。 private var customTextInputDialog: Dialog? = null interface CustomTextInputDialogCallback

Android sample code, kotlin

Basic Dialogs

Basic Dialogs 寫一個 App, 各式各樣的模組化 Dialog 是很重要的。 這裡先介紹最基本的二個 Dialog: 1. 使用 AlertDialog 來建立 Yes / No Dialog 臨時需要一個最簡單的 Dialog, 不需要拉 xml 檔,可以這麼作: private var okCancelAlertDialog:

iOS 教學, 隨筆

彈跳式視窗的用法

在 iOS 裡彈跳式視窗主要分為由下方昇起的 UIActionSheet 以及Dialog 類型的 UIAlertView iOS8起 UIAlertView 已 deprecated, 改統一使用 UIAlertController 用法範例如下   Simple alert example: UIAlertController * alert= [UIAlertController alertControllerWithTitle:@”Password required” message:@”Please