Guest User

Untitled

a guest
Oct 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. Группа 1 | Имя 1 | Значение
  2. Группа 1 | Имя 2 | Значение
  3. Группа 2 | Имя 3 | Значение
  4.  
  5. <TableRow xmlns:android="http://schemas.android.com/apk/res/android"
  6. android:layout_width="0dp"
  7. android:layout_height="wrap_content"
  8. android:minHeight="60dp">
  9. <TextView
  10. android:id="@+id/attrib_name"
  11. android:textStyle="bold"
  12. android:textSize="18dp"
  13. android:layout_height="wrap_content"
  14. android:layout_width="0dp"
  15. android:layout_weight="0.6"/>
  16. <TextView
  17. android:id="@+id/min"
  18. android:textStyle="normal"
  19. android:textSize="18dp"
  20. android:layout_width="0dp"
  21. android:layout_weight="0.1"/></TableRow>
  22.  
  23. public void FillTable()
  24. {
  25. TableLayout table = (TableLayout)findViewById(R.id.attrib_table);
  26.  
  27. for(int i=0;i<myData.size();i++)
  28. {
  29. TableRow row = (TableRow) LayoutInflater.from(this).inflate(R.layout.attrib_row, null);
  30. ((TextView)row.findViewById(R.id.attrib_name)).setText(myData.get(i).getToroParameterMeasurement());
  31. ((TextView)row.findViewById(R.id.min)).setText(myData.get(i).getMinNominal());
  32.  
  33. table.addView(row); } }
  34.  
  35. Группа 1
  36. Имя 1 | Значение
  37. Имя 2 | Значение
  38. Группа 2
  39. Имя 3 | Значение
  40.  
  41. <TableRow
  42. android:layout_width="0dp"
  43. android:layout_height="wrap_content"
  44. android:minHeight="60dp">
  45. <TextView
  46. android:id="@+id/group"
  47. android:textStyle="bold"
  48. android:textSize="18dp"
  49. android:layout_height="wrap_content"
  50. android:layout_width="0dp"
  51. android:layout_weight="1.0"/>
  52. </TableRow>
Add Comment
Please, Sign In to add comment