Is there any way that you can call a function after its getView method has been called. For example, i would like to be able to hide/show various widgets based on the size of them. For this i need to be able to query the size of the widget in the view.
My problem is that the getView method in an overwritten ArrayAdapter does not actually inflate the view so that any getWidth/getLeft/getHeight etc calls on widgets inside the View come back as 0. I was wondering, is there a way to call a function after that waits until the view has been properly inflated? Or perhaps an event binding that can be done that in effect waits until the view is fully inflated in the view?
Cheers
EDIT:
public class GetDataTask extends
AsyncTask<Context, Void, FriendListAdapter> {
@Override
protected void onPostExecute(FriendListAdapter result) {
friendList.onRefreshComplete();
friendList.getRefreshableView().setAdapter(result);
friendList.getRefreshableView().setOnItemClickListener(itself);
friendList.getRefreshableView().getChildCount();
}
This bit of code acts very strangely. The adapter is set but the getChildCount returns 0 even though the list showing on screen clearly shows ~15 things on the list. This