Fixed
Status Update
Comments
ki...@google.com <ki...@google.com>
ja...@google.com <ja...@google.com> #2
I had the same problem today, and this could be related to https://code.google.com/p/android/issues/detail?id=67376
As a temporary fix, I changed the build.gradle from
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
to:
dependencies {
classpath 'com.android.tools.build:gradle:0.9.0'
}
As a temporary fix, I changed the build.gradle from
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
to:
dependencies {
classpath 'com.android.tools.build:gradle:0.9.0'
}
ma...@gmail.com <ma...@gmail.com> #3
That seems to have worked around the problem - thank you very much.
Maybe this should be merged into 67376?
Maybe this should be merged into 67376?
ap...@google.com <ap...@google.com> #4
The same problem when using list navigation mode. Just place the following line in onCreate() to get an app crash!
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
Description
* Impl
* *********** */
/**
* Returns a [Sequence] walking up this view's [parent][View.getParent] hierarchy chain.
*/
val View.ancestors: Sequence<ViewParent>
get() = generateSequence(parent, ViewParent::getParent)
/* ***********
* Tests
* *********** */
@Test
fun ancestors_root() {
val actual = view.ancestors.toList()
val expected = emptyList<ViewParent>()
assertEquals(expected, actual)
}
@Test
fun ancestors() {
val parents = listOf(
FrameLayout(context),
LinearLayout(context),
RelativeLayout(context)
)
for ((parent, child) in parents.zipWithNext()) {
parent.addView(child)
}
parents.last().addView(view)
val expected = parents.reversed()
val actual = view.ancestors.toList()
assertEquals(expected, actual)
}