This file contains hidden or 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
class ExamplePresenterTest { | |
//Setup code... | |
@Test | |
fun `test_fetchProfileName_calles_onProfileNameReceived_on_positive_response`() { | |
Mockito.`when`(presenter.fetchProfileNameFromRepository())) | |
.thenReturn("Gil Goldzweig") | |
This file contains hidden or 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
class ExamplePresenterTest { | |
//Setup code... | |
@Test | |
fun `test_fetchProfileName_calles_onProfileRequestFailed_on_exception`() { | |
val fakeException = Mockito.mock(IOException::class.java) | |
Mockito.`when`(presenter.fetchProfileNameFromRepository())) |
This file contains hidden or 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 hidden or 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
class ComposeFragment : Fragment() { | |
override fun onCreateView( | |
inflater: LayoutInflater, container: ViewGroup?, | |
savedInstanceState: Bundle? | |
): View? { | |
container?.setContent { | |
} | |
return container |
This file contains hidden or 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 hidden or 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
<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" | |
motion:layout_constraintTop_toBottomOf="@id/navigation_icon" /> |
This file contains hidden or 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.motion.widget.MotionLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layoutDescription="@xml/sample_collapsing_animation_scene"> |
This file contains hidden or 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.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layoutDescription="@xml/sample_collapsing_animation_scene"> | |
<View | |
android:id="@+id/toolbar" |
This file contains hidden or 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
<View | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:background="@color/colorPrimary" | |
android:elevation="4dp" | |
app:layout_constraintBottom_toTopOf="@id/guidline_toolbar" | |
app:layout_constraintTop_toTopOf="parent" /> | |
<androidx.appcompat.widget.AppCompatImageView |
This file contains hidden or 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.appcompat.widget.SearchView | |
android:id="@+id/search_view" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginStart="16dp" | |
android:layout_marginEnd="16dp" | |
android:background="@color/md_white_1000" | |
android:elevation="4dp" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" |