-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes: PSLabSensor Activity decoupled from fragments #2110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VIKAS9899 thank you for the pull request. Seems good. Can you build the APK file and upload here so that we can test it? Also I have requested some code refactoring changes. Thanks again.
fragment=getSupportFragmentManager() | ||
.findFragmentByTag(getSensorName()); | ||
|
||
if (fragment instanceof OperationCallback){ | ||
((OperationCallback) fragment).playData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reformat the code here. You can use automatic option in Android studio. It will add missing spaces and indents.
fragment=getSupportFragmentManager() | ||
.findFragmentByTag(getSensorName()); | ||
|
||
if (fragment instanceof OperationCallback){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar reformatting here
fragment=getSupportFragmentManager() | ||
.findFragmentByTag(getSensorName()); | ||
|
||
if (fragment instanceof OperationCallback){ | ||
((OperationCallback) fragment).saveGraph(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well
@CloudyPadmal I have refracted the code. Please find the APK below https://drive.google.com/file/d/1H9k2Cs57xeW-3suS-MlLtiSWBeZkuOlJ/view?usp=sharing |
Fixes #2108
Changes: PSLabSensorActivity will interact with OperationCallback for operation not any specific fragments by doing this we can eliminate coupling & reduce boilerplate code.