Note that there are some explanatory texts on larger screens.

plurals
  1. POReplication of Apple's Search in Android
    primarykey
    data
    text
    <p>I want to create a UI similar to as shown here <a href="http://appsreviews.com/wp-content/uploads/2010/08/Cures-A-Z-App-for-iPhone.jpg" rel="nofollow">http://appsreviews.com/wp-content/uploads/2010/08/Cures-A-Z-App-for-iPhone.jpg</a></p> <p>I started out with trying to put two custom lists side by side like in this code</p> <pre><code>import java.util.ArrayList; import java.util.List; import java.util.WeakHashMap; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.AdapterView; import android.widget.ListView; import android.widget.TextView; import android.widget.AdapterView.OnItemClickListener; public class Emp extends Activity { /** Called when the activity is first created. */ private String tableName = DBHelper.tableName; private SQLiteDatabase newDB; public static WeakHashMap&lt;String, Empbook&gt; temp = new WeakHashMap&lt;String, Empbook&gt;(); final List&lt;Empbook&gt; listOfEmpbook = new ArrayList&lt;Empbook&gt;(); final List&lt;String&gt; listOfAlphabets = new ArrayList&lt;String&gt;(); TextView txt; EmpbookAdapter adapter = new EmpbookAdapter(this, listOfEmpbook); Integer pos; Integer count=0; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); txt=(TextView)findViewById(R.id.textView1); ListView list = (ListView) findViewById(R.id.ListView01); ListView alist = (ListView) findViewById(R.id.ListView02); list.setClickable(true); alist.setClickable(true); AlphabetListAdapter alphabetadapter = new AlphabetListAdapter(this, listOfAlphabets); list.setAdapter(adapter); alist.setAdapter(alphabetadapter); </code></pre> <p>the alphabetadapter is for the list displaying alphabets on the right in the screen. My XML is as follows:</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="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;TextView android:text="TextView" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt; &lt;ListView android:id="@+id/ListView01" android:layout_width="280dp" android:orientation="vertical" android:layout_height="wrap_content"&gt;&lt;/ListView&gt; &lt;ListView android:id="@+id/ListView02" android:layout_width="wrap_content" android:orientation="vertical" android:paddingLeft="282dp" android:layout_height="wrap_content"&gt;&lt;/ListView&gt; &lt;/LinearLayout&gt; </code></pre> <p>The problem that's occurring is that only one view at a time(the one which is put earlier in the above xml is displayed while the other just doesn't appear).</p> <p>Can someone please push me in the right direction?</p> <p>EDIT: I tried to set the weights of the lists setting one to zero and setting the other to 1,it works partially now i can see both lists however one of the list isn't getting populated....will update if i work it out.</p> <p>Posted an answer below (One listview dropped though.) Check it out.</p>
    singulars
    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.
 

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