-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
321 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
...oudant-nofr/src/main/java/org/smartregister/bidan/fragment/BaseSmartRegisterFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package org.smartregister.bidan.fragment; | ||
|
||
import android.text.Editable; | ||
import android.text.TextWatcher; | ||
|
||
import org.smartregister.cursoradapter.SecuredNativeSmartRegisterCursorAdapterFragment; | ||
import org.smartregister.provider.SmartRegisterClientsProvider; | ||
import org.smartregister.view.activity.SecuredNativeSmartRegisterActivity; | ||
|
||
import static android.view.View.INVISIBLE; | ||
import static android.view.View.VISIBLE; | ||
import static org.apache.commons.lang3.StringUtils.isEmpty; | ||
|
||
/** | ||
* Created by sid-tech on 11/29/17. | ||
*/ | ||
|
||
public class BaseSmartRegisterFragment extends SecuredNativeSmartRegisterCursorAdapterFragment { | ||
protected final TextWatcher textWatcher = new TextWatcher() { | ||
@Override | ||
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { | ||
} | ||
|
||
@Override | ||
public void onTextChanged(final CharSequence cs, int start, int before, int count) { | ||
filter(cs.toString(), "", ""); | ||
} | ||
|
||
@Override | ||
public void afterTextChanged(Editable editable) { | ||
|
||
} | ||
}; | ||
|
||
@Override | ||
protected SecuredNativeSmartRegisterActivity.DefaultOptionsProvider getDefaultOptionsProvider() { | ||
return null; | ||
} | ||
|
||
@Override | ||
protected SecuredNativeSmartRegisterActivity.NavBarOptionsProvider getNavBarOptionsProvider() { | ||
return null; | ||
} | ||
|
||
@Override | ||
protected SmartRegisterClientsProvider clientsProvider() { | ||
return null; | ||
} | ||
|
||
@Override | ||
protected void onInitialization() { | ||
|
||
} | ||
|
||
@Override | ||
protected void startRegistration() { | ||
|
||
} | ||
|
||
@Override | ||
protected void onCreation() { | ||
|
||
} | ||
|
||
protected void filter(String filterString, String joinTableString, String mainConditionString) { | ||
filters = filterString; | ||
joinTable = joinTableString; | ||
mainCondition = mainConditionString; | ||
getSearchCancelView().setVisibility(isEmpty(filterString) ? INVISIBLE : VISIBLE); | ||
CountExecute(); | ||
filterandSortExecute(); | ||
} | ||
|
||
} |
Oops, something went wrong.