Fixed No Chatroom label when chat room list is empty
This commit is contained in:
parent
3cbbf23eff
commit
cb76369a9a
2 changed files with 11 additions and 9 deletions
|
@ -63,6 +63,8 @@
|
|||
android:cacheColorHint="@color/transparent"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noChatHistory"
|
||||
android:text="@string/no_chat_history"
|
||||
|
@ -72,8 +74,6 @@
|
|||
android:layout_height="match_parent"
|
||||
android:gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/wait_layout" android:id="@+id/waitScreen"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -78,6 +78,7 @@ public class ChatListFragment extends Fragment implements OnItemClickListener, C
|
|||
mChatRoomsList.setOnItemClickListener(this);
|
||||
|
||||
mNoChatHistory = view.findViewById(R.id.noChatHistory);
|
||||
mNoChatHistory.setVisibility(View.GONE);
|
||||
|
||||
mNewDiscussionButton = view.findViewById(R.id.new_discussion);
|
||||
mNewDiscussionButton.setOnClickListener(new View.OnClickListener() {
|
||||
|
@ -114,6 +115,7 @@ public class ChatListFragment extends Fragment implements OnItemClickListener, C
|
|||
|
||||
private void refreshChatRoomsList() {
|
||||
mChatRoomsAdapter.refresh();
|
||||
mNoChatHistory.setVisibility(mChatRoomsAdapter.getCount() == 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue