Name Description Size
AccessibleGridLayoutManager.kt A GridLayoutManager that fixes a11y errors in the Android framework implementation. 1383
CheckableImageButton.kt ImageButton that implements Checkable. NB: We need a checkable button with a centered drawable for the overlay. CheckBox uses a non-centered drawable, and we can't use ToggleButton because it uses android:background to set the image, which we need for button state, so we make a custom button. We need to override onCreateDrawableState (see CompoundButton source) to add the checked state to the attrs. 2951
OnInterceptTouchEventFrameLayout.kt A [FrameLayout] that has an [onInterceptTouchEvent] equivalent to [View.setOnTouchListener]. 905
ServiceLocator.kt Implementation of the Service Locator pattern. Use this class to provide dependencies without making client code aware of their specific implementations (i.e., make it easier to program to an interface). This also makes it easier to mock out dependencies during testing. See: https://en.wikipedia.org/wiki/Service_locator_pattern ### Dependencies can be defined as follows: #### Lazy, app-wide Singleton: ``` open val pocket by lazy { Pocket() } ``` #### Eager, app-wide singleton: ``` open val pocket = Pocket() ``` #### New value each time: ``` open val pocket: Pocket get() = Pocket() ``` #### Concrete value for interface: ``` open val telemetry: TelemetryInterface by lazy { SentryWrapper() } ``` 2017
TelemetrySwitchPreference.kt This class allows us to set a clickable link within a [PreferenceScreen] summary. 3569