bostonmacosx
10/01/2017, 2:59 AMMiSikora
10/01/2017, 4:20 PMdata class Round(
@ColumnInfo(name = "id")
val id: Long,
@ColumnInfo(name = "name")
val name: String,
@ColumnInfo(name = "description")
val description: String,
@ColumnInfo(name = "measurements_count")
val measuredCount: Int
)
Entities and Pojos must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type).
Tried the following constructors but they failed to match:
Round(long,java.lang.String,java.lang.String,int) : [arg0 : null, arg1 : null, arg2 : null, arg3 : null]
jw
10/01/2017, 7:14 PMafernan
10/01/2017, 7:40 PMcodeslubber
10/02/2017, 3:29 PMpublic class MyActivity extends AppCompatActivity {
public void onCreate(Bundle savedInstanceState) {
MyViewModel model = ViewModelProviders.of(this).get(MyViewModel.class);
model.getUsers().observe(this, users -> {
// update UI
});
}
}
Obviously this is Java. In getting a syntax for the observer that would compile in Kotlin, I ended up doing an Observer<ModelType>(){} construct, is this as it should be?codeslubber
10/02/2017, 6:43 PMconversionViewModel?.getConversion()?.observe(this, Observer<Conversion>{ conversion ->
println("observer called with conversion: $conversion")
})
and simple.gabrielfv
10/02/2017, 7:49 PMSlackbot
10/02/2017, 9:31 PMcodeslubber
10/02/2017, 10:04 PMsqia09
10/03/2017, 8:51 AMmyanmarking
10/03/2017, 11:33 AMjean pokou
10/03/2017, 1:27 PMError:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: org.gradle.tooling.BuildException: com.android.dx.cf.code.SimException: local 0007: invalid
myanmarking
10/04/2017, 10:30 AMbrent
10/04/2017, 3:58 PMtapchicoma
10/05/2017, 8:48 AMconst
is not allowed for field that references generated const classes like android R
subclasses? IMHO, technically it should be allowed.
For example, const val TEXT_RES = R.string.some_text
codeslubber
10/06/2017, 6:08 AMsqia09
10/06/2017, 12:56 PMEquipmentLayer is not Comparable
while writing a recyclerview adapter implementation using the following link:
https://github.com/thetonrifles/stackoverflow/tree/so-34848401menegatti
10/06/2017, 3:32 PMsealed class Response
data class Success(val body : Data) : Response
data class Failure(val error : Throwable) : Response
...
if (res is Success) {
updateUi(res.body)
}
hetang
10/06/2017, 4:13 PMSean Patterson
10/06/2017, 9:02 PMrkeazor
10/07/2017, 4:42 PMlangara
10/08/2017, 2:35 PMDF595
10/08/2017, 6:26 PMKulwinder Singh
10/10/2017, 6:21 AMNeil
10/10/2017, 11:33 AMjoelpedraza
10/10/2017, 2:01 PMmurt
10/10/2017, 3:20 PM?
end the enddoug
10/11/2017, 4:27 PMdependencies {
classpath ‘com.android.tools.build:gradle:2.3.2’
classpath ‘org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-2’
classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.4’
classpath ‘io.fabric.tools:gradle:1.+’
classpath ‘de.undercouch:gradle-download-task:2.1.0’
classpath ‘me.tatarka:gradle-retrolambda:3.2.4’
classpath ‘com.google.gms:google-services:3.0.0’
classpath ‘com.github.triplet.gradle:play-publisher:1.2.0’
}
Sandip75
10/12/2017, 8:56 PMSandip75
10/12/2017, 8:56 PMSandip75
10/12/2017, 8:56 PMorangy
10/12/2017, 8:59 PM