How can I create my listview which it's only scroll horizontally in Android?
<p>I want to make my listview which only scroll horizontally like flipkart home page.</p>

<p>Here, is my fragment_home.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;ScrollView  xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;
    &lt;LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"&gt;

        &lt;TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:textColor="#000"
            android:textSize="20dp"
            android:layout_marginBottom="1dp"
            android:text="SAREES"/&gt;
        &lt;View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:background="#000"&gt;
        &lt;/View&gt;
        &lt;LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="250dp"
            android:layout_marginTop="5dp"&gt;

            &lt;ListView
                android:id="@+id/sarees_listview"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"&gt;

            &lt;/ListView&gt;
            &lt;!--&lt;android.support.v4.view.ViewPager--&gt;
            &lt;!--android:id="@+id/sarees_viewPager"--&gt;
            &lt;!--android:layout_width="fill_parent"--&gt;
            &lt;!--android:layout_height="fill_parent"--&gt;
            &lt;!--android:layout_gravity="center"--&gt;
            &lt;!--android:layout_marginLeft="10dp"--&gt;
            &lt;!--android:layout_marginRight="10dp"--&gt;
            &lt;!--android:background="@android:color/transparent" /&gt;--&gt;

        &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;
&lt;/ScrollView&gt;
</code></pre>

<p>Here, is my Adapter class which inflate listview items</p>

<pre><code>package adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;

import com.domore.onlineangelnx.R;

import java.util.List;


public class SareesPagerAdapter extends BaseAdapter{

    private Context context;
    private List&lt;String&gt; list;

    private LayoutInflater inflater;
    public SareesPagerAdapter(Context context,List&lt;String&gt; list){
        this.context=context;
        this.list=list;

    }
    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Object getItem(int position) {
        return position;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        if(convertView==null){
            inflater=(LayoutInflater)this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            convertView=inflater.inflate(R.layout.sarees_view_pager,null);
//            ImageView img=(ImageView)convertView.findViewById(R.id.img_nature);
        }
        return convertView;
    }
}
</code></pre>

<p>Here, is my sarees_view_pager.xml which has imageView</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"&gt;

    &lt;HorizontalScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"&gt;
        &lt;LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="match_parent"&gt;

            &lt;ImageView
                android:id="@+id/img_nature"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/test"/&gt;
            &lt;ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/test"/&gt;
            &lt;ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/test"/&gt;
            &lt;ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/test"/&gt;
            &lt;ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/test"/&gt;
        &lt;/LinearLayout&gt;
    &lt;/HorizontalScrollView&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>Here, is homefragment.java which inflate home_fragment.xml</p>

<pre><code>package MainFragments;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.domore.onlineangelnx.R;

import java.util.ArrayList;
import java.util.List;

import adapter.SareesPagerAdapter;

public class HomeFragment extends Fragment {

    View rootView;
    SareesPagerAdapter adapter;
    List&lt;String&gt; items=null;
    ListView listview;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        rootView=inflater.inflate(R.layout.home_fragment, container, false);

        listview=(ListView)rootView.findViewById(R.id.sarees_listview);
        items=new ArrayList&lt;&gt;();
        items.add("well done");
        items.add("well done");
        items.add("well done");
        items.add("well done");


        adapter=new SareesPagerAdapter(getContext(),items);
        listview.setAdapter(adapter);
        return rootView;
    }
}
</code></pre>

<p>HomeFragment.java which set the listview items and call the adapter class.
Problem is my listview display it's items in vertically and horizontally both way.</p>

<p>Please, help me to solve out this problem.</p>