# Login 1. 把 sample code 的 login dialog 改 fragment ( LoginDialog -> LoginFragment) 2. tool bar 在activity_main.xml ```java= stylish api 作法 HOST_NAME = "stylisherin.site" API_VERSION = "1.0" StylishApiService interface 增加suspend func dataSource interface add func Result<> dataSource implement repository repository implement ``` ## API作法參考 1. 看API格式 2. 定義data class 3. 在service 寫 suspend fun 4. 在 StylishDataSource Interface(菜單) 定義 suspend fun 5. 實作 remote(call Api) & local(空的方法) 的 dataSource 6. 在 StylisRepository Interface 定義 suspend fun 7. 實作 DefaultStylishRepository StylishApiService.kt ProfileFragment(viewModel) -getUserOrderHistory
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up