-
Notifications
You must be signed in to change notification settings - Fork 64
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
feat:added splash screen #2
Conversation
ivary43
commented
May 30, 2018
•
edited
Loading
edited
@therajanmaurya please review. |
e9ca389
to
2fd4a8a
Compare
@@ -47,7 +47,7 @@ open class MifosBaseActivity : AppCompatActivity(), BaseActivityCallback { | |||
override fun setContentView(layoutResID: Int) { | |||
super.setContentView(layoutResID) | |||
// toolbar = findViewById(R.id.toolbar) | |||
setSupportActionBar(toolbar) | |||
// setSupportActionBar(toolbar) |
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.
Uncomment it, This line is enabling the support action bar in base activity.
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.
@therajanmaurya since there is no toolbar yet, hence I got an error if I try to extend this activity because we were calling setSupportActionBar on an uninitialized toolbar.
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.
@therajanmaurya I will add a toolbar in the layout and push the changes.
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_launcher) |
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.
why are you using this method, it's not compatible for all the devices, you have to make layout for all the different devices to enable the support. See the blogs that I shared with you and make this launch activity using drawable layout as mentioned in blog that is the best way to support all the devices.
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.
@therajanmaurya I didn't get the message you sent me can you send again, please.
Do you want me to use a launcher theme and change the windowBackground
into custom drawable .. Plus aren't we going to use the splash activity to reroute to different pages?
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_launcher) | ||
activityComponent.inject(this) | ||
launcherPresenter.attachView(this) |
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.
We don't need present and contract in this case because we don't have any logic to write in the presenter. only PrefrenceHelper we would need here.
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.
@therajanmaurya okay I will remove it I added this because I thought we will be rerouting to different pages from here so we would need to check access tokens, refresh it and stuff
} | ||
|
||
|
||
override fun onDestroy() { |
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.
Useless as I mentioned above.
* On 31/05/18. | ||
*/ | ||
|
||
class LauncherPresenter @Inject constructor(@ApplicationContext context: Context) |
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.
remove this file we don't have any logic to write for now if you would have in future we will add it.
* On 31/05/18. | ||
*/ | ||
|
||
interface LauncherContract { |
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.
remove this file we don't have any logic to write for now if you would have in future we will add it.