Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 559b328

Browse files
committed
fix:Layout issue.
Toolbar shifts up when keyboard pop's up && message list is empty. fix:#492
1 parent fcad93b commit 559b328

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/src/main/java/com/zulip/android/activities/MessageListFragment.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ public void onReadyToDisplay(boolean registered, int messageId) {
395395

396396
private void showEmptyView() {
397397
Log.d("ErrorRecieving", "No Messages found for current list" + ((filter != null) ? ":" + filter.getTitle() : ""));
398-
recyclerView.setVisibility(View.GONE);
399398
emptyTextView.setVisibility(View.VISIBLE);
400399
}
401400

@@ -769,15 +768,14 @@ public void onMessages(Message[] messages, LoadPosition pos,
769768
if (messageList.size() == 0)
770769
showEmptyView();
771770
else
772-
showRecyclerView();
771+
hideEmptyView();
773772
}
774773

775774
/**
776775
* hides TextView with no message
777776
* show recyclerView
778777
*/
779-
private void showRecyclerView() {
780-
recyclerView.setVisibility(View.VISIBLE);
778+
private void hideEmptyView() {
781779
emptyTextView.setVisibility(View.GONE);
782780
}
783781

app/src/main/res/layout/fragment_message_list.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
77
android:id="@+id/recyclerView"
88
android:layout_width="match_parent"
9-
android:layout_height="fill_parent"
9+
android:layout_height="match_parent"
1010
android:background="@color/listBackground"
1111
android:clipToPadding="false"
1212
android:fadeScrollbars="false"

0 commit comments

Comments
 (0)