Browse Source

Pad and center personal text in ProfileActivity

pull/70/head
Ezerous 5 years ago
parent
commit
f20b9140f1
No known key found for this signature in database GPG Key ID: 262B2954BBA319E3
  1. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/profile/ProfileActivity.java
  2. 7
      app/src/main/res/layout-v21/activity_profile.xml
  3. 7
      app/src/main/res/layout/activity_profile.xml

2
app/src/main/java/gr/thmmy/mthmmy/activities/profile/ProfileActivity.java

@ -312,7 +312,7 @@ public class ProfileActivity extends BaseActivity implements LatestPostsFragment
loadAvatar(false); loadAvatar(false);
else else
loadAvatar(true); loadAvatar(true);
if (personalText != null) { if (personalText != null && !personalText.isEmpty()) {
personalTextView.setText(personalText); personalTextView.setText(personalText);
personalTextView.setVisibility(View.VISIBLE); personalTextView.setVisibility(View.VISIBLE);
} }

7
app/src/main/res/layout-v21/activity_profile.xml

@ -37,7 +37,7 @@
android:id="@+id/user_thumbnail" android:id="@+id/user_thumbnail"
android:layout_width="@dimen/profile_activity_avatar_size" android:layout_width="@dimen/profile_activity_avatar_size"
android:layout_height="@dimen/profile_activity_avatar_size" android:layout_height="@dimen/profile_activity_avatar_size"
android:layout_marginBottom="5dp" android:layout_marginBottom="6dp"
android:layout_gravity="center" android:layout_gravity="center"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:contentDescription="@string/post_thumbnail" android:contentDescription="@string/post_thumbnail"
@ -50,6 +50,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="6dp"
android:paddingBottom="4dp"
android:textAlignment="center"
android:textColor="@color/primary_text" android:textColor="@color/primary_text"
android:visibility="gone"/> android:visibility="gone"/>
</LinearLayout> </LinearLayout>

7
app/src/main/res/layout/activity_profile.xml

@ -37,7 +37,7 @@
android:id="@+id/user_thumbnail" android:id="@+id/user_thumbnail"
android:layout_width="@dimen/profile_activity_avatar_size" android:layout_width="@dimen/profile_activity_avatar_size"
android:layout_height="@dimen/profile_activity_avatar_size" android:layout_height="@dimen/profile_activity_avatar_size"
android:layout_marginBottom="5dp" android:layout_marginBottom="6dp"
android:layout_gravity="center" android:layout_gravity="center"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:contentDescription="@string/post_thumbnail" android:contentDescription="@string/post_thumbnail"
@ -49,6 +49,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="6dp"
android:paddingBottom="4dp"
android:textAlignment="center"
android:textColor="@color/primary_text" android:textColor="@color/primary_text"
android:visibility="gone"/> android:visibility="gone"/>
</LinearLayout> </LinearLayout>

Loading…
Cancel
Save