made error message be displayed inside erroractivity
This commit is contained in:
parent
1829dc79c8
commit
18493a578d
4 changed files with 23 additions and 5 deletions
|
|
@ -92,6 +92,7 @@ public class ErrorActivity extends AppCompatActivity {
|
|||
private EditText userCommentBox;
|
||||
private Button reportButton;
|
||||
private TextView infoView;
|
||||
private TextView errorMessageView;
|
||||
|
||||
public static void reportError(final Context context, final List<Exception> el,
|
||||
final Class returnAcitivty, View rootView, final ErrorInfo errorInfo) {
|
||||
|
|
@ -159,6 +160,7 @@ public class ErrorActivity extends AppCompatActivity {
|
|||
userCommentBox = (EditText) findViewById(R.id.errorCommentBox);
|
||||
errorView = (TextView) findViewById(R.id.errorView);
|
||||
infoView = (TextView) findViewById(R.id.errorInfosView);
|
||||
errorMessageView = (TextView) findViewById(R.id.errorMessageView);
|
||||
|
||||
errorView.setText(formErrorText(errorList));
|
||||
|
||||
|
|
@ -184,8 +186,7 @@ public class ErrorActivity extends AppCompatActivity {
|
|||
globIpRangeThread = new Thread(new IpRagneRequester());
|
||||
globIpRangeThread.start();
|
||||
|
||||
Toast.makeText(this,
|
||||
errorInfo.message, Toast.LENGTH_LONG).show();
|
||||
errorMessageView.setText(errorInfo.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ public class VideoItemListFragment extends ListFragment {
|
|||
View rootView = a.findViewById(R.id.videoitem_list);
|
||||
ErrorActivity.reportError(h, getActivity(), result.errors, null, rootView,
|
||||
ErrorActivity.ErrorInfo.make(ErrorActivity.SEARCHED,
|
||||
/* todo: this shoudl not be assigned static */ "Youtube", query, R.string.general_error));
|
||||
/* todo: this shoudl not be assigned static */ "Youtube", query, R.string.light_parsing_error));
|
||||
|
||||
}
|
||||
// hard errors:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue