i am try to implement TableLayout column values search in android. but i don't known how to achieve this task.at the same time i tried ListView value search. it will be working fine.
following code was my table view content.
for (int i = 0; i < a.size(); i++) {
tableRow = LayoutInflater.from(this).inflate(R.layout.table_item,null,false);
System.out.println(a.get(i));
final String uniqueUrl = c.get(i);
final TextView history_display_no = (TextView) tableRow.findViewById(R.id.history_display_no);
final ImageButton history_display_date = (ImageButton) tableRow.findViewById(R.id.imageView1);
final ImageButton history_display_orderid = (ImageButton) tableRow.findViewById(R.id.imageView2);
final ImageButton history_display_quantity = (ImageButton) tableRow.findViewById(R.id.imageView3);
history_display_no.setText(a.get(i));
history_display_no.setTag(a.get(i));
tableLayout.addView(tableRow);
tableRow.setClickable(true);
history_display_no.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
Toast.makeText(getApplicationContext(), uniqueUrl, Toast.LENGTH_SHORT).show();
}
});
history_display_orderid.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
Toast.makeText(getApplicationContext(), uniqueUrl.toString(), Toast.LENGTH_SHORT).show();
}
});
history_display_quantity.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
Toast.makeText(getApplicationContext(), uniqueUrl, Toast.LENGTH_SHORT).show();
}
});
history_display_date.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
Toast.makeText(getApplicationContext(), history_display_no.getText().toString(), Toast.LENGTH_SHORT).show();
}
});
please guide me how to archive column search in TableLayout.thanks
