public abstract class JotyResultFragment extends JotyListFragment
QueryResponseHandlersManager
, which the container Activity works with.
Then extracts the JotyCursor
object embedded in the WResulSet
object hosted by the response manager,
and wraps it with an instance of JotyCursorWrapper
. Indeed the wrapper is passed as argument
to the abstract createAdapter
method that builds a JotyResourceCursorAdapter
instance;
On attaching to the container it gets a reference to the ResultController
object and provides
itself as reference in order to be "invoked" by the container (a DataResultActivity
).
On the View creation handles the visualization of the navigation buttons and stores the index of the lowest visible row.
The class works with two row index markers used to scroll the list, upon the initialization, to a certain position:
the first one, m_resultActivity.m_initialSelection
, is assumed to be a "long life" value, available
for specific implementations, surviving among different launches of the application;
the second one, ResultController.m_resultListLowestRefPos
, holds the value gettable from
AdapterView.getFirstVisiblePosition
method invoked on the parent of the row view inflated by
the adapter created in the implementation of the createAdapter
method, as the parent is received,
as argument, in the implementation that this class does of the AbsListView.OnItemClickListener.onItemClick
method.
The second marker, indeed has the role of maintain a position in the visualization of the list upon a renewing of it.
The onItemClick
implementation, then, if the ResultActivity is running as "selector", uses the ValuesOnChoice
instance to make the "context selected" available to the calling environment (waht is selected here wil be typically usable at
in the onResume event handler of the Activity that committed the opening of the ResultActivity.
If the ResultActivity is not running as selector then its onFragmentItemClick
method is invoked.
DataResultActivity
,
ResultController
,
JotyApp.QueryResponseHandlersManager
,
JotyListFragment
,
JotyActivity.getRespManager()
,
JotyResourceCursorAdapter
,
JotyApp.ValuesOnChoice
Modifier and Type | Field and Description |
---|---|
protected ResultController |
m_resultController |
m_adapter, m_listView, m_resultActivity
Constructor and Description |
---|
JotyResultFragment() |
Modifier and Type | Method and Description |
---|---|
protected abstract JotyResourceCursorAdapter |
createAdapter(JotyCursorWrapper cursorWrapper) |
JotyCursorWrapper |
getCursor() |
protected abstract java.lang.String |
getKeyFieldName() |
protected void |
init() |
protected boolean |
isEmptyViewVisible() |
DataMainActivity |
mainActivity() |
void |
onAttach(android.app.Activity activity) |
void |
onItemClick(android.widget.AdapterView<?> parent,
android.view.View view,
int position,
long id) |
void |
onViewCreated(android.view.View view,
android.os.Bundle savedInstanceState) |
getAdapter, getListView, getResId, manageAuxView, onCreate, onCreateView, setSelection
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onTrimMemory, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
protected ResultController m_resultController
protected abstract java.lang.String getKeyFieldName()
protected abstract JotyResourceCursorAdapter createAdapter(JotyCursorWrapper cursorWrapper)
protected void init()
init
in class JotyListFragment
protected boolean isEmptyViewVisible()
isEmptyViewVisible
in class JotyListFragment
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
onViewCreated
in class android.app.Fragment
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id)
onItemClick
in interface android.widget.AdapterView.OnItemClickListener
onItemClick
in class JotyListFragment
public void onAttach(android.app.Activity activity)
onAttach
in class JotyListFragment
public DataMainActivity mainActivity()
public JotyCursorWrapper getCursor()