Last active
July 29, 2020 13:41
-
-
Save trietbui85/2a58a56fb763bd46ebd8486bd6866483 to your computer and use it in GitHub Desktop.
Unit test Android custom view with AndroidX Test and Robolectric
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="horizontal" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="center" | |
android:padding="10dp" | |
android:background="#50000000"> | |
<Button | |
android:layout_width="@dimen/button_size" | |
android:layout_height="60dp" | |
android:id="@+id/buttonSubtract" | |
android:textSize="@dimen/count_text_size" | |
android:text="@string/button_subtract" /> | |
<TextView | |
android:layout_width="100dp" | |
android:layout_height="50dp" | |
android:id="@+id/textView" | |
android:text="0" | |
android:gravity="center|bottom" | |
android:padding="5dp" | |
android:textSize="@dimen/count_text_size" | |
android:textStyle="bold" | |
android:textColor="@android:color/black" /> | |
<Button | |
android:layout_width="60dp" | |
android:layout_height="60dp" | |
android:id="@+id/buttonAdd" | |
android:textSize="@dimen/count_text_size" | |
android:text="@string/button_add" /> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment