OnFinishInflate inside ListActivity

I have a main class filled with a cursor adapter:

public class MainMenu extends ListActivity{ 
private void updateData(){ 
SimpleAdapter notes = new SimpleAdapter(this, array, R.layout.row_task, from, to); setListAdapter(notes); 

I need to know when this list has finnished to inflate it, so I've discovered this methods:


But I have no idea how to override it inside my code.

Any idea?

Asked by: Aida670 | Posted: 24-01-2022

Answer 1

You'll need your own View that will extend ListView. And than you can override whatever you want. Note: Method is not specific to the ListView it's inherited from View. But since you'll need functionality of the ListView you'll need to extend ListView.

Answered by: Alissa180 | Posted: 25-02-2022

Similar questions

android - how to know when view has inflated using the onFinishInflate

I want to know when my TabActivity has inflated so i tried this code @Override protected void onFinishInflate() { super.onFinishInflate(); } i get the error: must override or implement a supertype method I cannot understand why that is not working in the TabActivity. Can Anyone explane this? package com.carlsberg.bungle.history;...

android - onFinishInflate not being called when dynamically instantiating and adding a compound control

I have a custom control which serves as a base to other compound controls (BaseControl) which inherits RelativeLayout. This BaseControl is intended to simplify inflating the XML on each control and initialize them after that. Everything is done in the constructor: abstract class BaseControl extends RelativeLayout { public BaseControl(Context context) { super(context); this.baseInitializ...

android - Inflating a merged layout using onFinishInflate

I have a view that is used as a list element so am striving for optimal inflation performance. In OnFinishInflate(), an ImageView and TextView are assigned their content (a drawable and a string) and even though this seems to work as expected, I'm uncertain if there is a better way? It seems like onLayout may be more appropriate b/c the TextView

Still can't find your answer? Check out these communities...

Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android