All buttons of dinamically added matrix of ImageButtons became black - java

This is how it looked in the beginning. After I created new project and added this code with some modification, the view turn into smth like this(notice that only those buttons in the matrix are black):
Here is what my xml file contains:
<RelativeLayout 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" >
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/main_container" >
</LinearLayout>
<RelativeLayout
android:layout_below="#id/main_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:layout_centerHorizontal="true"
android:id="#+id/refresh_button"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/refresh"/>
<TextView
android:layout_centerHorizontal="true"
android:layout_below="#id/refresh_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/minesLeft"
android:text="#string/minesLeft"/>
<TextView
android:layout_centerHorizontal="true"
android:layout_below="#id/refresh_button"
android:layout_toRightOf="#+id/minesLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/minesLeftCounter"/>
</RelativeLayout>
</RelativeLayout>
And this is how I created this:
map = new ArrayList< ArrayList<ImageButton> >();
LinearLayout mainContainer = (LinearLayout) c.findViewById(R.id.main_container);
//Params used for cells
TableRow.LayoutParams params = new TableRow.LayoutParams(
0, ViewGroup.LayoutParams.WRAP_CONTENT, 1.0f
);
int pixelsToDp = convertToPixelsDp(-4.5f);
params.setMargins(pixelsToDp, pixelsToDp, pixelsToDp, pixelsToDp);
//Params used for rows
TableRow.LayoutParams rowParams = new TableRow.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT
);
rowParams.setMargins(0, 0, 0, 0);
//Params used for table
TableLayout.LayoutParams tableParams = new TableLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT
);
tableParams.setMargins(0, 0, 0, 0);
//Table generation
TableLayout table = new TableLayout(mAppContext);
table.setLayoutParams(tableParams);
table.setShowDividers(TableLayout.SHOW_DIVIDER_NONE);
table.setStretchAllColumns(true);
for(int i = 0; i < 15; i++){
ArrayList<ImageButton> rowOfList = new ArrayList<ImageButton>();
TableRow row = new TableRow(mAppContext);
row.setShowDividers(TableRow.SHOW_DIVIDER_NONE);
row.setLayoutParams(rowParams);
for(int j = 0; j < 10; j++){
ImageButton btn = new ImageButton(mAppContext);
btn.setPadding(0, 0, 0, 0);
btn.setLayoutParams(params);
btn.setScaleType(ImageView.ScaleType.CENTER_CROP);
rowOfList.add(btn);
row.addView(btn);
}
map.add(rowOfList);
table.addView(row);
}
mainContainer.addView(table);
What could cause change the background color of ImageButtons? THank you!

Related

Dynamically adding views in grid layout doesn't take the size specified

