1
0
Fork 0
mirror of https://github.com/KokaKiwi/BarInsta synced 2026-03-05 12:01:35 +00:00

profile viewer improvement

1. restore tagged posts access for anons
2. chip-ify profile viewer, bring it to consistency with tag/loc viewers
3. add a following/er status chip
4. pluralize "post(s)" and "follower(s)"
5. correct favourited string
This commit is contained in:
Austin Huang 2020-12-19 21:38:21 -05:00
parent 8240829fa8
commit 4d6ac5d293
No known key found for this signature in database
GPG key ID: 84C23AA04587A91F
18 changed files with 301 additions and 296 deletions

View file

@ -18,45 +18,96 @@
app:layout_constraintEnd_toStartOf="@id/mainPostCount"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="@id/fav_chip"
tools:background="@mipmap/ic_launcher" />
<androidx.appcompat.widget.AppCompatTextView
<com.google.android.material.chip.Chip
android:id="@+id/mainPostCount"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_width="wrap_content"
android:layout_height="@dimen/profile_chip_size"
android:layout_marginStart="4dp"
android:clickable="false"
android:visibility="gone"
tools:visibility="visible"
android:gravity="center"
android:textAppearance="@style/TextAppearance.AppCompat"
app:layout_constraintBottom_toBottomOf="@id/mainProfileImage"
app:layout_constraintEnd_toStartOf="@id/mainFollowers"
app:layout_constraintBottom_toTopOf="@id/mainFollowers"
app:layout_constraintStart_toEndOf="@id/mainProfileImage"
app:layout_constraintTop_toTopOf="parent"
tools:text="35\nPosts" />
app:layout_constraintTop_toTopOf="@id/mainProfileImage"
tools:text="35 Posts" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/mainFollowers"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="?selectableItemBackgroundBorderless"
<com.google.android.material.chip.Chip
android:id="@+id/mainStatus"
android:layout_width="wrap_content"
android:layout_height="@dimen/profile_chip_size"
android:layout_marginStart="4dp"
android:clickable="false"
android:visibility="gone"
tools:visibility="visible"
android:gravity="center"
android:textAppearance="@style/TextAppearance.AppCompat"
app:layout_constraintBottom_toBottomOf="@id/mainProfileImage"
app:layout_constraintEnd_toStartOf="@id/mainFollowing"
app:layout_constraintBottom_toTopOf="@id/mainFollowers"
app:layout_constraintStart_toEndOf="@id/mainPostCount"
app:layout_constraintTop_toTopOf="parent"
tools:text="68\nFollowers" />
app:layout_constraintTop_toTopOf="@id/mainPostCount"
tools:text="omg what do u expect" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/mainFollowing"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="?selectableItemBackgroundBorderless"
<com.google.android.material.chip.Chip
android:id="@+id/mainFollowers"
android:layout_width="wrap_content"
android:layout_height="@dimen/profile_chip_size"
android:layout_marginStart="4dp"
android:clickable="false"
android:visibility="gone"
tools:visibility="visible"
android:gravity="center"
android:textAppearance="@style/TextAppearance.AppCompat"
app:layout_constraintBottom_toBottomOf="@id/mainProfileImage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/fav_chip"
app:layout_constraintStart_toEndOf="@id/mainProfileImage"
app:layout_constraintTop_toBottomOf="@id/mainPostCount"
app:rippleColor="@color/grey_400"
tools:text="10 Followers" />
<com.google.android.material.chip.Chip
android:id="@+id/mainFollowing"
android:layout_width="wrap_content"
android:layout_height="@dimen/profile_chip_size"
android:layout_marginStart="4dp"
android:clickable="false"
android:visibility="gone"
tools:visibility="visible"
android:gravity="center"
app:layout_constraintBottom_toTopOf="@id/fav_chip"
app:layout_constraintStart_toEndOf="@id/mainFollowers"
app:layout_constraintTop_toTopOf="parent"
tools:text="64\nFollowing" />
app:layout_constraintTop_toBottomOf="@id/mainPostCount"
app:rippleColor="@color/grey_400"
tools:text="10 Following" />
<com.google.android.material.chip.Chip
android:id="@+id/fav_chip"
android:layout_width="wrap_content"
android:layout_height="@dimen/profile_chip_size"
android:layout_marginStart="8dp"
android:text="@string/add_to_favorites"
android:visibility="gone"
app:chipIcon="@drawable/ic_outline_star_plus_24"
app:chipIconTint="@color/yellow_800"
app:layout_constraintBottom_toBottomOf="@id/mainProfileImage"
app:layout_constraintStart_toEndOf="@id/mainProfileImage"
app:layout_constraintTop_toBottomOf="@id/mainFollowers"
app:rippleColor="@color/yellow_400"
tools:visibility="visible" />
<com.google.android.material.chip.Chip
android:id="@+id/btnTagged"
android:layout_width="wrap_content"
android:layout_height="@dimen/profile_chip_size"
android:layout_marginStart="4dp"
android:text="@string/tagged"
android:visibility="gone"
app:chipIcon="@drawable/ic_outline_person_pin_24"
app:chipIconTint="@color/deep_orange_800"
app:layout_constraintBottom_toBottomOf="@id/fav_chip"
app:layout_constraintStart_toEndOf="@id/fav_chip"
app:layout_constraintTop_toBottomOf="@id/mainFollowers"
app:rippleColor="@color/deep_orange_400"
tools:visibility="visible" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/mainFullName"
@ -70,7 +121,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/mainProfileImage"
app:layout_constraintTop_toBottomOf="@id/fav_chip"
tools:text="Austin Huang" />
<androidx.appcompat.widget.AppCompatImageView
@ -84,7 +135,7 @@
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/mainFullName"
app:layout_constraintStart_toEndOf="@id/mainFullName"
app:layout_constraintTop_toBottomOf="@id/mainProfileImage"
app:layout_constraintTop_toBottomOf="@id/fav_chip"
app:srcCompat="@drawable/verified"
tools:visibility="visible" />
@ -151,29 +202,12 @@
app:iconGravity="top"
app:iconTint="@color/deep_purple_200"
app:layout_constraintBottom_toTopOf="@id/highlights_barrier"
app:layout_constraintEnd_toStartOf="@id/btnTagged"
app:layout_constraintEnd_toStartOf="@id/btnSaved"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/mainUrl"
app:rippleColor="@color/purple_200"
tools:visibility="visible" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnTagged"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/tagged"
android:textColor="@color/deep_orange_600"
android:visibility="gone"
app:icon="@drawable/ic_outline_person_pin_24"
app:iconGravity="top"
app:iconTint="@color/deep_orange_600"
app:layout_constraintBottom_toTopOf="@id/highlights_barrier"
app:layout_constraintEnd_toStartOf="@id/btnSaved"
app:layout_constraintStart_toEndOf="@id/btnFollow"
app:layout_constraintTop_toBottomOf="@id/mainUrl"
tools:visibility="visible" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnSaved"
style="@style/Widget.MaterialComponents.Button.TextButton"
@ -187,7 +221,7 @@
app:iconTint="@color/blue_700"
app:layout_constraintBottom_toTopOf="@id/highlights_barrier"
app:layout_constraintEnd_toStartOf="@id/btnLiked"
app:layout_constraintStart_toEndOf="@id/btnTagged"
app:layout_constraintStart_toEndOf="@id/btnFollow"
app:layout_constraintTop_toBottomOf="@id/mainUrl"
app:rippleColor="@color/blue_A400"
tools:visibility="visible" />

