-
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 search feature #24
Conversation
|
||
private lateinit var rootView: View | ||
private lateinit var behavior: BottomSheetBehavior<*> | ||
lateinit var accountType: AccountType |
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.
Make private
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.
Can't because I am using kotlin setter In another fragment.
inner class ViewHolder(itemView: View?) : RecyclerView.ViewHolder(itemView) { | ||
|
||
init { | ||
itemView?.setOnClickListener({ |
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.
move setOnClickListener in onBindVIewHolder
} | ||
} | ||
|
||
var cbStatusSelect = itemView?.cb_status_select |
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.
var cbStatusSelect = itemView?.cb_status_select it should be var cbStatusSelect = itemView.cb_status_select
same for others
@@ -68,6 +72,30 @@ class AccountsFragment : MifosBaseFragment(), AccountsContract.View, View.OnClic | |||
val rootView = inflater.inflate(R.layout.fragment_accounts, container, false) | |||
accountsPresenter.attachView(this) | |||
|
|||
//listen to setting call | |||
DataBus.listen(FilterAccountsEvent.SetStatusModelList::class.java).subscribe({ |
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.
Class name RxBus
} | ||
|
||
override fun onClick(v: View?) { | ||
when (v?.id) { |
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.
don't implement onClick, directly use it in onCreateDialog
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 done in previous PR
* @since 20/July/2018 | ||
*/ | ||
|
||
class FilterAccountsEvent { |
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.
Make separate RxEvent Class
@therajanmaurya please review. |
577f56d
to
df22218
Compare
@@ -138,7 +138,6 @@ class DashboardActivity : MifosBaseActivity(), View.OnClickListener, NavigationV | |||
if (fragment is DashboardFragment) { | |||
setNavigationViewSelectedItem(R.id.item_home) | |||
} else if(fragment is CustomerAccountFragment) { | |||
hideToolbarElevation() |
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.
To show the toolbar elevation in accounts section.
@@ -157,7 +156,6 @@ class DashboardActivity : MifosBaseActivity(), View.OnClickListener, NavigationV | |||
replaceFragment(DashboardFragment.newInstance(), true, R.id.container) | |||
} | |||
R.id.item_accounts -> { | |||
hideToolbarElevation() |
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.
Same for toolbar elevation
Fixes #23
Please Add Screenshots If there are any UI changes.
![20180722_163958](https://user-images.githubusercontent.com/24601454/43045026-653ccc00-8dce-11e8-9603-7a8e0c84a0db.gif)
Please make sure these boxes are checked before submitting your pull request - thanks!
Run the unit tests with
./gradlew check
to make sure you didn't break anythingIf you have multiple commits please combine them into one commit by squashing them.