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

  • SEARCH
  • Home
  • 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 8561599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:32:09+00:00 2026-06-11T16:32:09+00:00

Is there any way to create horizontal list view with header. I think Horizontal

  • 0

Is there any way to create horizontal list view with header. I think Horizontal list view can be created via HorizontalScrollView component. As displayed in the tasks app (https://i.stack.imgur.com/qWZPh.jpg) I’ve provided, both Grocery List and Work headers can be viewed in being in the grocery list. When I’m moving from Grocery List to Work, the header should move seamlessly as well. How to animate headers like that (so that they get placed while we are scrolling through lists)?

Thanks

here is the link for tasks free app: https://i.stack.imgur.com/qWZPh.jpg

  • 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-06-11T16:32:10+00:00Added an answer on June 11, 2026 at 4:32 pm

    Tasks App (the screenshot you posted, and actually I am using it everyday) uses ViewPager with PagerTitleStrip.

    If you use Eclipse, there is a default option that creates such activity.

    enter image description here

    The following XML code is automatically generated by Eclipse when I select Swipe Views + Title Strip.

    <android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">
    
    <!--
    This title strip will display the currently visible page title, as well as the page
    titles for adjacent pages.
    -->
    <android.support.v4.view.PagerTitleStrip android:id="@+id/pager_title_strip"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="top"
        android:background="#33b5e5"
        android:textColor="#fff"
        android:paddingTop="4dp"
        android:paddingBottom="4dp" />
    

    Also try to check those:

    http://developer.android.com/reference/android/support/v4/view/ViewPager.html

    http://developer.android.com/reference/android/support/v4/view/PagerTitleStrip.html

    ADDED

    Automatically generated MainActivity.java

    package com.example.test;
    
    import android.app.ActionBar;
    import android.app.FragmentTransaction;
    import android.content.Context;
    import android.os.Bundle;
    import android.support.v4.app.Fragment;
    import android.support.v4.app.FragmentActivity;
    import android.support.v4.app.FragmentManager;
    import android.support.v4.app.FragmentPagerAdapter;
    import android.support.v4.app.NavUtils;
    import android.support.v4.view.ViewPager;
    import android.view.Gravity;
    import android.view.LayoutInflater;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.TextView;
    
    public class MainActivity extends FragmentActivity {
    
        /**
         * The {@link android.support.v4.view.PagerAdapter} that will provide fragments for each of the
         * sections. We use a {@link android.support.v4.app.FragmentPagerAdapter} derivative, which will
         * keep every loaded fragment in memory. If this becomes too memory intensive, it may be best
         * to switch to a {@link android.support.v4.app.FragmentStatePagerAdapter}.
         */
        SectionsPagerAdapter mSectionsPagerAdapter;
    
        /**
         * The {@link ViewPager} that will host the section contents.
         */
        ViewPager mViewPager;
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            // Create the adapter that will return a fragment for each of the three primary sections
            // of the app.
            mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
    
    
            // Set up the ViewPager with the sections adapter.
            mViewPager = (ViewPager) findViewById(R.id.pager);
            mViewPager.setAdapter(mSectionsPagerAdapter);
    
        }
    
        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            getMenuInflater().inflate(R.menu.activity_main, menu);
            return true;
        }        
    
        /**
         * A {@link FragmentPagerAdapter} that returns a fragment corresponding to one of the primary
         * sections of the app.
         */
        public class SectionsPagerAdapter extends FragmentPagerAdapter {
    
            public SectionsPagerAdapter(FragmentManager fm) {
                super(fm);
            }
    
            @Override
            public Fragment getItem(int i) {
                Fragment fragment = new DummySectionFragment();
                Bundle args = new Bundle();
                args.putInt(DummySectionFragment.ARG_SECTION_NUMBER, i + 1);
                fragment.setArguments(args);
                return fragment;
            }
    
            @Override
            public int getCount() {
                return 3;
            }
    
            @Override
            public CharSequence getPageTitle(int position) {
                switch (position) {
                    case 0: return getString(R.string.title_section1).toUpperCase();
                    case 1: return getString(R.string.title_section2).toUpperCase();
                    case 2: return getString(R.string.title_section3).toUpperCase();
                }
                return null;
            }
        }
    
        /**
         * A dummy fragment representing a section of the app, but that simply displays dummy text.
         */
        public static class DummySectionFragment extends Fragment {
            public DummySectionFragment() {
            }
    
            public static final String ARG_SECTION_NUMBER = "section_number";
    
            @Override
            public View onCreateView(LayoutInflater inflater, ViewGroup container,
                    Bundle savedInstanceState) {
                TextView textView = new TextView(getActivity());
                textView.setGravity(Gravity.CENTER);
                Bundle args = getArguments();
                textView.setText(Integer.toString(args.getInt(ARG_SECTION_NUMBER)));
                return textView;
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We can't use java.text.SimpleDateFormat, so is there any way to create date object from
Is there any way to create a dynamic Pinterest button? I'm trying to add
Is there any way to create breakpoints in clojurescript? Either in the repl or
Is there any way to create a Windows 8 ProgressBar in WPF? I don't
Is there any way to create a new NSString from a format string like
Is there any way to create a naming convention for my primary key constraints
Is there any way to create a property like this C# property in Objective-C?
Is there any way to create a variable sized doubly-scripted array in C (not
Is there any way to create a pivot and/or cross-tab query using for SQLite
Is there any way to create effects like dents, pinching, twisting, squashing, etc. on

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.