Giter VIP home page Giter VIP logo

Comments (12)

BraisGabin avatar BraisGabin commented on July 20, 2024

I can't reproduce it.

Are you using the master version? Device? API level? Screen shoots?

from tablefixheaders.

IsaacCisneros avatar IsaacCisneros commented on July 20, 2024

These are my settings:
-Master version.
-Galaxy Nexus (API level 17)
-Galaxy S3 (API level 16)

step 1:
Portrait orientation, scroll until the end in the X axis.
01

step 2:
rotate screen to landscape.
02

step 3:
In landscape scroll in any direction:
03

cheers

from tablefixheaders.

BraisGabin avatar BraisGabin commented on July 20, 2024

Do both mobiles use CyanogenMod? I don't know the reason of that behavior.

from tablefixheaders.

liujmok avatar liujmok commented on July 20, 2024

I'm having the same problem, i recalculated the tableFixHeaders.firstcolumn in the onConfigurationChanged().

Is there a better way to do it?

from tablefixheaders.

BraisGabin avatar BraisGabin commented on July 20, 2024

I can't reproduce this issue. Can you give me some sample code?

from tablefixheaders.

liujmok avatar liujmok commented on July 20, 2024

This may not be bug, about the user experience.

FamilyTable

    <activity
        android:name="com.inqbarna.tablefixheaders.samples.FamilyTable"
        android:label="@string/family_adapter" android:configChanges="orientation|screenSize">
    </activity>

and add more columns of data.

1.portrait orientation, scroll to the right most of the table.

2.rotate screen to landscape, when a table has many columns of data, i want to keep the table in the right position does not change. but FamilyTable the right blank.

or
3.i recalculated the tableFixHeaders.firstcolumn

public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);

    //DisplayMetrics metric = new DisplayMetrics();
    //getWindowManager().getDefaultDisplay().getMetrics(metric);        
    //int w = metric.widthPixels;
    //int h = metric.heightPixels;

    tableFixHeaders.firstColumn = 8;
    ((BaseTableAdapter)tableFixHeaders.getAdapter()).notifyDataSetChanged();
}

if the calculated error occurs above problem

Can you give me any suggestions?

from tablefixheaders.

BraisGabin avatar BraisGabin commented on July 20, 2024

Save scroll position. I'll implement this some day.

Did you try scrollTo()? I don't recommend you to change firstColumn value directly.

from tablefixheaders.

ashx1 avatar ashx1 commented on July 20, 2024

I don't know if this will work but try it, its worth a shot:

Just before the orientation changes, call the methods:
TableFixHeaders.getActualScrollX() and
TableFixHeaders.getActualScrollY() and save the values returned into local variables.

Once the orientation change has completed, just call:
TableFixHeaders.scrollTo(..) providing the values saved in the local variables and it should scroll to that X and Y position.

from tablefixheaders.

MariuszGSL avatar MariuszGSL commented on July 20, 2024

Yes, this is exactly what I do in my application.
I use: TableFixHeaders.scrollTo(0, LastRowPosition)
0 indicates that it should always scroll horizontally to the first column position (e.g. after orientation change). The LastRowPosition is calculated by multiplying the row number: (xxxx.row_ids.indexOf(m_id) by the RowHeight, to get the precise vertical scroll position.
You can see it in action in my app:
https://play.google.com/store/apps/details?id=com.eliteherd.elitemobile

from tablefixheaders.

liujmok avatar liujmok commented on July 20, 2024

I used tableFixHeaders.scrollTo(Integer.MAX_VALUE, 0), It still did not work.

from tablefixheaders.

ashx1 avatar ashx1 commented on July 20, 2024

Was this after the orientation change because it should work?

from tablefixheaders.

MariuszGSL avatar MariuszGSL commented on July 20, 2024

@liujmok You have got the scroll parameters entered in the wrong order:
The first value should be zero (horizontal scroll) and the second value should be set to the max vertical scroll. See below:
TableFixHeaders.scrollTo(0, Integer.MAX_VALUE)
See also my note above.
You have got these values set back to front.

from tablefixheaders.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.