diff --git a/app/src/main/java/com/h/pixeldroid/ProfileActivity.kt b/app/src/main/java/com/h/pixeldroid/ProfileActivity.kt index 24ef17a7..e753fab8 100644 --- a/app/src/main/java/com/h/pixeldroid/ProfileActivity.kt +++ b/app/src/main/java/com/h/pixeldroid/ProfileActivity.kt @@ -31,32 +31,7 @@ class ProfileActivity : AppCompatActivity() { if (response.code() == 200) { statuses = response.body() as ArrayList? - if(statuses.isNullOrEmpty()) { - - // TextView : description / bio - val description = findViewById(R.id.description) - description.setText("") - - // TextView : account name - val accountName = findViewById(R.id.accountName) - accountName.setText("No Name") - - // TextView : number of posts - val nbPosts = findViewById(R.id.nbPosts) - nbPosts.setText(0) - nbPosts.setTypeface(null, Typeface.BOLD) - - // TextView : number of followers - val nbFollowers = findViewById(R.id.nbFollowers) - nbFollowers.setText(0) - nbFollowers.setTypeface(null, Typeface.BOLD) - - // TextView : number of following - val nbFollowing = findViewById(R.id.nbFollowing) - nbFollowing.setText(0) - nbFollowing.setTypeface(null, Typeface.BOLD) - - } else { + if(!statuses.isNullOrEmpty()) { val account = statuses!![0].account diff --git a/app/src/main/res/layout/activity_profile.xml b/app/src/main/res/layout/activity_profile.xml index 56e005ba..2934e8d8 100644 --- a/app/src/main/res/layout/activity_profile.xml +++ b/app/src/main/res/layout/activity_profile.xml @@ -23,7 +23,7 @@ android:layout_height="26dp" android:layout_marginTop="52dp" android:layout_marginEnd="36dp" - android:text="TextView" + android:text="N/A" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -43,7 +43,7 @@ android:layout_height="27dp" android:layout_marginStart="152dp" android:layout_marginTop="52dp" - android:text="TextView" + android:text="N/A" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -72,7 +72,7 @@ android:layout_width="39dp" android:layout_height="27dp" android:layout_marginTop="52dp" - android:text="TextView" + android:text="N/A" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.669" app:layout_constraintStart_toStartOf="parent" @@ -83,7 +83,7 @@ android:layout_width="156dp" android:layout_height="22dp" android:layout_marginTop="15dp" - android:text="Name" + android:text="No Username" app:layout_constraintStart_toStartOf="@+id/profilePicture" app:layout_constraintTop_toBottomOf="@+id/profilePicture" /> @@ -92,7 +92,6 @@ android:layout_width="348dp" android:layout_height="85dp" android:layout_marginTop="14dp" - android:text="Description" app:layout_constraintStart_toStartOf="@+id/accountName" app:layout_constraintTop_toBottomOf="@+id/accountName" />