FastAdapter icon indicating copy to clipboard operation
FastAdapter copied to clipboard

Feature request: Default item if FastAdapter is empty

Open Rainer-Lang opened this issue 10 years ago • 7 comments

Default item should have icon, title, text,... Maybe I will make a PR. @mikepenz Please let it open.

Rainer-Lang avatar Apr 02 '16 08:04 Rainer-Lang

@Rainer-Lang you could just provide an item with height=MACHT_PARENT which devs can use.

Should be in the extension lib

mikepenz avatar Apr 02 '16 08:04 mikepenz

@mikepenz Thanks. Now I know where to put it. I will close this issue and prepare a pr.

Rainer-Lang avatar Apr 02 '16 18:04 Rainer-Lang

Thanks ;)

mikepenz avatar Apr 02 '16 18:04 mikepenz

@Rainer-Lang i am also interested in an empty view. have you implemented this yet? if so how would i use it?

or-dvir avatar Mar 16 '17 17:03 or-dvir

@or-dvir an empty view is really easy. I did something similar for the ABoutLibraries with an ProgressItem https://github.com/mikepenz/AboutLibraries/blob/develop/library/src/main/java/com/mikepenz/aboutlibraries/ui/item/LoaderItem.java

mikepenz avatar Mar 16 '17 17:03 mikepenz

@mikepenz forgive me but i dont understand how this link implements an empty view...

in the meantime i have tried using "registerAdapterDataObserver()" and overriding "onChanged()" like many people suggest on different forums. however, this method is not invoked :( any idea why?

here is my implementation:

@Override
	public void onResume()
	{
		super.onResume();
		mAdapter.registerAdapterDataObserver(mDataObserver);
	}

	@Override
	public void onPause()
	{
		super.onPause();
		mAdapter.unregisterAdapterDataObserver(mDataObserver);
	}

and in onCreateView (i am using a fragment) i do this:

mDataObserver = new AdapterDataObserver()
		{
			@Override
			public void onChanged()
			{
				Log.i("aaaaa", "something changed!");
				super.onChanged();

				toggleEmptyView();
			}
		};

or-dvir avatar Mar 16 '17 18:03 or-dvir

i have some problem too with empty view, is there any sample code that you can share how to make it with fast adapter

anton-khansa avatar Apr 15 '17 02:04 anton-khansa