StackOverflowError in getString()

Search This thread

SimplicityApks

Senior Member
May 26, 2013
354
344
Aachen

GR0S

Senior Member
Jun 10, 2012
889
192
That's a really funny error... from the logs I would guess that somehow the getString(R.blabla) method needs to get the calling class and also calls toString... Although I don't see that in the Android source code.

My solution would be to just don't override toString at all and use a different name like getTitle to prevent the system from calling that...

Well I won't be able to do that without my own fragment implementation. I found mistake, it's not possible to use getString() before activity attachment, probably I have to mess with reflection.
 

SimplicityApks

Senior Member
May 26, 2013
354
344
Aachen
Well I won't be able to do that without my own fragment implementation. I found mistake, it's not possible to use getString() before activity attachment, probably I have to mess with reflection.

Right, or you could just make a method returning the required title per id inside your activity that is then called by the ViewPager