android - Fixing the size of listview for some rows and providing scroll -


I have a ListView which I combine elements of an array, show me only three lines on the screen and make Rest is to scroll to everyone else, this can only be seen when we scroll, how to get it?

I have a custom adapter. Below is my list view

  & lt; Android Rakikarekha: Layout_width = "Match_parent" Android: Layout_height = "Wrap_content" android: orientation = "vertical" & gt; & Lt; ListView android: id = "@ + id / ListView" Android: Layout_width = "Match_parent" Android: layout_height = "0dp" Android: layout_weight = "1" android: divider = "# 00000000" Android: dividerHeight = "5dp" / & Gt;  

and adapters

  View public override @ getView (final int position, Knhwartwu View, ViewGroup parent) {// Tudo Auto-generated method stub holder Holder = new holder (); See line view; Line view = inflater.inflate (R.Let.Tobitum, empty); Holder T = (text view) lineview.findvibid (rdteviewview1); Holder.tv1 = (TextView) rowView.findViewById (R.id.textView2); Holder.tv2 = (text view) line view. FindVibIID (RID. TextView3); Holder. Tv3 = (TextView) rowView.findViewById (R.id.textView4); Holder = V4 = (text view) line view. Visualization (R.id.textView5); Holder.tv.setText (result [status]); Holder.tv1.setText (result1 [status]); Holder.tv2.setText (result2 [status]); Holder.tv3.setText (result3 [status]); Holder.tv4.setText (result4 [status]); RowView.setBackgroundColor (Color.parseColor ("# F1F1FF")); RowView.setOnClickListener (New OnClickListener) {@Override Public Zero onClick (see v) {// TODO Automatic Created Method Stub Toast.makeText (reference, "You clicked") [result] [condition] Toast.LENGTH_LONG .show ();}}); Return line view; }} May be  

I believe that with the help of the relative layout is. layout_above , alignParentTop , alignParentBottom , with Android Trying to play is similar to> Android: Layout_bello see the attributes tag.


Comments