Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to add multiple listview in scrollview
    primarykey
    data
    text
    <p>how to ad multiple listview in scroll view ihave code which suppport single listview which is scrolling how do i add multiple listview? below is my code which support scroll single listview how do i add multiple listview???</p> <pre><code> public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ListView listView = (ListView) findViewById(R.id.lisview); View headerView = LayoutInflater.from(this).inflate(R.layout.header, null); listView.addHeaderView(headerView); ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;(); for (int i = 0; i&lt;100; i++){ list.add(String.valueOf(i)); } ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, android.R.id.text1, list); listView.setAdapter(adapter); } &lt;!--activity_main.xml---&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res /android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"&gt; &lt;FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="20dip"&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" android:textSize="30sp" android:layout_gravity="center"/&gt; &lt;/FrameLayout&gt; &lt;ListView android:id="@+id/lisview" android:layout_width="match_parent" android:layout_height="match_parent" android:cacheColorHint="#00000000"/&gt; &lt;/LinearLayout&gt; &lt;!-----header.xnml----&gt; &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ff000000" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Header View" android:textSize="30sp" android:textColor="#ff00ff00" android:layout_gravity="center"/&gt; &lt;/FrameLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload