Comments (4)
Okay, but I do think this is a bug
I dont think restoring view focus or position of cursor in edittext should be users responsibility + dialog fragment handles this
from conductor-dialog.
Okay now I noticed that savedViewState always empty in onBindView, and only non-empty if I put something in onSaveViewState
@Override protected void onRestoreViewState(@NonNull View view, @NonNull Bundle savedViewState) {
super.onRestoreViewState(view, savedViewState);
Bundle dialogState = savedViewState.getBundle(SAVED_DIALOG_VIEW_STATE_TAG);
if (dialogState != null && dialog != null) {
dialog.onRestoreInstanceState(dialogState);
}
}
@Override protected void onSaveViewState(@NonNull View view, @NonNull Bundle outState) {
super.onSaveViewState(view, outState);
if (dialog != null) {
Bundle dialogState = dialog.onSaveInstanceState();
outState.putBundle(SAVED_DIALOG_VIEW_STATE_TAG, dialogState);
}
}
This works well for all of view hierarchy, no need to futz about with individial views
from conductor-dialog.
Hi
When config change the controller not destroyed and onSaveInstanceState
, onRestoreInstanceState
not called.
from conductor-dialog.
So, if you use MVP your presenter still alive after config change and you can bind data to UI
from conductor-dialog.
Related Issues (5)
- Custom Dialog HOT 2
- View under Dialog removed? HOT 1
- BottomSheetDialog HOT 3
- Readme HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conductor-dialog.