Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
fix inconsistent styles, fix non-sp font
Browse files Browse the repository at this point in the history
closes #862
  • Loading branch information
sk22 committed Oct 13, 2023
1 parent 638e1bf commit db661b5
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 47 deletions.
28 changes: 13 additions & 15 deletions mastodon/src/main/res/layout/fragment_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,18 @@
android:id="@+id/profile_counters"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp">
android:layout_marginHorizontal="4dp">

<LinearLayout
style="@style/Widget.Mastodon.M3.Button.Text"
android:id="@+id/followers_btn"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:background="@drawable/bg_button_borderless_rounded"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingTop="4dp"
android:paddingRight="8dp"
android:paddingBottom="4dp">
android:paddingStart="12dp"
android:paddingEnd="12dp">

<TextView
android:id="@+id/followers_count"
Expand Down Expand Up @@ -335,35 +333,35 @@
android:id="@+id/profile_counters_separator"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginHorizontal="-4dp"
android:gravity="center"
android:text="@string/sk_separator"
android:textAppearance="@style/m3_label_large"
android:fontFamily="sans-serif-black"
android:textColor="?colorM3OnSurfaceVariant" />

<LinearLayout
style="@style/Widget.Mastodon.M3.Button.Text"
android:id="@+id/following_btn"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:background="@drawable/bg_button_borderless_rounded"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingTop="4dp"
android:paddingRight="8dp"
android:paddingBottom="4dp">
android:paddingStart="12dp"
android:paddingEnd="12dp">

<TextView
android:id="@+id/following_count"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:ellipsize="end"
android:textAppearance="@style/m3_label_large"
android:fontFamily="sans-serif-black"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="?colorM3OnSurfaceVariant"
android:textSize="14dp"
tools:text="123" />

<TextView
Expand Down
90 changes: 58 additions & 32 deletions mastodon/src/main/res/layout/item_discover_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"
android:layout_gravity="bottom"
android:paddingTop="4dp"
android:paddingTop="6dp"
android:gravity="center_vertical"
android:minHeight="44dp">

Expand All @@ -142,77 +142,103 @@
android:layout_marginEnd="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">

<TextView
android:id="@+id/posts_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/m3_title_medium"
android:singleLine="true"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:ellipsize="end"
android:textAppearance="@style/m3_label_large"
android:fontFamily="sans-serif-black"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="123" />

<TextView
android:id="@+id/posts_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4sp"
android:textAppearance="@style/m3_body_large"
android:singleLine="true"
android:layout_height="match_parent"
android:ellipsize="middle"
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/m3_label_large"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="posts" />

</LinearLayout>

<LinearLayout
android:id="@+id/following_btn"
android:id="@+id/followers_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginEnd="8dp"
android:orientation="horizontal"
android:gravity="center_vertical">

<TextView
android:id="@+id/following_count"
android:id="@+id/followers_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/m3_title_medium"
android:singleLine="true"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:ellipsize="end"
tools:text="123"/>
android:textAppearance="@style/m3_label_large"
android:fontFamily="sans-serif-black"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="123" />

<TextView
android:id="@+id/following_label"
android:id="@+id/followers_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4sp"
android:textAppearance="@style/m3_body_large"
android:singleLine="true"
android:layout_height="match_parent"
android:ellipsize="middle"
tools:text="following"/>
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/m3_label_large"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="followers" />

</LinearLayout>

<LinearLayout
android:id="@+id/followers_btn"
android:id="@+id/following_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginEnd="8dp"
android:orientation="horizontal"
android:gravity="center_vertical">

<TextView
android:id="@+id/followers_count"
android:id="@+id/following_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/m3_title_medium"
android:singleLine="true"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:ellipsize="end"
tools:text="123"/>
android:textAppearance="@style/m3_label_large"
android:fontFamily="sans-serif-black"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="123" />

<TextView
android:id="@+id/followers_label"
android:id="@+id/following_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4sp"
android:textAppearance="@style/m3_body_large"
android:singleLine="true"
android:layout_height="match_parent"
android:ellipsize="middle"
tools:text="followers"/>
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/m3_label_large"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="following" />

</LinearLayout>

</org.joinmastodon.android.ui.views.AutoOrientationLinearLayout>

<FrameLayout
Expand Down

0 comments on commit db661b5

Please sign in to comment.