Working example: http://jsfiddle.net/H72Ye/2/ I think I see what you are trying to do: the header 4 column may not shift right? You are using .val() to fetch the value of the <td> with class="id". This will not work. You example doesn't work because parent_id and next_id are empty when you...

This should work for you, using weight sum and layout weight and setting the table width to match parent and the textview width to 0dp, so it will dynamically render: <TableLayout android:id="@+id/tableAtTest" android:layout_width="match_parent" android:layout_height="wrap_content" android:weightSum="2"> <TableRow android:id="@+id/firstContainer" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="2dp"> <TextView android:layout_width="0dp" android:layout_height="wrap_content"...

I'm guessing that you are using a rowFactory on the TableView. The default css stylesheet defines the text fill on the table cell, which is a descendant of the table row, and so the default value overrides the value you set on the row. Try .error-row .table-cell { -fx-text-fill: red...

In your oncreateView method you inflate two fragment_show_statistics you return one, the other you find the table in. So you need to return the one that you find the table from. @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { this.containingActivity = getActivity(); this.inflater = inflater; currentFragmentView = inflater.inflate(R.layout.fragment_show_statistics,...

When you replace localStorage.getItem('fnm') with a simple string, this works perfectly document.getElementById("tbfn").innerHTML = 'John'; JSFiddle So, the problem is with the localStorage not being filled in the other page. This means, you must check the value of fnm, e.g. var fnm = localStorage.getItem('fnm'); console.log('fnm=' + fnm); and look for errors...

There is the working version on plunker : http://plnkr.co/edit/TXLSMx3TmurmMefdWGIW?p=info To do so, I use a boolean var to know if you want to show the free slot or not : $scope.showFree = true; $scope.changeView = function(){ $scope.showFree = !$scope.showFree; } With this code, I can hide the whole line if...

Figured it out myself. By changing the following line tr.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT)); to this instead tr.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT, 1.0f)); and also adding the same layoutparams to the view once it is inflated, it stretches to match parent as desired....

The spacing you're seeing is padding built into the standard Android button background asset. You can see that your layout is correct by turning on "Show Layout Bounds" in Settings > Developer Options. You just need to make your own button asset, or if a simple color is all that...

Change your innerHTML to innerText var t_row = document.getElementById("table_id").rows[row].innerText; Edit:- Thanks to Alex W for poitning out , you can use .textContent , since firefox does not support innerText. It is otherwise supported on all major browsers. But note that .textContent is not supported on older versions of IE (before...

With a lot of rubber duck debugging and some help from a colleague, we found what was wrong. Apparently I changed more than I thought. There was nothing wrong with either algorithms, both work fine but the latter might be a bit better since you can set the amount of...

Figured it out! Thanks for the idea James, but I went a bit of a different way. Here's the code for anyone in the future reading this post: amountCol.setCellFactory(new Callback<TableColumn<TransactionWrapper, String>, TableCell<TransactionWrapper, String>>() { @Override public TableCell<TransactionWrapper, String> call( TableColumn<TransactionWrapper, String> param) { return new TableCell<TransactionWrapper, String>() { @Override protected...

Set a weight for the column 3 layout, so that it will fill the remaining space in the TableRow LinearLayout linearLayout = new LinearLayout(this); TableRow.LayoutParams params = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT,1f); linearLayout.setLayoutParams(params); tableRow.addView(linearLayout); ...

I think it is the "View" that is giving you a problem. Try replacing it with an ImageView (try it) and I think it will work. If you really want View (not sure why) then set the min height and min width to something like 10dp. It happened to me...

Figured this out now. It was not a problem with TableRow. It was a problem with my URLImageParser class. I removed if(usesImageNotFoundDrawable == true){ URLImageParser.this.container.setHeight((URLImageParser.this.container.getHeight() + height*4)); } else { URLImageParser.this.container.setHeight((URLImageParser.this.container.getHeight() + height)); } and replaced it with container.setText(container.getText()); Now the height is detected correctly for images and all content...

You can try this modified layout, its entirely different from what you have created but results the same which probably you want. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <!-- TOP SIDE MENU AND OTHER VIEWS --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <LinearLayout android:layout_width="wrap_content"...

If you want to 'append' the button right after the select tag, this is what you should try to do. $('<button>Delete row</button>').appendTo( $(new_row.find('td:first')) ); Add this piece of code right before tbody.append(new_row); and you should be able to see the button right bellow the select tag. The logic is quite...

Sorry, I can't comment yet. But your code should work. Here is http://jsfiddle.net/eW5v5/ Are you sure that table exists by the time you run your calculation? $( document ).ready(function(){ }) Even though you are waiting until DOM is created, there might be something else going on that creates it after....

Please fix your HTML code. You must put "thead" tag out of "tbody" It will work. One more thing, you don't need to use droppable with sortable, remove it. Working version at http://jsfiddle.net/73kv2vm9/1/ <table id='table-draggable1'> <thead> <tr> <th>col1</th> <th>col2</th> <th>col3</th> <th>col4</th> </tr> </thead> <tbody class="connectedSortable"> <tr> <td>156</td> <td>668</td> <td>100.95</td>...

In Current implementation checkBox hold last CheckBox object which is created during last iteration of for loop so use second parameter of onCheckedChanged method which is if true means CheckBox is checked otherwise unchecked: @Override public void onCheckedChanged(CompoundButton compoundButton, boolean b) { if (b){ // or use compoundButton.isChecked() // code...