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

Commit 0303990

Browse files
nitish1211kunall17
authored andcommitted
Added a better progress bar at the bottom/top of feed
1 parent c1bd366 commit 0303990

File tree

4 files changed

+31
-13
lines changed

4 files changed

+31
-13
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="oval">
4+
<size
5+
android:width="56dp"
6+
android:height="56dp" />
7+
<solid android:color="@color/progress_background_color" />
8+
</shape>

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

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,34 @@ per http://pivotallabs.com/android-tidbits-6-22-2011-hiding-header-views/
88
android:layout_height="wrap_content"
99
android:orientation="vertical">
1010

11-
<LinearLayout
11+
<RelativeLayout
1212
android:layout_width="match_parent"
1313
android:layout_height="48dp"
1414
android:layout_gravity="center"
1515
android:background="@color/loadingBackground"
16-
android:gravity="center|center_vertical"
1716
tools:ignore="UselessParent">
1817

1918
<ProgressBar
19+
android:layout_width="45dp"
20+
android:layout_height="45dp"
21+
android:layout_centerHorizontal="true"
22+
android:layout_centerVertical="true" />
23+
24+
<ImageView
2025
android:layout_width="30dp"
21-
android:layout_height="30dp" />
26+
android:layout_height="30dp"
27+
android:layout_centerHorizontal="true"
28+
android:layout_centerVertical="true"
29+
android:src="@drawable/progress_background_circle"
30+
tools:ignore="ContentDescription" />
2231

23-
<TextView
24-
android:layout_width="wrap_content"
25-
android:layout_height="wrap_content"
26-
android:paddingLeft="16dp"
27-
android:text="@string/loading_messages"
28-
android:textColor="@color/colorTextPrimary"
29-
android:textSize="18sp" />
30-
</LinearLayout>
32+
<ImageView
33+
android:layout_width="20dp"
34+
android:layout_height="20dp"
35+
android:layout_centerVertical="true"
36+
android:layout_centerHorizontal="true"
37+
android:src="@drawable/zulip_notification"
38+
android:contentDescription="@string/progress_bar_description" />
39+
</RelativeLayout>
3140

32-
</LinearLayout>
41+
</LinearLayout>

app/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@
2929
<color name="top_snackbar_show_button_text_color">#d26811</color>
3030
<color name="top_snackbar_bg_color">#000000</color>
3131
<color name="top_snackbar_text_color">#ffffff</color>
32+
<color name="progress_background_color">#444444</color>
3233
</resources>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
<!-- Used on the indicator when loading messages -->
3333
<string name="editing_message">Editing message</string>
34-
<string name="loading_messages">Loading messages</string>
3534
<string name="sending_message">Sending</string>
3635
<string name="search">Search</string>
3736
<string name="reply_to_private_message">Reply to private message</string>
@@ -148,4 +147,5 @@
148147
<string name="editing_message_disabled">Editing message is disabled</string>
149148
<string name="default_delete_text">(deleted)</string>
150149
<string name="message_edited_tag">(EDITED)</string>
150+
<string name="progress_bar_description">Loading new messages</string>
151151
</resources>

0 commit comments

Comments
 (0)