I am creating an app in which I want to dynamically add items to grid layout and want them to look like this:
What I did to achieve this is given as follows:
activity_main.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
tools:context=".MainActivity">
<LinearLayout
android:weightSum="1"
android:id="#+id/container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<GridLayout
android:id="#+id/myGrid"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#FFFFFF"
android:layout_weight="1">
</GridLayout>
</LinearLayout>
</ScrollView>
item_layout.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="#+id/item"
android:background="#color/itemBackground"
android:layout_weight="4"
android:layout_margin="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/cImage"
android:layout_marginTop="20dp"
android:layout_marginRight="40dp"
android:layout_marginLeft="40dp"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:src="#drawable/icon"/>
<TextView
android:id="#+id/cText"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.25"
android:textSize="20sp"
android:layout_marginTop="10dp"
android:textAlignment="center"
android:layout_marginBottom="10dp"
android:text="ORAL CARE"/>
</LinearLayout>
MainActivity.java: (Code adding items in grid layout)
gridLayout = (GridLayout) findViewById(R.id.myGrid);
myArray = new String[]{"pink","blue","red","orange","green","purple","white","black","brown","other"};
int total = myArray.length;
int column = 2;
int row = total / column;
gridLayout.setAlignmentMode(GridLayout.ALIGN_BOUNDS);
gridLayout.setColumnCount(column);
gridLayout.setRowCount(row + 1);
LinearLayout linearLayoutItem;
Display display = getWindowManager().getDefaultDisplay();
int displayWidth = display.getWidth();
int displayHeight = display.getHeight();
for(int i =0, c = 0, r = 0; i < total; i++, c++)
{
if(c == column)
{
c = 0;
r++;
}
LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View v = inflater.inflate(R.layout.item_layout, gridLayout, false);
TextView cText = (TextView) v.findViewById(R.id.cText);
ImageView cImage = (ImageView) v.findViewById(R.id.cImage);
cText.setText(myArray[i]);
cImage.setImageResource(R.drawable.icon);
v.setMinimumWidth(displayWidth/2); // setting width and height
v.setMinimumHeight(displayWidth/2);
gridLayout.addView(v);
GridLayout.LayoutParams param =new GridLayout.LayoutParams();
param.height = GridLayout.LayoutParams.WRAP_CONTENT;
param.width = GridLayout.LayoutParams.WRAP_CONTENT;
param.rightMargin = 20;
param.topMargin = 20;
param.setGravity(Gravity.CENTER);
param.columnSpec = GridLayout.spec(c);
param.rowSpec = GridLayout.spec(r);
This code is adding the views in grid layout perfectly. But the problem is that it is not adjusting the size of view according to the screen, as shown:
I have tried to make the view's width equal to half the space of screen but it doesn't seem to work. The image which I am using in imageView is large but I have tried experimenting with the size of the imageView as well but it doesn't work.
What I want is to:
Adjust the views (the gray colored views with image and text) according to the size of the screen on which it is run. As width of grid layout is match_parent.
Height of the view to be in ratio with width of the view.
Size of the image in the view to be in ratio with the size of the view.
Thanks in advance. Any help would be appreciated.

How to add below layout programatically

I have below layout in xml. But I want to add few more similar rows(RelativeLayouts one below another) dynamically with same layout. I've tried the below code, but all the values are overlapping.
Also I don't know how to add textview one below another programmatically.
Any help in solving this would be helpful. Thanks in advance.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ccc">
<LinearLayout
android:id="#+id/searchResultsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:background="#fff"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_height="100dp"
android:padding="6dip" >
<TextView
android:id="#+id/firstLine"
android:layout_width="fill_parent"
android:layout_height="26dp"
android:ellipsize="marquee"
android:text="Ali Connors"
android:textSize="16sp" />
<TextView
android:id="#+id/secondLine"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#id/firstLine"
android:gravity="center_vertical"
android:text="Brunch this weekend?"
android:textSize="12sp" />
<TextView
android:id="#+id/rightTime"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="15m"
android:textSize="16sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
Code:
LinearLayout ll = (LinearLayout) findViewById(R.id.searchResultsLayout);
for (int i = 0; i <1; i++) {
RelativeLayout row= new RelativeLayout(this);
RelativeLayout.LayoutParams relativeParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
relativeParams.setMargins(20, 5, 20, 5);
row.setBackgroundColor(Color.parseColor("#ffffff"));
ll.setLayoutParams(relativeParams);
TextView name = new TextView(this);
TextView time = new TextView(this);
TextView dest = new TextView(this);
name.setText("Name");
time.setText("9hrs");
dest.setText("Destination");
row.addView(name);
row.addView(time);
row.addView(dest);
ll.addView(row,i);
}
just replace your code with below code:
here is java code
setContentView(R.layout.myview_activity);
LinearLayout ll = (LinearLayout) findViewById(R.id.ll);
for (int i = 0; i <5; i++) {
LinearLayout row= new LinearLayout(this);
LinearLayout.LayoutParams layoutParams=new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
layoutParams.setMargins(20, 5, 20, 5);
row.setLayoutParams(layoutParams);
row.setBackgroundColor(Color.parseColor("#000000"));
LinearLayout.LayoutParams layoutParams1=new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
layoutParams1.setMargins(0,0,20,0);
TextView name = new TextView(this);
name.setLayoutParams(layoutParams1);
TextView time = new TextView(this);
time.setLayoutParams(layoutParams1);
TextView dest = new TextView(this);
dest.setLayoutParams(layoutParams1);
name.setText("Name");
time.setText("9hrs");
dest.setText("Destination");
row.addView(name);
row.addView(time);
row.addView(dest);
ll.addView(row);
}
}
LinearLayout ll = (LinearLayout) findViewById(R.id.searchResultsLayout);
ll.setOrientation(LinearLayout.VERTICAL);
for (int i = 0; i <1; i++) {
RelativeLayout row= new RelativeLayout(this);
RelativeLayout.LayoutParams relativeParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
relativeParams.setMargins(20, 5, 20, 5);
row.setBackgroundColor(Color.parseColor("#ffffff"));
ll.setLayoutParams(relativeParams);
TextView name = new TextView(this);
TextView time = new TextView(this);
TextView dest = new TextView(this);
final RelativeLayout.LayoutParams paramsval =
new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams
(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
name.setText("Name");
name.setId(View.generateViewId());
time.setText("9hrs");
dest.setText("Destination");
time.setLayoutParams(layoutParams);
row.addView(time);
row.addView(name);
paramsval.addRule(RelativeLayout.BELOW,name.getId());
dest.setLayoutParams(paramsval);
row.addView(dest);
ll.addView(row,i);
}
in order to get relative Layout one below other just use listview and adapter. it will automatically generate when you get data

Creating Linear layout with Horizontal scroll view at the bottom of the screen

I am trying to create a 5x5 table with buttons that take 70% of the space Of the screen. Below this i want to put buttons horizontally with a scrollbar (at the bottom of the screen that means).
The java and xml files are shown below.
On the output screen i can only see the 5x5 table created and the bottom space is left blank. I am new to android and layout so please help me with this. Thanks!
xml file:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TableLayout
android:id="#+id/mainPage"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TableLayout>
<HorizontalScrollView
android:id="#+id/hsvMain"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:id="#+id/scroll_ll"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:isScrollContainer="true"
android:scrollbars="horizontal"
android:orientation="horizontal">
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
Java file:
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.match_main_skl);
table = new TableLayout (this);
setControls();
hsv = new HorizontalScrollView(this);
ll = new LinearLayout(this);
mainTable();
}
private void setControls()
{
table = (TableLayout) findViewById(R.id.mainPage);
hsv = (HorizontalScrollView) findViewById(R.id.hsvMain);
ll = (LinearLayout) findViewById(R.id.scroll_ll);
}
private void mainTable()
{
//find screen size of the device (supports all versions)
Point windowSize = MAUIUtil.GetDefaultWindowSize(this);
int cellSize;
if (windowSize.x >= 0.70 * windowSize.y)
cellSize = windowSize.x / numColumns;
else cellSize = (int) ((0.70*windowSize.y)/numColumns);
**//5x5 TABLE**
TableRow.LayoutParams buttonRow = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT, 1.0f);
buttonRow.height = cellSize * numRows;
//buttonRow.height = windowSize.x;
table.setLayoutParams(buttonRow);
table.setStretchAllColumns(true);
for(int rw = 0; rw < numRows; rw++)
{
TableRow row = new TableRow(this);
row.setPadding(0, 0, 0, 0); //setPadding(left,top,right,bottom)
row.setId(ROW_ID_OFFSET + rw);//giving each row an id
TableLayout.LayoutParams tbLp = new TableLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT,1.0f);
tbLp.height = cellSize;
table.setLayoutParams(tbLp);
for(int col = 0; col < numColumns; col++)
{
int btnID = COLUMN_ID_OFFSET + (numColumns * (rw - 1)) + col;
//Adding buttons
Button btn = new Button(this);
btn.setId(btnID);
btn.setPadding(0, 0, 0, 0);
btn.setTypeface(Typeface.DEFAULT_BOLD);
btn.setBackgroundColor(Color.CYAN);
btn.setText(Integer.toString(btnID));
row.addView(btn);
}
table.addView(row);
}
**//LAST SCROLLABLE HORIZONTAL ROW**
hsv.addView(ll);
LinearLayout.LayoutParams llp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, 1.0f);
llp.height = windowSize.y - cellSize;
hsv.setLayoutParams(llp);
LinearLayout sll = new LinearLayout(this);
for(int col = 0; col < scrNumColumns; col++)
{
int btnID = SCROLL_COLUMN_ID_OFFSET + col;
//Adding buttons
Button btn = new Button(this);
btn.setId(btnID);
btn.setPadding(0, 0, 0, 0);
btn.setTypeface(Typeface.DEFAULT_BOLD);
btn.setBackgroundColor(Color.RED);
btn.setText(Integer.toString(btnID));
sll.addView(btn);
sll.setGravity(Gravity.BOTTOM);
}
ll.addView(sll);
}
It seems that you created a new LinearLayout and a new HorizontalScrollView after you called findViewById() in the onCreate() method. So you are operating the new created views rather than the views defined in the .xml file.
Try delete these rows:
hsv = new HorizontalScrollView(this);
ll = new LinearLayout(this);
Use below code.I have implemented it as you have described.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TableRow > </TableRow>
<TableRow > </TableRow>
<TableRow > </TableRow>
<TableRow > </TableRow>
<TableRow > </TableRow>
</TableLayout>
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button1"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button2"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button3"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button4"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button5"/>
</LinearLayout>
</HorizontalScrollView>
</RelativeLayout>
Hope it will help.You can ask if you have any further queries.
use android:alain_parentBottom="true" in linear layout.and you will achieve what you want.

