| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent dfa70dd commit cf8dcfa
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,7 +203,7 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition { | |||
| 203 | 203 | return false; | |
| 204 | 204 | } | |
| 205 | 205 | ||
| 206 | - public _onBackPressed(): boolean { | ||
| 206 | + public onBackPressed(): boolean { | ||
| 207 | 207 | return false; | |
| 208 | 208 | } | |
| 209 | 209 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -115,7 +115,7 @@ function initializeDialogFragment() { | |||
| 115 | 115 | }; | |
| 116 | 116 | view.notify(args); | |
| 117 | 117 | ||
| 118 | - if (!args.cancel && !view._onBackPressed()) { | ||
| 118 | + if (!args.cancel && !view.onBackPressed()) { | ||
| 119 | 119 | super.onBackPressed(); | |
| 120 | 120 | } | |
| 121 | 121 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -678,10 +678,11 @@ export abstract class View extends ViewBase { | |||
| 678 | 678 | * @private | |
| 679 | 679 | */ | |
| 680 | 680 | _onLivesync(): boolean; | |
| 681 | + | ||
| 681 | 682 | /** | |
| 682 | - * @private | ||
| 683 | + * Derived classes can override this method to handle Android back button press. | ||
| 683 | 684 | */ | |
| 684 | - _onBackPressed(): boolean; | ||
| 685 | + onBackPressed(): boolean; | ||
| 685 | 686 | /** | |
| 686 | 687 | * @private | |
| 687 | 688 | */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -249,7 +249,7 @@ export class Frame extends FrameBase { | |||
| 249 | 249 | } | |
| 250 | 250 | } | |
| 251 | 251 | ||
| 252 | - public _onBackPressed(): boolean { | ||
| 252 | + public onBackPressed(): boolean { | ||
| 253 | 253 | if (this.canGoBack()) { | |
| 254 | 254 | this.goBack(); | |
| 255 | 255 | return true; | |
@@ -884,7 +884,7 @@ class ActivityCallbacksImplementation implements AndroidActivityCallbacks { | |||
| 884 | 884 | }; | |
| 885 | 885 | view.notify(viewArgs); | |
| 886 | 886 | ||
| 887 | - if (!viewArgs.cancel && !view._onBackPressed()) { | ||
| 887 | + if (!viewArgs.cancel && !view.onBackPressed()) { | ||
| 888 | 888 | callSuper = true; | |
| 889 | 889 | } | |
| 890 | 890 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -510,10 +510,10 @@ export class TabView extends TabViewBase { | |||
| 510 | 510 | super.disposeNativeView(); | |
| 511 | 511 | } | |
| 512 | 512 | ||
| 513 | - public _onBackPressed(): boolean { | ||
| 513 | + public onBackPressed(): boolean { | ||
| 514 | 514 | const currentView = this._selectedView; | |
| 515 | 515 | if (currentView) { | |
| 516 | - return currentView._onBackPressed(); | ||
| 516 | + return currentView.onBackPressed(); | ||
| 517 | 517 | } | |
| 518 | 518 | ||
| 519 | 519 | return false; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments