-
Notifications
You must be signed in to change notification settings - Fork 219
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 shortcut to open saved activities from edit activities #538
Conversation
@adityastic please review. |
@yashk2000 please review. |
Please use the same white color as the font instead of black. |
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.
Good Job, make the minor requested changes and we can get this merged :). Sorry for the delay, I am still busy with my mid sems
@@ -62,13 +62,26 @@ class DrawerActivity : BaseActivity(), NavigationView.OnNavigationItemSelectedLi | |||
setupDrawerAndToolbar() | |||
|
|||
prepareForScan() | |||
|
|||
val bundle = intent.extras |
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.
lets add this complete block to a function called handleIfReceivedIntents
when (item.itemId) { | ||
R.id.open_Folder -> { | ||
val intent = Intent(this, DrawerActivity::class.java) | ||
intent.putExtra("badge", "badge") |
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.
intent.putExtra("badge", "badge") | |
intent.putExtra("badge", "badge") | |
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) |
because we want to cancel the last stacked activities.
when (item.itemId) { | ||
R.id.open_Folder -> { | ||
val intent = Intent(this, DrawerActivity::class.java) | ||
intent.putExtra("clipart", "clipart") |
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.
intent.putExtra("clipart", "clipart") | |
intent.putExtra("clipart", "clipart") | |
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) |
because we want to cancel the last stacked activities.
android:viewportWidth="24.0" | ||
android:viewportHeight="24.0"> | ||
<path | ||
android:fillColor="#FF000000" |
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.
lets make it white as said by @mariobehling
val clipart = SavedClipartFragment() | ||
supportFragmentManager.beginTransaction() | ||
.replace(R.id.frag_container, clipart) | ||
.commit() |
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.
.commit() | |
.commit() | |
nav_view.setCheckedItem(R.id.saved_cliparts) |
you also should check the navigation drawer when switching fragments as it needs to reflect as soon as you switch to another fragment.
val badge = SavedBadgesFragment() | ||
supportFragmentManager.beginTransaction() | ||
.replace(R.id.frag_container, badge) | ||
.commit() |
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.
.commit() | |
.commit() | |
nav_view.setCheckedItem(R.id.saved_badges) |
same for this
@adityastic thanks for the review I will update this PR soon with the requested changes : ) |
@adityastic @mariobehling Done :) |
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.
@refactor-droidyy great, looks perfect now 🔥 , also we try to follow semantic naming schemes when dropping a pull request, like this pr can be named 'feat: added shortcut to open saved activities from edit activities'.
@adityastic thankyou loved learning with you :) |
Sorry again for not being able to review it early, Keep Learning 👍 🚀 |
Fixes #479 Edit Badge Screen / Edit Clipart Screen
Add an "Open Folder" icon to the edit badge/edit clipart screen on the top right of the screen on the menu bar. The icon should open "Saved Badges" / "Saved Cliparts".
EditBadgeScreen:-
EditClipartScreen:-