View file

@ -4,6 +4,7 @@
<dimen name="private_page_margins">@dimen/profile_picture_size</dimen>
<dimen name="profile_picture_size">90dp</dimen>
<dimen name="profile_chip_size">40dp</dimen>
<dimen name="image_size_40">40dp</dimen>
<dimen name="profile_pic_size_tiny">24dp</dimen>

View file

@ -45,10 +45,15 @@
<string name="instadp_settings">Use Instadp for high definition profile pictures</string>
<string name="import_export">Import/Export</string>
<string name="select_language">Language</string>
<string name="main_posts_count">%s\nPosts</string>
<string name="main_posts_count_inline">%s Posts</string>
<string name="main_posts_followers">%s\nFollowers</string>
<string name="main_posts_following">%s\nFollowing</string>
<plurals name="main_posts_count_inline">
<item quantity="one">%s Post</item>
<item quantity="other">%s Posts</item>
</plurals>
<plurals name="main_posts_followers">
<item quantity="one">%s Follower</item>
<item quantity="other">%s Followers</item>
</plurals>
<string name="main_posts_following">%s Following </string>
<string name="post_viewer_autoplay_video">Autoplay videos</string>
<string name="post_viewer_muted_autoplay">Always mute videos</string>
<string name="post_viewer_download_dialog_title">Select what to download</string>
@ -107,6 +112,9 @@
<string name="unblock">Unblock</string>
<string name="restrict">Restrict</string>
<string name="unrestrict">Unrestrict</string>
<string name="status_mutual">Following each other</string>
<string name="status_following">Followed by you</string>
<string name="status_follower">Following you</string>
<string name="map">Map</string>
<string name="dialog_export_btn_export">Export</string>
<string name="dialog_export_btn_import">Import</string>