fixing some more cancer

This commit is contained in:
Ulysse Widmer 2020-03-06 19:19:14 +09:00
parent dbe936faa4
commit faf5a0838b
3 changed files with 13 additions and 22 deletions

View File

@ -28,7 +28,6 @@ class ProfileTest {
@Test
fun testAccountNameTextView() {
onView(withId(R.id.button)).perform(click())
sleep(1000)
onView(withId(R.id.accountName)).check(matches(not(withText("No Username"))))
onView(withId(R.id.accountName)).check(matches(withText("No Username")))
}
}

View File

@ -37,7 +37,7 @@ class ProfileActivity : AppCompatActivity() {
// ImageView : profile picture
val profilePicture = findViewById<ImageView>(R.id.profilePicture)
Glide.with(this@ProfileActivity).load(account.avatar).into(profilePicture)
Glide.with(applicationContext).load(account.avatar).into(profilePicture)
// TextView : description / bio
val description = findViewById<TextView>(R.id.description)

View File

@ -6,25 +6,17 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Show a profile" />
</LinearLayout>
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:text="Show a profile"
app:layout_constraintBottom_toTopOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>