Skip to content

Commit b4ddec6

Browse files
authored
Merge 5684ebf into 18a488f
2 parents 18a488f + 5684ebf commit b4ddec6

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/impl/FeedbackActivity.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
package com.google.firebase.appdistribution.impl;
1616

1717
import static android.view.View.GONE;
18-
import static android.view.View.INVISIBLE;
1918
import static android.view.View.VISIBLE;
2019

2120
import android.graphics.Bitmap;
2221
import android.net.Uri;
2322
import android.os.Bundle;
23+
import android.os.Handler;
2424
import android.text.method.LinkMovementMethod;
2525
import android.view.View;
2626
import android.widget.CheckBox;
@@ -147,13 +147,13 @@ private Bitmap readScreenshot() {
147147
}
148148

149149
public void submitFeedback(View view) {
150+
setSubmittingStateEnabled(true);
150151
if (releaseName == null) {
151152
// Don't actually send feedback in development-mode
152153
Toast.makeText(this, R.string.feedback_no_release, Toast.LENGTH_LONG).show();
153154
finish();
154155
return;
155156
}
156-
setSubmittingStateEnabled(true);
157157
EditText feedbackText = findViewById(R.id.feedbackText);
158158
CheckBox screenshotCheckBox = findViewById(R.id.screenshotCheckBox);
159159
feedbackSender
@@ -176,7 +176,8 @@ public void submitFeedback(View view) {
176176
}
177177

178178
public void setSubmittingStateEnabled(boolean loading) {
179-
findViewById(R.id.sendButton).setVisibility(loading ? INVISIBLE : VISIBLE);
179+
findViewById(R.id.sendButton).setVisibility(loading ? GONE : VISIBLE);
180+
findViewById(R.id.sendSpinner).setVisibility(loading ? VISIBLE : GONE);
180181
findViewById(R.id.feedbackText).setEnabled(!loading);
181182
findViewById(R.id.feedbackText).setFocusable(!loading);
182183
}

firebase-appdistribution/src/main/res/layout/activity_feedback.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@
4949
android:minHeight="48dp"
5050
app:srcCompat="@drawable/ic_baseline_send_24" />
5151

52+
<ProgressBar
53+
android:id="@+id/sendSpinner"
54+
android:layout_width="wrap_content"
55+
android:layout_height="wrap_content"
56+
android:layout_gravity="center"
57+
android:layout_weight="0"
58+
android:minWidth="48dp"
59+
android:minHeight="48dp"
60+
android:visibility="gone"/>
61+
5262
</LinearLayout>
5363

5464
<View
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<resources xmlns:tools="http://schemas.android.com/tools">
2-
<style name="FeedbackTheme" parent="Theme.AppCompat.Light.NoActionBar" />
2+
<style name="FeedbackTheme" parent="Theme.AppCompat.Light.NoActionBar">
3+
<item name="colorAccent">#000000</item>
4+
</style>
35
</resources>

0 commit comments

Comments
 (0)