question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Header doesn't appear

See original GitHub issue

Hi,

There is an issue with the library when I want to use header. If I don’t put any view above the SortableTableView, the header never appears. Some examples with your sample :

  • Remove the toolbar in activity_main.xml
  • Replace RelativeLayout by a LinearLayout

I think it’s an issue because we don’t need RelativeLayout everytime. The only workaround I found is using a fakeView above the TableView:

<View
    android:id="@+id/fakeView"
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:background="?attr/colorPrimary"/>

<fr.fnac.connect.ui.component.SortableProductTableView
    android:id="@+id/comparison_table"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_below="@id/fakeView"
    app:columnCount="4"
    app:headerColor="?attr/colorPrimary"
    app:headerElevation="10"/>

Julien

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Sineth-Ncommented, Feb 1, 2017

Hi @ISchwarz23 , I’m testing it on Nougat and it works now YAY!!!.. Awesome work done by you here, keep up the good work mate… Cheers!!!

0reactions
softwaresunleashedcommented, Nov 28, 2017

For me , getView() is not being hit…I have put breakpoints and they are not being hit. Is this a known issue? And hence, my custom data adapter views (TextView) are not being populated

The custom adapter is as follows

public class CountryTableDataAdapter extends TableDataAdapter<CountryTableCols> {

public CountryTableDataAdapter(Context context, List<CountryTableCols> data) {
    super(context, data);
}

@Override
public View getCellView(int rowIndex, int columnIndex, ViewGroup parentView) {
    CountryTableCols tableCols = getRowData(rowIndex);
    View renderedView = null;
    RelativeLayout.LayoutParams params=new RelativeLayout.LayoutParams
            ((int) ViewGroup.LayoutParams.MATCH_PARENT,(int) ViewGroup.LayoutParams.MATCH_PARENT);
    switch (columnIndex) {
        case 0:
            renderedView = new TextView(parentView.getContext());
            ((TextView)renderedView).setText(tableCols.desc);
            ((TextView)renderedView).setLayoutParams(params);
            ((TextView)renderedView).setTextColor(getResources().getColor(R.color.black));
            ((TextView)renderedView).setBackgroundColor(Color.parseColor("#FF0000"));

            break;
        case 1:
            renderedView = new TextView(parentView.getContext());
            ((TextView)renderedView).setText(tableCols.detail);
            ((TextView)renderedView).setLayoutParams(params);
            ((TextView)renderedView).setTextColor(getResources().getColor(R.color.black));
            ((TextView)renderedView).setBackgroundColor(Color.parseColor("#FF0000"));
            break;

    }

    return renderedView;
}

}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Office solution: Word's disappearing header demystified
Last week, we asked why a Word document's header might disappear. Eljensen mentioned that not all views display the header area, which is...
Read more >
Solved: Header And Footer Areas Missing In Word Document
Method 2: Using The Pointer. Step 1: Place your pointer onto the line between two pages, and double-click. This will separate the pages...
Read more >
SOLVED: Missing Header or Footer In Word - URTech.ca
SOLVED: Missing Header or Footer In Word · Move your pointer to the space between the top of your white page and the...
Read more >
Header not showing on following pages in Word 2016
After finally getting a header to have the text and page number just as required, it turned out that no following pages included...
Read more >
Header and Footer or Top / Bottom margins are missing in ...
Answer: · In the open document, move the pointer to the top border of any page in the document. · Look for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found