mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-23 14:17:15 +00:00
small title/description/spacing tweak to empty chat text
chat empty state: split into title and description TextViews with spacing
This commit is contained in:
parent
6a5d135756
commit
d69b300bf3
3 changed files with 30 additions and 11 deletions
|
|
@ -4,18 +4,36 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chat_empty_textview"
|
||||
<LinearLayout
|
||||
android:id="@+id/chat_empty_container"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:padding="16dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/chat_empty_state"
|
||||
android:textColor="@color/gray200_gray400"
|
||||
android:textSize="16sp" />
|
||||
android:paddingHorizontal="@dimen/spacing_large"
|
||||
android:paddingVertical="@dimen/spacing_medium">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chat_empty_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/chat_empty_state_title"
|
||||
android:textColor="@color/gray100_gray400"
|
||||
android:textSize="17sp"
|
||||
android:fontFamily="sans-serif-medium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chat_empty_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/chat_empty_state_description"
|
||||
android:textColor="@color/gray200_gray400"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
|
||||
android:id="@+id/recyclerView"
|
||||
|
|
|
|||
|
|
@ -1581,7 +1581,8 @@
|
|||
<string name="auth_get_credentials_error">Error getting credentials for authentication.</string>
|
||||
<string name="auth_invalid_credentials">Received invalid credentials.</string>
|
||||
<string name="auth_unknown_error">Unknown error during authentication.</string>
|
||||
<string name="chat_empty_state"><b>Start chatting!</b>\nRemember to be friendly and follow the Community Guidelines.</string>
|
||||
<string name="chat_empty_state_title">Start chatting!</string>
|
||||
<string name="chat_empty_state_description">Remember to be friendly and follow the Community Guidelines.</string>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -224,10 +224,10 @@ open class ChatFragment : BaseFragment<FragmentChatBinding>() {
|
|||
|
||||
if (chatMessages.isEmpty()) {
|
||||
binding?.recyclerView?.state = RecyclerViewState.EMPTY
|
||||
binding?.chatEmptyTextview?.fadeInAnimation()
|
||||
binding?.chatEmptyContainer?.fadeInAnimation()
|
||||
} else {
|
||||
binding?.recyclerView?.state = RecyclerViewState.DISPLAYING_DATA
|
||||
binding?.chatEmptyTextview?.isGone = true
|
||||
binding?.chatEmptyContainer?.isGone = true
|
||||
}
|
||||
|
||||
viewModel.gotNewMessages = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue