ISchwarz23 / SortableTableView

An Android library containing a simple TableView and an advanced SortableTableView providing a lot of customisation possibilities to fit all needs.
Apache License 2.0
1.05k stars 238 forks source link

altura wrap_content a la tabla #162

Open zedinson opened 6 years ago

zedinson commented 6 years ago

I can not adjust the content to the tables using the height property wrap_content does not fit the content

`<?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:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"

<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent">

    <com.sortabletableview.recyclerview.TableView
        android:id="@+id/tableViewReporteVentasDiarias"
        android:layout_width="wrap_content"
        android:layout_height="526dp" />

</LinearLayout>

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    >
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello"
        />

</LinearLayout>
<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"

    >
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello"
        />

</LinearLayout>

`

http://prntscr.com/koaao3

ISchwarz23 commented 6 years ago

Hi @zedinson,

yes, this behavior is known. It is the same as for the native ListView. All you can do is set an absolute height or set it to "match_parent".

Best regards, Ingo

zedinson commented 6 years ago

...and then how could I add an edge, if the size of my table is dynamic and when the size of my table does not occupy the whole screen

ISchwarz23 commented 6 years ago

If you provide a small drawing how you want to have your layouting, I could provide a layout file for it.

zedinson commented 6 years ago

I want to adjust the borders to my pivot table I show the images http://prntscr.com/kq45lf http://prntscr.com/kq45yr

zedinson commented 6 years ago

Dear developer

this is how I applied the edge, but it appears tableView.backgroundDrawable = ContextCompat.getDrawable(context,R.drawable.border)

R.drawable.border

`<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">

<stroke
    android:width="2px"
    android:color="#000000"/>

`

Thanks in advance