-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added base architecture #5
base: master
Are you sure you want to change the base?
Conversation
...ter/app/src/main/java/com/example/mvvmkotlincoroutineretrofitdemo/manager/RetrofitManager.kt
Outdated
Show resolved
Hide resolved
init { | ||
val client = OkHttpClient.Builder().build() | ||
apiTransTrades = Retrofit.Builder() | ||
.baseUrl("http://3.248.170.197:9999") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Энто в настройки бы вынести
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Энто в настройки бы вынести
не очень понял
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Урлы и порты обычно хочется выносить в настройки, ибо вот возьму, тачку перезагружу на AWS - и код протухнет, и надо пересобирать чтоб заработало, и менять именно в RetrofitManager :)
|
||
class MainRepository { | ||
|
||
private val apiRate = RetrofitManager.apiRate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это котлиновский синглтон? Тогда ок.
...r/app/src/main/java/com/example/mvvmkotlincoroutineretrofitdemo/repository/MainRepository.kt
Outdated
Show resolved
Hide resolved
...mo-master/app/src/main/java/com/example/mvvmkotlincoroutineretrofitdemo/view/ChartAdapter.kt
Outdated
Show resolved
Hide resolved
var rates: ArrayList<BigDecimal> = arrayListOf() | ||
var dates: ArrayList<String> = arrayListOf() | ||
val formatter = SimpleDateFormat("dd/MM/yyyy") | ||
if (!dataLiveData.isNullOrEmpty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут явно видно Java код на котлине. Нужно будет глянуть в сторону основной фичи языка, null-safety, элвис оператор (?:) и т.д.
...mo-master/app/src/main/java/com/example/mvvmkotlincoroutineretrofitdemo/view/MainActivity.kt
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,23 @@ | |||
package com.example.mvvmkotlincoroutineretrofitdemo.view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Потом отдельным коммитом предлагаю таки переименовать package, куда-то в сторону uk.dsx.android.portfolio
For column graph added preparations for getting rates and multiplying
Need to hide keyboard when touching empty space
No description provided.