-
Notifications
You must be signed in to change notification settings - Fork 16
179 redesign report activity #186
Conversation
…in RecordAdapter.
…ity for RecordReportAdapter.
yev-kanivets
left a comment
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.
Great work 👍Code can be improved in few places, but very good overall.
| val recordReportConverter = RecordReportConverter(report) | ||
| adapter = ExpandableListReportAdapter(this, recordReportConverter) | ||
| for (categoryRecord in report.summary) { | ||
|
|
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| if (report != null) { | ||
| val recordReportConverter = RecordReportConverter(report) | ||
| adapter = ExpandableListReportAdapter(this, recordReportConverter) | ||
| for (categoryRecord in report.summary) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| if (position == 0) showReport() | ||
| else editRecord(position) | ||
| recordAdapter = RecordAdapter(this, listOf(), true) | ||
| recordAdapter.setOnItemClickListener { position -> editRecord(position) } |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| recordAdapter.setOnItemClickListener { position -> editRecord(position) } | ||
|
|
||
| summaryPresenter = ShortSummaryPresenter(this) | ||
| val summaryView = summaryPresenter.create(true) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| btnAddIncome.setOnClickListener { addIncome() } | ||
| } | ||
|
|
||
| private fun editRecord(position: Int) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
app/src/main/java/com/blogspot/e_kanivets/moneytracker/di/AppComponent.java
Show resolved
Hide resolved
app/src/main/java/com/blogspot/e_kanivets/moneytracker/entity/RecordReportItem.kt
Show resolved
Hide resolved
app/src/main/java/com/blogspot/e_kanivets/moneytracker/report/record/RecordReport.java
Show resolved
Hide resolved
app/src/main/java/com/blogspot/e_kanivets/moneytracker/report/record/model/SummaryRecord.java
Outdated
Show resolved
Hide resolved
app/src/main/java/com/blogspot/e_kanivets/moneytracker/ui/presenter/ShortSummaryPresenter.java
Show resolved
Hide resolved
|
|
||
| private fun editRecord(position: Int) { | ||
| AnswersProxy.get().logButton("Edit Record") | ||
| // -1 because SummaryView |
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.
This is exactly why comments are bad ⬆️
| btnAddIncome.setOnClickListener { addIncome() } | ||
| } | ||
|
|
||
| private fun getPositionWithoutSummary(position: Int): Int { |
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.
Can be one-lined?
No description provided.