Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'

// for data binding
kapt 'com.android.databinding:compiler:3.0.0'

// for dagger2
compile "com.google.dagger:dagger:2.12"
implementation "com.google.dagger:dagger:2.12"
annotationProcessor "com.google.dagger:dagger-compiler:2.12"
kapt "com.google.dagger:dagger-compiler:2.12"

// for orma database
compile "com.github.gfx.android.orma:orma:4.2.5"
implementation "com.github.gfx.android.orma:orma:4.2.5"
kapt "com.github.gfx.android.orma:orma-processor:4.2.5"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class PersonPresenter @Inject constructor(private val personDao: PersonDao) {
// insert some data
val persons = ArrayList<Person>().apply {
for (i in 0 until 50) {
add(PersonPresenter.createAsDummy)
add(createAsDummy)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class BMIListAdapter(context: Context, private val persons: List<Person>): BaseA

override fun onItemClick(adapter: AdapterView<*>?, view: View?, position: Int, id: Long) {
view?.let {
DataBindingUtil.findBinding<RowListBinding>(it).also {
it.task = BMICalculatorTask().apply {
DataBindingUtil.findBinding<RowListBinding>(it).also { rowList ->
rowList.task = BMICalculatorTask().apply {
execute(getItem(position)) }
}
}
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

<string name="empty">""</string>
<string name="format">%.1f</string>
<string name="bmi_plus">BMI: %.1f</string>
<string name="cm">cm</string>
<string name="kg">kg</string>

Expand Down