Different form and color of checkbox on android activity

I have an Android app with this portion of main activity:
<LinearLayout
android:id="#+id/vistaAnni"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="#+id/TextView02"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".1"
android:text="1998" />
<CheckBox
android:id="#+id/CheckBox02"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".1" />
<CheckBox
android:id="#+id/CheckBox07"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".1" />
On the main activity class, I need another linear layout with other checks box.
LinearLayout myView = (LinearLayout) findViewById(R.id.vistaAnni);
Log.v("blah", "Crea tabella dinamica");
for(int i = 0; i < anni.size();i++){
Log.v("blah", "Creo colonna: "+anni.get(i));
LinearLayout newLine = new LinearLayout(getApplicationContext());
newLine.setOrientation(1);
newLine.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
TextView testo = new TextView(getApplicationContext());
testo.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0, .1f));
testo.setText(anni.get(i));
newLine.addView(testo);
CheckBox check1c = new CheckBox(getApplicationContext());
check1c.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0, .1f));
newLine.addView(check1c);
CheckBox check2c = new CheckBox(getApplicationContext());
check2c.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0, .1f));
newLine.addView(check2c);
myView.addView(newLine);
The system creates the box and the text fine, but with different colors and hardly visibility.
But I haven't customized it over activity.xml it or over activity.java. Why this change?
This is a sreen of app:
I have change all:
CheckBox check1c = new CheckBox(getApplicationContext());
with:
CheckBox check1c = new CheckBox(this);
as suggested by Luksprog and works.

