Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6164545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:00:43+00:00 2026-05-23T22:00:43+00:00

I am trying to remove footer I’ve set using the same reference I used

  • 0

I am trying to remove footer I’ve set using the same reference I used to set it up. However, nothing happens.

protected void onPostExecute(ArrayList<Recipe> result) {

        int CHEF_ID = ChefsRecipeList.this.getIntent().getIntExtra("CHEF_ID", 0);

        ListView recipeListView = (ListView)findViewById(android.R.id.list);

        View footer = getLayoutInflater().inflate(R.layout.chef_recipe_list_footer, null);


        if(!addToExisting){

            RecipeManager.getInstance().setRecipeList(result);

            View header = getLayoutInflater().inflate(R.layout.chef_recipe_list_header, null);

            ImageView loadButton = (ImageView)footer.findViewById(R.id.loadmore);

            loadButton.setOnClickListener( new OnClickListener() {

                @Override
                public void onClick(View v) {

                    int CHEF_ID = ChefsRecipeList.this.getIntent().getIntExtra("CHEF_ID", 0);

                    try {

                        Log.d("NXTLAOD", "http://api.foodnetworkasia.com/api/mobile/get_recipes?chefId="+ChefManager.getInstance().getChef(CHEF_ID).getId()+
                        "&format=xml&startIndex="+(RecipeManager.getInstance().getRecipeList().size()+1)+"&endIndex="+(RecipeManager.getInstance().getRecipeList().size()+24));
                        new XMLRecipesParser(true).execute(new URL[] { new URL("http://api.foodnetworkasia.com/api/mobile/get_recipes?chefId="+ChefManager.getInstance().getChef(CHEF_ID).getId()+
                        "&format=xml&startIndex="+RecipeManager.getInstance().getRecipeList().size()+"&endIndex="+(RecipeManager.getInstance().getRecipeList().size()+24))  }  );

                    } catch (MalformedURLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }

                }
            });

            ImageView chefPhoto = (ImageView)header.findViewById(R.id.chef_photo);

            chefPhoto.setImageBitmap(ImageURLLoader.LoadImageFromURL(ChefManager.getInstance().getChef(CHEF_ID).getLargeURL()));

            TextView chefBio = (TextView)header.findViewById(R.id.chef_bio);

            chefBio.setText(ChefManager.getInstance().getChef(CHEF_ID).getDescription());


            recipeListView.addHeaderView(header);
            recipeListView.addFooterView(footer);

            recipeListView.setAdapter(new RecipeAdapter(ChefsRecipeList.this));

        }else{

            RecipeManager.getInstance().mergeLists(result);

            RecipeAdapter wrapperAdapter=(RecipeAdapter) ((HeaderViewListAdapter)recipeListView.getAdapter()).getWrappedAdapter();


            wrapperAdapter.notifyDataSetChanged();



        }

        if(totalRecipes == RecipeManager.getInstance().getRecipeList().size()){ 

            recipeListView.removeFooterView(footer);
            Log.d("FOODREM", "Footer Removed");

        }

        Log.d("ITCOUNT", totalRecipes+"-"+RecipeManager.getInstance().getRecipeList().size());
        updateItemscount();

    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:00:44+00:00Added an answer on May 23, 2026 at 10:00 pm

    You might have to call listView1.setAdapter(adapter) to refresh the listview. If that doesn’t work, another solution is to make the height of the footer view to 0px. This is a better solution if you are planning to use the footer view later on again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to remove the attribute xmlns=http://webdev2003.test.com from the following xml using xsl/xslt,
I am trying to remove from a string using Regex. I am receiving a
I am trying to remove an element from a Javascript associtive array using the
I'm trying to create a tab set using jQuery UI that has some permanent
I am trying to remove a certain color from my image however it's not
I am trying to remove the cache using the HttpRuntime.Cache.Remove(key) but invain. I wonder
jsFiddle I'm trying to remove the border of a div using jQuery, but it's
I am trying to remove a file from path using following code. But my
I was trying to remove a descendant element from an XElement (using .Remove()) and
I was trying to remove all the lines of a file except the last

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.