We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 900cccf commit 5bad5f0Copy full SHA for 5bad5f0
1 file changed
library/src/main/java/eu/inloop/viewmodel/AbstractViewModel.java
@@ -73,6 +73,12 @@ public T getView() {
73
return mView;
74
}
75
76
+ /**
77
+ * Alternative to {@link #getView()}. This method will never return a null view - not even in case the current Fragment or
78
+ * Activity is already destroyed or between orientation change. It will return a dummy
79
+ * implementation in that case.
80
+ * @return the View instance which implements {@link T}. It's never null.
81
+ */
82
@CheckResult
83
@NonNull
84
public T getViewOptional() {
0 commit comments