This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(MockitoJUnitRunner::class) | |
class ExamplePresenterTest { | |
@Mock | |
private lateinit var view: ExampleContract.View | |
@Spy | |
private var presenter: ExamplePresenter = ExamplePresenter() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Handler | |
import android.view.View | |
/** | |
* A class for debouncing clicks | |
*/ | |
abstract class DebouncingOnClickListener : View.OnClickListener { | |
private val clickDebouncer = ClickDebouncer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<TextView | |
android:id="@+id/textViewTitle" | |
android:layout_width="wrap_content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ConstraintSet android:id="@+id/end"> | |
<Constraint | |
android:id="@id/search_view" | |
android:layout_width="0dp" | |
android:layout_height="0dp" | |
android:layout_marginTop="16dp" | |
android:elevation="4dp" | |
motion:layout_constraintEnd_toStartOf="@id/menu_icon" | |
motion:layout_constraintStart_toEndOf="@id/navigation_icon" | |
motion:layout_constraintTop_toTopOf="parent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Transition | |
motion:constraintSetEnd="@+id/end" | |
motion:constraintSetStart="@id/start" | |
motion:motionInterpolator="easeInOut"> | |
<OnSwipe | |
motion:dragDirection="dragUp" | |
motion:moveWhenScrollAtTop="true" | |
motion:onTouchUp="stop" | |
motion:touchAnchorId="@id/scrollable_content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<OnSwipe | |
motion:dragDirection="dragUp" | |
motion:moveWhenScrollAtTop="true" | |
motion:onTouchUp="stop" | |
motion:touchAnchorId="@id/scrollable_content" | |
motion:touchAnchorSide="top" | |
motion:dragScale="1"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ConstraintSet android:id="@+id/start"> | |
<Constraint | |
android:id="@id/search_view" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginStart="16dp" | |
android:layout_marginEnd="16dp" | |
android:elevation="4dp" | |
motion:layout_constraintEnd_toEndOf="parent" | |
motion:layout_constraintStart_toStartOf="parent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:motion="http://schemas.android.com/apk/res-auto"> | |
</MotionScene> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<androidx.constraintlayout.widget.Guideline | |
android:id="@+id/guidline_toolbar" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:orientation="horizontal" | |
app:layout_constraintGuide_begin="140dp" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<androidx.recyclerview.widget.RecyclerView | |
android:id="@+id/scrollable_content" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toBottomOf="@id/guidline_toolbar" /> |