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.

How to use getOriginalContentPosition

See original GitHub issue

Hi,

Usage guide says to call int originalPos = adapterCalc.getOriginalContentPosition(position); to get the correct index of the data in the adapter.

But, I find the function used in the library to have 2 more parameters.
public int getOriginalContentPosition(int position, int fetchedAdsCount, int sourceItemsCount)

Can you update the usage example and guide.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
tarunmahecommented, Aug 30, 2016

Hey @clockbyte thanks a lot. Not urgent. I would take the changes from the master. 😃

1reaction
clockbytecommented, Aug 30, 2016

@technohowl Finally I’ve added it. See public int translateSourceIndexToWrapperPosition(int sourcePos, int fetchedAdsCount) in AdmobAdapterCalculator.java. You could get the fetchedAdsCount as shown in the previous sample. Hope it will help.

P.S. get the latest from the master. Do you need a maven lib to be updated urgently?

Read more comments on GitHub >

github_iconTop Results From Across the Web

position - CSS: Cascading Style Sheets - MDN Web Docs
The position CSS property sets how an element is positioned in a ... Scrolling elements containing fixed or sticky content can cause ...
Read more >
Retrieve the position (X,Y) of an HTML element - Stack Overflow
The correct approach is to use element.getBoundingClientRect() : var rect = element.getBoundingClientRect(); console.log(rect.top, rect.right, rect.bottom, ...
Read more >
How to use the position property in CSS to align elements
In this article, I will be explaining one of the most confusing ways for aligning elements with pure CSS: the position property. I...
Read more >
CSS Layout - The position Property - W3Schools
The position property specifies the type of positioning method used for an element (static, relative, fixed, absolute or sticky).
Read more >
Positioning Content - Learn to Code HTML & CSS - Shay Howe
Easily learn CSS and HTML layout and positioning with floats, inline-block elements, and uniquely positioned elements.
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