Android APIs
public class

LinearLayoutManagerTest

extends BaseRecyclerViewInstrumentationTest
java.lang.Object
   ↳ junit.framework.Assert
     ↳ junit.framework.TestCase
       ↳ android.test.InstrumentationTestCase
         ↳ android.test.ActivityTestCase
           ↳ android.test.ActivityInstrumentationTestCase2<android.support.v7.widget.TestActivity>
             ↳ android.support.v7.widget.BaseRecyclerViewInstrumentationTest
               ↳ android.support.v7.widget.LinearLayoutManagerTest

Class Overview

Includes tests for LinearLayoutManager.

Since most UI tests are not practical, these tests are focused on internal data representation and stability of LinearLayoutManager in response to different events (state change, scrolling etc) where it is very hard to do manual testing.

Summary

[Expand]
Inherited Fields
From class android.support.v7.widget.BaseRecyclerViewInstrumentationTest
Public Constructors
LinearLayoutManagerTest()
Public Methods
void assertRectSetsEqual(String message, Map<BaseRecyclerViewInstrumentationTest.Item, Rect> before, Map<BaseRecyclerViewInstrumentationTest.Item, Rect> after)
void assertRectSetsNotEqual(String message, Map<BaseRecyclerViewInstrumentationTest.Item, Rect> before, Map<BaseRecyclerViewInstrumentationTest.Item, Rect> after)
void getFirstLastChildrenTest(LinearLayoutManagerTest.Config config)
void keepFocusOnResizeTest(LinearLayoutManagerTest.Config config, boolean fullyVisible)
void savedStateTest(LinearLayoutManagerTest.Config config, boolean waitForLayout, LinearLayoutManagerTest.PostLayoutRunnable postLayoutOperation, LinearLayoutManagerTest.PostRestoreRunnable postRestoreOperation)
void scrollToPositionWithOffsetTest(LinearLayoutManagerTest.Config config)
void scrollToPositionWithPredictive(int scrollPosition, int scrollOffset)
void stackFromEndTest(LinearLayoutManagerTest.Config config)
void testAccessibilityPositions()
void testDontRecycleChildrenOnDetach()
void testGetFirstLastChildrenTest()
void testKeepFocusOnRelayout()
void testKeepFullFocusOnResize()
void testKeepPartialFocusOnResize()
void testKeepReverseFullFocusOnResize()
void testKeepReversePartialFocusOnResize()
void testKeepStackFromEndFullFocusOnResize()
void testKeepStackFromEndPartialFocusOnResize()
void testRecycleChildrenOnDetach()
void testRecycleDuringAnimations()
void testResize()
void testSavedState()
void testScrollToPositionWithOffset()
void testScrollToPositionWithPredictive()
Protected Methods
List<LinearLayoutManagerTest.Config> addConfigVariation(List<LinearLayoutManagerTest.Config> base, String fieldName, Object... variations)
void setUp()
Sets up the fixture, for example, open a network connection.
[Expand]
Inherited Methods
From class android.support.v7.widget.BaseRecyclerViewInstrumentationTest
From class android.test.ActivityInstrumentationTestCase2
From class android.test.ActivityTestCase
From class android.test.InstrumentationTestCase
From class junit.framework.TestCase
From class junit.framework.Assert
From class java.lang.Object
From interface junit.framework.Test

Public Constructors

public LinearLayoutManagerTest ()

Public Methods

public void assertRectSetsEqual (String message, Map<BaseRecyclerViewInstrumentationTest.Item, Rect> before, Map<BaseRecyclerViewInstrumentationTest.Item, Rect> after)

public void assertRectSetsNotEqual (String message, Map<BaseRecyclerViewInstrumentationTest.Item, Rect> before, Map<BaseRecyclerViewInstrumentationTest.Item, Rect> after)

public void getFirstLastChildrenTest (LinearLayoutManagerTest.Config config)

Throws
Throwable

public void keepFocusOnResizeTest (LinearLayoutManagerTest.Config config, boolean fullyVisible)

Throws
Throwable

public void savedStateTest (LinearLayoutManagerTest.Config config, boolean waitForLayout, LinearLayoutManagerTest.PostLayoutRunnable postLayoutOperation, LinearLayoutManagerTest.PostRestoreRunnable postRestoreOperation)

Throws
Throwable

public void scrollToPositionWithOffsetTest (LinearLayoutManagerTest.Config config)

Throws
Throwable

public void scrollToPositionWithPredictive (int scrollPosition, int scrollOffset)

Throws
Throwable

public void stackFromEndTest (LinearLayoutManagerTest.Config config)

Throws
Throwable

public void testAccessibilityPositions ()

Throws
Throwable

public void testDontRecycleChildrenOnDetach ()

Throws
Throwable

public void testGetFirstLastChildrenTest ()

Throws
Throwable

public void testKeepFocusOnRelayout ()

Throws
Throwable

public void testKeepFullFocusOnResize ()

Throws
Throwable

public void testKeepPartialFocusOnResize ()

Throws
Throwable

public void testKeepReverseFullFocusOnResize ()

Throws
Throwable

public void testKeepReversePartialFocusOnResize ()

Throws
Throwable

public void testKeepStackFromEndFullFocusOnResize ()

Throws
Throwable

public void testKeepStackFromEndPartialFocusOnResize ()

Throws
Throwable

public void testRecycleChildrenOnDetach ()

Throws
Throwable

public void testRecycleDuringAnimations ()

Throws
Throwable

public void testResize ()

Throws
Throwable

public void testSavedState ()

Throws
Throwable

public void testScrollToPositionWithOffset ()

Throws
Throwable

public void testScrollToPositionWithPredictive ()

Throws
Throwable

Protected Methods

protected List<LinearLayoutManagerTest.Config> addConfigVariation (List<LinearLayoutManagerTest.Config> base, String fieldName, Object... variations)

protected void setUp ()

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Throws
Exception