MCPcopy Create free account
hub / github.com/buggins/coolreader / onActivityResult

Method onActivityResult

android/src/org/coolreader/CoolReader.java:1900–1926  ·  view source on GitHub ↗
(int requestCode, int resultCode, Intent intent)

Source from the content-addressed store, hash-verified

1898 }
1899
1900 @Override
1901 protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
1902 if (requestCode == DICTAN_ARTICLE_REQUEST_CODE) {
1903 switch (resultCode) {
1904
1905 // The article has been shown, the intent is never expected null
1906 case RESULT_OK:
1907 break;
1908
1909 // Error occured
1910 case RESULT_CANCELED:
1911 String errMessage = "Unknown Error.";
1912 if (intent != null) {
1913 errMessage = "The Requested Word: " +
1914 intent.getStringExtra(DICTAN_ARTICLE_WORD) +
1915 ". Error: " + intent.getStringExtra(DICTAN_ERROR_MESSAGE);
1916 }
1917 showToast(errMessage);
1918 break;
1919
1920 // Must never occur
1921 default:
1922 showToast("Unknown Result Code: " + resultCode);
1923 break;
1924 }
1925 }
1926 }
1927
1928 public void showDictionary() {
1929 findInDictionaryInternal(null);

Callers

nothing calls this directly

Calls 1

showToastMethod · 0.95

Tested by

no test coverage detected