mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-02-02 20:29:15 +00:00
made error message be displayed inside erroractivity
This commit is contained in:
parent
1829dc79c8
commit
18493a578d
@ -92,6 +92,7 @@ public class ErrorActivity extends AppCompatActivity {
|
|||||||
private EditText userCommentBox;
|
private EditText userCommentBox;
|
||||||
private Button reportButton;
|
private Button reportButton;
|
||||||
private TextView infoView;
|
private TextView infoView;
|
||||||
|
private TextView errorMessageView;
|
||||||
|
|
||||||
public static void reportError(final Context context, final List<Exception> el,
|
public static void reportError(final Context context, final List<Exception> el,
|
||||||
final Class returnAcitivty, View rootView, final ErrorInfo errorInfo) {
|
final Class returnAcitivty, View rootView, final ErrorInfo errorInfo) {
|
||||||
@ -159,6 +160,7 @@ public class ErrorActivity extends AppCompatActivity {
|
|||||||
userCommentBox = (EditText) findViewById(R.id.errorCommentBox);
|
userCommentBox = (EditText) findViewById(R.id.errorCommentBox);
|
||||||
errorView = (TextView) findViewById(R.id.errorView);
|
errorView = (TextView) findViewById(R.id.errorView);
|
||||||
infoView = (TextView) findViewById(R.id.errorInfosView);
|
infoView = (TextView) findViewById(R.id.errorInfosView);
|
||||||
|
errorMessageView = (TextView) findViewById(R.id.errorMessageView);
|
||||||
|
|
||||||
errorView.setText(formErrorText(errorList));
|
errorView.setText(formErrorText(errorList));
|
||||||
|
|
||||||
@ -184,8 +186,7 @@ public class ErrorActivity extends AppCompatActivity {
|
|||||||
globIpRangeThread = new Thread(new IpRagneRequester());
|
globIpRangeThread = new Thread(new IpRagneRequester());
|
||||||
globIpRangeThread.start();
|
globIpRangeThread.start();
|
||||||
|
|
||||||
Toast.makeText(this,
|
errorMessageView.setText(errorInfo.message);
|
||||||
errorInfo.message, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -129,7 +129,7 @@ public class VideoItemListFragment extends ListFragment {
|
|||||||
View rootView = a.findViewById(R.id.videoitem_list);
|
View rootView = a.findViewById(R.id.videoitem_list);
|
||||||
ErrorActivity.reportError(h, getActivity(), result.errors, null, rootView,
|
ErrorActivity.reportError(h, getActivity(), result.errors, null, rootView,
|
||||||
ErrorActivity.ErrorInfo.make(ErrorActivity.SEARCHED,
|
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:
|
// hard errors:
|
||||||
|
@ -30,6 +30,21 @@
|
|||||||
android:text="@string/sorry_string"
|
android:text="@string/sorry_string"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/messageWhatHappenedView"
|
||||||
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:text="@string/what_happened_headline"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/errorMessageView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:text="@string/info_labels"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/errorDeviceHeadlineView"
|
android:id="@+id/errorDeviceHeadlineView"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
@ -66,12 +81,12 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/errorWhatHappenedView"
|
android:id="@+id/errorDetailView"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:text="@string/what_happened_headline"/>
|
android:text="@string/error_details_headline"/>
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
<string name="could_not_load_thumbnails">Could not load all Thumbnails</string>
|
<string name="could_not_load_thumbnails">Could not load all Thumbnails</string>
|
||||||
<string name="youtube_signature_decryption_error">Could not decrypt video url signature.</string>
|
<string name="youtube_signature_decryption_error">Could not decrypt video url signature.</string>
|
||||||
<string name="parsing_error">Could not parse website.</string>
|
<string name="parsing_error">Could not parse website.</string>
|
||||||
|
<string name="light_parsing_error">Could not parse website complete.</string>
|
||||||
<string name="content_not_available">Content not available.</string>
|
<string name="content_not_available">Content not available.</string>
|
||||||
<string name="blocked_by_gema">Blocked by GEMA.</string>
|
<string name="blocked_by_gema">Blocked by GEMA.</string>
|
||||||
<string name="could_not_setup_download_menu">Could not setup download menu.</string>
|
<string name="could_not_setup_download_menu">Could not setup download menu.</string>
|
||||||
@ -101,6 +102,7 @@
|
|||||||
<string name="info_searched_lbl">Searched for:</string>
|
<string name="info_searched_lbl">Searched for:</string>
|
||||||
<string name="info_requested_stream_lbl">Requested stream:</string>
|
<string name="info_requested_stream_lbl">Requested stream:</string>
|
||||||
<string name="your_comment">Your comment (in English):</string>
|
<string name="your_comment">Your comment (in English):</string>
|
||||||
|
<string name="error_details_headline">Details:</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- Content descriptions (for better accessibility) -->
|
<!-- Content descriptions (for better accessibility) -->
|
||||||
|
Loading…
Reference in New Issue
Block a user