lower opacity of button while translating
This commit is contained in:
@@ -155,6 +155,7 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||||||
if (item.translation == null) {
|
if (item.translation == null) {
|
||||||
translateProgress.setVisibility(View.VISIBLE);
|
translateProgress.setVisibility(View.VISIBLE);
|
||||||
translateButton.setClickable(false);
|
translateButton.setClickable(false);
|
||||||
|
translateButton.setAlpha(.50f);
|
||||||
new TranslateStatus(item.status.id).setCallback(new Callback<>() {
|
new TranslateStatus(item.status.id).setCallback(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TranslatedStatus translatedStatus) {
|
public void onSuccess(TranslatedStatus translatedStatus) {
|
||||||
@@ -162,6 +163,7 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||||||
item.translated = true;
|
item.translated = true;
|
||||||
translateProgress.setVisibility(View.GONE);
|
translateProgress.setVisibility(View.GONE);
|
||||||
translateButton.setClickable(true);
|
translateButton.setClickable(true);
|
||||||
|
translateButton.setAlpha(1f);
|
||||||
rebind();
|
rebind();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,6 +171,7 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
|||||||
public void onError(ErrorResponse error) {
|
public void onError(ErrorResponse error) {
|
||||||
translateProgress.setVisibility(View.GONE);
|
translateProgress.setVisibility(View.GONE);
|
||||||
translateButton.setClickable(true);
|
translateButton.setClickable(true);
|
||||||
|
translateButton.setAlpha(1f);
|
||||||
error.showToast(itemView.getContext());
|
error.showToast(itemView.getContext());
|
||||||
}
|
}
|
||||||
}).exec(item.parentFragment.getAccountID());
|
}).exec(item.parentFragment.getAccountID());
|
||||||
|
|||||||
Reference in New Issue
Block a user