how to put dynamic TableRow in TableLayout and place Textview dynamically in TableRow using Android?

i am newbie and facing difficulty to achieve my required output.
XML CODE:
//this code is inside of ScrollView
<LinearLayout
android:id="#+id/statusSecond_Layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableLayout
android:id="#+id/statusDisciplineTable_layout"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
></TableLayout>
</LinearLayout>
JAVA CODE:
setContentView(R.layout.status_view);
statusTableLayout = (TableLayout)findViewById(R.id.statusDisciplineTable_layout);
for(int i=0;i<2;i++)
{
TableRow statusTableRow = new TableRow(this);
statusTableRow.setId(i);
statusTableRow.setOrientation(TableRow.VERTICAL);
TextView productsTextView = new TextView(this);
productsTextView.setText("product name:"+i);
statusTableRow.addView(productsTextView);
//statusTableRow.setBackgroundColor(Color.BLACK);
for(int j=0;j<2;j++)
{
RelativeLayout statusRelativelayout = new RelativeLayout(this);
TableRow.LayoutParams rlp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT);
RelativeLayout.LayoutParams rl = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
rl.setMargins(0, 0, 16, 0);
rl.addRule(RelativeLayout.ALIGN_LEFT);
TextView label = new TextView(this);
label.setId(j);
label.setText("abcd:"+j);
label.setLayoutParams(rl);
statusRelativelayout.addView(label);
statusTableRow.addView(statusRelativelayout,rlp);
}
statusTableLayout.addView(statusTableRow);}
please tell me what should i need to do changes in my current code to product required given image
You can use LinearLayout instead of TableRow like this
TableLayout statusTableLayout = (TableLayout)findViewById(R.id.statusDisciplineTable_layout);
for(int i=0;i<2;i++)
{
LinearLayout statusTableRow = new LinearLayout(this);
statusTableRow.setId(i);
statusTableRow.setOrientation(LinearLayout.VERTICAL);
TextView productsTextView = new TextView(this);
productsTextView.setText("product name:"+i);
statusTableRow.addView(productsTextView);
//statusTableRow.setBackgroundColor(Color.BLACK);
for(int j=0;j<2;j++)
{
RelativeLayout statusRelativelayout = new RelativeLayout(this);
RelativeLayout.LayoutParams rl = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
rl.setMargins(0, 0, 16, 0);
rl.addRule(RelativeLayout.ALIGN_LEFT);
TextView label = new TextView(this);
label.setId(j);
label.setText("abcd:"+j);
label.setLayoutParams(rl);
statusRelativelayout.addView(label);
statusTableRow.addView(statusRelativelayout);
}
statusTableLayout.addView(statusTableRow);}
also put everything inside Relativelayout and then put inside ScrollView like this
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/statusSecond_Layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableLayout
android:id="#+id/statusDisciplineTable_layout"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</LinearLayout>
</TableLayout>
</LinearLayout>
</RelativeLayout>
</ScrollView>

Categories